Пример #1
0
 def go(self):
     rst = RSTWriter.write(self.document).getvalue()
     settings = dict(input_encoding="UTF-8",
                     output_encoding="UTF-8",
                     stylesheet="stylesheet.tex")
     latex = docutils.core.publish_string(rst,
                                          writer_name="latex",
                                          settings_overrides=settings)
     # We don't want to keep an \input command in the latex file
     latex = latex.replace(r"\input{stylesheet.tex}", self.full_stylesheet)
     self.target.write(latex)
     return self.target
Пример #2
0
 def go(self):
     rst = RSTWriter.write(self.document).getvalue()
     settings = dict(input_encoding="UTF-8",
                     output_encoding="UTF-8",
                     stylesheet="stylesheet.tex")
     latex = docutils.core.publish_string(rst,
                                          writer_name="latex",
                                          settings_overrides=settings)
     # We don't want to keep an \input command in the latex file
     latex = latex.replace(r"\input{stylesheet.tex}",
                           self.full_stylesheet)
     self.target.write(latex)
     return self.target
Пример #3
0
from pyth.plugins.rst.writer import RSTWriter
import pythonDoc

if __name__ == "__main__":
    doc = pythonDoc.buildDoc()
    print RSTWriter.write(doc).getvalue()
Пример #4
0
from __future__ import absolute_import
from __future__ import print_function
from pyth.plugins.rst.writer import RSTWriter
import pythonDoc

if __name__ == "__main__":
    doc = pythonDoc.buildDoc()
    print(RSTWriter.write(doc).getvalue())