TEX Macro Scripts in HTML Files

by G. D. Brettschneider (1999-2004)

 

You can easily insert commands of the TEX programming language into an HTML file – but they won't be interpreted by common web browsers. Results are only viewable, if that file is converted into PDF using Gerolf Markup Shredder, http://www.Gerolf.org.

 

This document:

 

Literature:

 

1. File Inclusion

If you have written a long story using plain TEX markup, why not embedding it into this document (The TEXbook, p. 23–34)...

 

The input file looks like this:

Today, authors use HTML markup...

...which is rendered similarly:



2. General Punishment

If you're told to write 'I must not run in the halls' for 100 times, then consider Professor Knuth's advice to use a TEX macro script for this task (The TEXbook, p. 200–201, 328–329)...

3. Prime Numbers

The first 864 prime numbers are (The TEXbook, p. 218)...

4. Math Formulas

If you know how to do clever calculation, share your wisdom with us (The TEXbook, p. 180–182, 192, 323–325, 327)...

5. System Calls

Your operating system's environment variables during TEX run are...
(This may not work on Windows 9x).