Пример #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=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()