mpastell / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.
http://mpastell.com/pweave
Other
435 stars 64 forks source link

Inline strings from python code #48

Closed briancohn closed 7 years ago

briancohn commented 8 years ago

Any way for me to create a code chunk that will evaluate into Tex/Md? I'd love to write some inline statistics and interpretations.

Thanks!

mpastell commented 7 years ago

Yes. You can use output = "tex" or output = "md" chunk option for raw output. See http://mpastell.com/pweave/chunks.html#envvar-results='verbatim' .

piccolbo commented 6 years ago

One comment about this. I would like to print the src of a function from a library. I can grab the source with getsource, but when I try to print it surrounded with <pre> </pre> I get &lt;pre&gt; in output. The chunk in py file is marked with `#+ results ="html". I am no longer sure what raw output means, if markup gets quoted.