[SciPy-dev] Fwd: [sage-devel] numpy in SAGE, etc.

Jonathan Guyer guyer at nist.gov
Wed Dec 13 10:52:32 CST 2006

On Dec 13, 2006, at 11:21 AM, Neal Becker wrote:

> I'm looking to markup my python code, including latex so I can nicely
> include math.  I see I could use epydoc, and that epydoc can read  
> rst, but
> does this allow me to include latex?  If so, how?  And what  
> backends would
> then be used to generate either pdf or (x)html?

Right now, you use

   .. raw:: latex

directives. Kind of clumsy for inline expressions, but not too bad  
for display equations. For long stretches of inline math in text, we  
just do ".. raw:: latex" and write everything in LaTeX. Not ideal,  
but works OK. I'm certainly looking forward to cleaning everything up  
with latex-math.

Once you have that, invoking

    epydoc --latex mypython.py

generates a directory of .tex files and

    epydoc --html mypython.py

generates a directory of .html files.

Epydoc has a --pdf option, but it goes via .dvi --> .ps --> .pdf,  
which is kind of silly in this day and age. epydoc generates a master  
api.tex file, but we ignore and/or manipulate that and use our own  
that we feed straight through pdflatex.

More information about the Scipy-dev mailing list