예제 #1
0
    def __init__(self,
                 document,
                 docstring_linker=None,
                 directory=None,
                 docindex=None,
                 context=None):
        # Set the document's settings.
        if self.settings is None:
            settings = OptionParser([LaTeXWriter()]).get_default_values()
            settings.output_encoding = 'utf-8'

            # This forces eg \EpydocUserSection rather than
            # \EpydocUserSEction*:
            settings.use_latex_toc = True

            self.__class__.settings = settings
        document.settings = self.settings

        LaTeXTranslator.__init__(self, document)
        self._linker = docstring_linker
        self._directory = directory
        self._docindex = docindex
        self._context = context

        # Use custom section names.
        self.d_class = _EpydocDocumentClass()
예제 #2
0
    def __init__(self, document, docstring_linker):
        # Set the document's settings.
        settings = OptionParser([LaTeXWriter()]).get_default_values()
        document.settings = settings

        LaTeXTranslator.__init__(self, document)
        self._linker = docstring_linker

        # Start at section level 3.  (Unfortunately, we now have to
        # set a private variable to make this work; perhaps the standard
        # latex translator should grow an official way to spell this?)
        self.section_level = 3
        self._section_number = [0] * self.section_level