[OS X TeX] Reflecting numbering in the source
Charilaos Skiadas
cskiadas at gmail.com
Tue Aug 14 21:47:11 EDT 2007
On Aug 14, 2007, at 7:40 PM, Alain Schremmer wrote:
>
>
> Er, this is what I am already doing (see above) and not what I
> would like which is for the source to show, commented out since it
> is after the %, the number of the exercise as it will appear in the
> pdf.
>
> But then of course, I don't see how this could possibly be done
> since I can't see how the macro could keep track and I was just
> hoping I was missing the obvious.
Not exactly what you were looking for, but it should be very easy to
write a shell/ruby/python script, that goes through your file and
does essentially a "search and replace", keeping track of how many
examples it has already encountered, and inserting the appropriate
number in the right space. Depending on the text editor you use, how
you would call this script varies.
Not exactly what you wanted, but certainly removes the necessity of
having to renumber things manually when you add a new example.
> Best regards
> --schremmer
Haris Skiadas
Department of Mathematics and Computer Science
Hanover College
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list