This is the README file for the py2tex package by Jeroen van Maanen.

INSTALLATION
============

The installation of the py2tex package is very simple:

--  unpack the distribution

--  cd py2tex-4.1

--  ./setup install

--  put the file py2tex.sty in a directory where TeX will see it
    (i.e., a directory in $TEXINPUTS);

(Note that Python, the shell and TeX probably all look in the current
directory, so you can try it without moving anything.)

The preformatted documentation is included in PDF and DVI format.

USAGE OF PY2TEX
===== == ======

To typeset a Python module called foo.py with py2tex, create a
LaTeX file along the following lines.

  %% frame.tex -- wrapper around foo
  \documentstyle[...,py2tex,...]{...}
  ...
  \begin{document}
  ...
  \PythonSource{foo.pt}
  ...
  \end{document}

Then give the command

$ py2tex -o foo.pt foo.py

Finally run LaTeX on the previously constructed wrapper, like this

$ latex frame

This will give you a .dvi file that you can print in the normal
way.

FORMAT THE DOCUMENTATION
====== === =============

This only applies if you want to format the documentation yourself.

If your LaTeX doesn't use the new font selection scheme (NFSS) then
the Python code will not come out in sans serif.  If you don't have
Frank Mittelbachs `doc' option (available on the CTAN ftp archives)
then you will get a verbatim copy of the documented style file, not a
nicely formatted one.

To generate the documentation for py2tex, first change to the
doc/source directory.  Then translate the python sources with the
package itself with the command

$ ./translate

After that, run

$ latex doc

or

$ pdflatex doc

as often as is needed to get the table of contents right (probably two
times is sufficient).

NO DOCSTRIP
===========

If you don't have the docstrip utility by Frank Mittelbach, you can
use the doc file as the style sheet using the command:

$ ln -s py2tex.doc py2tex.sty

In that case also comment out the following command in the translate script:

  latex py2tex.cmd

BUGS, COMMENTS
====  ========

If you encounter any problems with this package, please drop me an
email at (jeroenvm<at>xs4all<dot>nl).
