Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 3
0
from pyth.plugins.rst.writer import RSTWriter
import pythonDoc

if __name__ == "__main__":
    doc = pythonDoc.buildDoc()
    print RSTWriter.write(doc).getvalue()
Exemplo n.º 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())