| 1 |
|
| 2 |
Here's a copy of my LaTeX2e style file for typesetting programs |
| 3 |
and algorithms in my favourite style without having to type |
| 4 |
in endless tabbing commands. Each line is set in math mode |
| 5 |
so all the indentation and spacing is done automatically. |
| 6 |
The notation |variable_name| can be used within normal text, |
| 7 |
maths expressions or programs to indicate a variable name. |
| 8 |
Use \origbar to get a normal | symbol in a program. |
| 9 |
The commands \A, \B, \R, \T and \Z typeset the corresponding bold |
| 10 |
letter with the next object as a substript (eg \S1 typesets {\bf |
| 11 |
S$_1$} etc). They now cope with primes as well, (eg $\S2'''$). The |
| 12 |
program.sty file can be easily edited to reflect your favoured style. |
| 13 |
Typesetting a program is as easy as: |
| 14 |
|
| 15 |
\(\IF x \ne 0 \THEN |long_name|_{123} = x^y \FI\) |
| 16 |
|
| 17 |
See the program-demo.tex file for examples. |
| 18 |
|
| 19 |
The file should work with or without AMSLaTeX. |
| 20 |
|
| 21 |
This work is released under the GPL version 3. |
| 22 |
|
| 23 |
Martin Ward. |
| 24 |
|
| 25 |
[email protected] http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4 |
| 26 |
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/ |
| 27 |
|