Menu
CTAN
Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/macros/latex/contrib/program

Here's a copy of my LaTeX2e style file for typesetting programs
and algorithms in my favourite style without having to type
in endless tabbing commands.  Each line is set in math mode
so all the indentation and spacing is done automatically.
The notation |variable_name| can be used within normal text,
maths expressions or programs to indicate a variable name.
Use \origbar to get a normal | symbol in a program.
The commands \A, \B, \R, \T and \Z typeset the corresponding bold
letter with the next object as a substript (eg \S1 typesets {\bf
S$_1$} etc). They now cope with primes as well, (eg $\S2'''$). The
program.sty file can be easily edited to reflect your favoured style.
Typesetting a program is as easy as:

\(\IF x \ne 0 \THEN |long_name|_{123} = x^y \FI\)

See the program-demo.tex file for examples.

The file should work with or without AMSLaTeX.

This work is released under the GPL version 3.

                        Martin Ward.

martin@gkc.org.uk  http://www.cse.dmu.ac.uk/~mward/  Erdos number: 4
G.K.Chesterton web site:  http://www.cse.dmu.ac.uk/~mward/gkc/

Files

Name Size Date Notes
README 1084 2008-11-12 06:25:00
gpl-3.0.txt 35147 2008-11-12 06:21:00
plink.tex 1691 2007-07-17 01:13:48
program-demo.tex 9683 2007-07-17 01:21:46
program-doc.pdf 275484 2010-09-25 06:00:47
program-doc.tex 2728 2010-09-25 06:00:47
program.sty 35297 2008-11-12 03:16:00

Down­load the con­tents of this pack­age in one zip archive (298.5k).

pro­gram – Type­set­ting pro­grams and al­go­rithms

The main of­fer­ing is a pro­gram en­vi­ron­ment; a pro­gram­box en­vi­ron­ment is avail­able for frag­ments that must not break with the pages.

Doc­u­men­ta­tion
Ver­sion3.3.12
Li­censeGNU Gen­eral Public Li­cense, ver­sion 3
Copy­right1991,2007 Martin Ward
Main­tainerMartin Ward
Con­tained inTeXlive as pro­gram
MikTeX as pro­gram
Topics com­puter code list­ing
type­set lan­guages for ex­press­ing al­go­rithms
Guest Book Sitemap Contact 2014-04-23 19:23 CEST