John Hunter <jdhunter@ace.b sd.uchicago.edu > writes:
[color=blue]
> Are there any tools that can be used to process python code and
> generate LaTeX/TeX output with syntax highlighted code?[/color]
>>>>> "Brian" == Brian Gough <bjg@network-theory.co.uk> writes:
Brian> John Hunter <jdhunter@ace.b sd.uchicago.edu > writes:[color=blue][color=green]
>> Are there any tools that can be used to process python code and
>> generate LaTeX/TeX output with syntax highlighted code?[/color][/color]
Brian> Try lgrind.
Just did a little googling and found this in the lgrind FAQ
My source code doesn't seem to align properly. What am I doing wrong?
LGrind uses by default a proportional font for its output. That's part
of the beauty. However, aligning with spaces doesn't work, since they
are relative horizontal motions. When using tabs, everything is fine. If
the standard tab width of 8 is too big for you, fiddle around with your
editor to save the file with tabwidth 4, say, and then use '-t 4' as an
option to LGrind.
Should I be worried? Will I need to preprocess my python and convert
spaces to tabs?
Also, I did some searching on google groups - it appears you need to
specify the syntax for python. I found this post from 1998
In article <mailman.30.108 9121896.5135.py thon-list@python.org >,
John Hunter <jdhunter@ace.b sd.uchicago.edu > wrote:
[color=blue]
> Are there any tools that can be used to process python code and
> generate LaTeX/TeX output with syntax highlighted code?[/color]
In <mailman.30.108 9121896.5135.py thon-list@python.org >, John Hunter wrote:
[color=blue]
> Are there any tools that can be used to process python code and
> generate LaTeX/TeX output with syntax highlighted code?[/color]
The listings package has Python support. From the README:
Abstract
--------
The `listings' package is a source code printer for LaTeX.
You can typeset stand alone files as well as listings with
an environment similar to `verbatim' as well as you can
print code snippets using a command similar to \verb'.
Many parameters control the output and if your preferred
programming language isn't already supported, you can make
your own definition.
> John Hunter <jdhunter@ace.b sd.uchicago.edu > wrote:[color=blue]
>[color=green]
>> Are there any tools that can be used to process python code and
>> generate LaTeX/TeX output with syntax highlighted code?[/color][/color]
The SciTE text editor enables you to export to LaTeX (also to PDF,
HTML, XML, and RTF). See:
In article <mailman.30.108 9121896.5135.py thon-list@python.org >,
John Hunter <jdhunter@ace.b sd.uchicago.edu > wrote:
[color=blue]
> Are there any tools that can be used to process python code and
> generate LaTeX/TeX output with syntax highlighted code?[/color]
>>>>> "David" == David Eppstein <eppstein@ics.u ci.edu> writes:
[color=blue][color=green]
>> Are there any tools that can be used to process python code and
>> generate LaTeX/TeX output with syntax highlighted code?[/color][/color]
Comment