teTeX A Documentation Guide

This page is an attempt at a guided tour around the huge amount of TeX and LaTeX documentation which comes as part of teTEX, the unix TeX and LaTeX system assembled by Thomas Esser. It is contributed by Keith Refson and all comments, suggestions and flames should be directed to him. Queries about installing and maintaining the teTEX installation itself should be directed to the teTEX mailing list: (See the teTEX Homepage for instructions) --- but check the frequently-asked questions list first. Questions about using LaTeX, TeX etc are best posted to the usenet newsgroup comp.text.tex where they will receive attention from a worldwide readership.

Much of the documentation is in the form of dvi and PostScript files which should display using xdvi or ghostscript front ends such as ghostview or gv from a properly configured web browser. Alternatively you may download and print them. The original LaTeX sources can be found in the documentation tree which is rooted at $TEXMFMAIN/doc. The command texdoc [package-name] will attempt to display documentation for that package from the shell command line.

What's New in teTEX 1.0

Guides to TeX and LaTeX

LaTeX2e is the recommended version of LaTeX, and the older version LaTeX 2.09 is obsolete. If you know LaTeX2.09 read about LaTeX2e vs LaTeX2.09 and why you should switch. There is one manual describing the LaTeX language itself, which may at a pinch substitute for a book, the "not so short" Introduction to LaTeX2e. There is also a full reference manual of LaTeX2e commands -- ideal for looking up a particular piece of formatting while writing a document (also available in dvi format) and a table of available mathematical symbols.

Useful information in a questions and answers format is provided by the UK TeX users group Frequently Asked Questions list.

Most LaTeX books refer to a local guide to describe operating-system and implementation-dependent aspects, notably the commands to invoke LaTeX and how to preview and print documents. The document Running LaTeX and utilities on a Unix system (also in PostScript form) is a good introduction to most of these topics.

There are errata lists available for two well-known books, the LaTeX Book and the LaTeX Companion. (A complete revision of Chapter 8 of The LaTeX Companion is also available from CTAN courtesy of the publisher, Addison-Wesley.)

Graphics and Colour

A very common requirement is to include some kind of graphics as an external file (usually PostScript) into a LaTeX document. The definitive manual on how to do this is Keith Reckdahl's excellent Using EPS graphics in LaTeX2e. The document Packages in the graphics bundle  is the documentation on the recommended LaTeX2e graphics package, which includes information on how to use colours in the output.

A very powerful additional capability is provided by the psfrag system. This allows you to import PostScript figures from any other package, but use LaTeX's power for all of the mathematical and textual annotations. (But note that xfig(1) allows you to do this anyway).

Graph and Diagram Drawing

Probably the best way to draw a simple diagram is to use the xfig program (see the unix man page for details). However there are programmatic ways for more sophisticated work. These are
eepic
A macro package for a much enhanced LaTeX "picture mode". Requires driver support for tpic \specials. Some drawing programs such as xfig can write their output as eepic macros.
curves
An enhancement of LaTeX's picture mode to improve curve drawing.
xypic
there is also a reference manual.
texdraw
There are examples in the directory generic/texdraw/.
pspicture
Extend LaTeX picture drawing environment using PostScript \specials.
Pstricks
a set of macros for performing fancy twiddles using PostScript, such as drawing of geometrical objects, diagrams, fancy boxes, grayscales etc. There is a User Guide ( part 1, part 2, part 3, part 4), and a quick reference card.
METAPOST
a development of Donald Knuth's METAFONT program which produces PostScript rendition of fonts, diagrams etc rather than bitmapped versions. Documentation includes a manual and a guide to plotting graphs using METAPOST.
trees
Macros for drawing "tree" diagrams.
overpic
This package defines the overpic environment for overlaying a picture environment on top of an included graphic defined by an includegraphics command. Examples in opic-abs.tex and opic-rel.tex.

LaTeX Packages

These packages control the visual appearance and formatting of LaTeX documents. Many of them are described in the book The LaTeX Companion and they are grouped here in accordance with the headings defined there.

This installation contains the packages listed below. Many more have been written to provide additional capabilities and are available for download from the Comprehensive TeX Archive Network server, abbreviated to CTAN. Here is the Catalogue of packages available from CTAN. LaTeX itself and most of these packages are released under the LaTeX Project Public License.

Document Structure

xr
Page references to external documents.
varioref
"Intelligent" page references.
lastpage
Reference the number of pages in your LaTeX document (as in a page footer that says: Page N of M)
hyperref 
Create hypertext documents in dvi, postscript or PDF form. Contents listings, references, bibliographic citations and URLs are converted to hyperlinks.
dinbrief
The dinbrief document class (in German).
german
The german and ngerman document classes.
ntgclass
Dutch document classes.
minitoc
Package to add a mini-"table of contents" to each chapter. Example 1, example 2.
titlesec
Customize the sectioning format of a document.
sectsty
Macros to customize sectional headings (section, chapter etc)
tocloft
Customize the table of contents or lists of figures or tables.
tocbibind
Add document elements such as a bibliography or index to the table of contents.

Formatting Tools

bm 
The right way to make bold mathematical symbols.
xspace
Define commands that don't eat spaces.
verbatim 
A more robust implementation of the verbatim environment.
moreverb
An extension to the verbatim package that can handle TAB expansion, can number lines in an included file, can produce boxed verbatims, etc.
fancyvrb 
A comprehensive and customizable re-implementation of the verbatim environment. Allows specification of fonts, colours etc., line numbering, framing, TAB handling and conditional processing.
fvrb-ex
An extension to fancyvrb.
enumerate
Adds an optional argument to the enumerate environment which determines the style in which the counter is printed.
comma
\usepackage{comma} defines the command \commaform{number} which typesets number with a comma every third digit. If you want something other than a comma, for instance a thin space, or a full word space, redefine \commaformtoken for instance \renewcommand\commaformtoken{\,}.
indentfirst
Indent first paragraph after section header.
program
This package is for typesetting computer programs and algorithms. There is an example in program-demo.tex.
textfit
Package to support fitting of text to a given width of height by scaling the font.
typehtml
Typeset HTML (i.e., World Wide Web documents) directly from LaTeX.
plain
Allows the inclusion of plain tex markup in a LaTeX document. It defines the LaTeX environment plain which is used to enclose the plain tex to be included.
natbib 
Customizable citations. Can do almost any variant of numerical or author-date style citations. There's also a quick reference
bibentry
Insert formatted bibliographic references inline in the text.
paralist
Typeset lists within paragraphs.
MDW tools 
A collection of packages written by Mark Wooding
at.sty
Allows you to use `@' as a sort of `command-introducing' character, a bit like `\' is already.
cmtt.sty
Provides an `mTT' encoding for the Computer Modern Typewriter font, which solves lots of messy problems.
doafter.sty
Provides a TeX programmer's utility \doafter <token> <group> which does the <token> after the group is complete, including any \aftergroup things.
mathenv.sty
A collection of mathematical environments with a theme of aligning things in columns.
mdwmath.sty
Contains a few trivial definitions for mathematical things. The main thing is that the \sqrt command for doing square roots has been improved
mdwlist.sty
Various list related environments. There's a more versatile `description' environment, and some stuff for making `compacted' lists (with no extra space between items).
mdwtab.sty
A complete ground-up rewrite of LaTeX's `tabular' and `array' environments. Has lots of advantages over the standard version, and over the version in `array.sty'.
footnote.sty
Provides commands for saving executing footnotes.
sverb.sty
A bunch of macros for doing verbatim things.
syntax.sty
A load of commands for describing syntax. There's an environment for typesetting BNF grammars.
acronym
Make sure all acronyms used are spelt out at least once.
hyphenat
Improved control over hyphenation.
ragged2e
Provides commands and environments for setting ragged text which are easy to configure to allow hyphenation.
nomencl
Package for preparing tables of nomenclature or glossaries.
SIunits
Macros for typesetting SI units.
units
Typesetting of physical/metric units.
soul
Typeset text in a spaced-out or underlined fashion.

Page Layout

geometry 
Customize page layout (page sizes) using an easy and flexible user interface. Example sample.tex generates a testpage.
fancyheadings
This package has been renamed to fancyhdr.
fancyhdr 
Support for sophisticated control of page headers and footers in LaTeX2e. It supercedes fancyheadings.
footmisc 
Customize footnote numbering, style and presentation.
footnpag
Allows footnotes on individual pages to be numbered from 1, rather than being numbered sequentially through the document.
nopageno
\usepackage{nopageno} suppresses all page numbering including that on title and frontmatter pages.
chappg
The chappg package causes pages to be numbered in the style chapter-pagenumber. So the pages of chapter 3 will be numbered 3-1, 3-2, ..., and the pages of appendix B will be numbered B-1, B-2, ...
layout
Generate a test page showing the page layout.
layouts
Draw display of page layout parameters.
a4
Mostly superceded by LaTeX2e support for a4 paper but defines the extra option of widemargins. The geometry package is much more flexible.
scale
Rescales an entire document by 1.414 for photographic reduction.
anysize
Another package to set page sizes. Superceded by geometry.
fix2col
Improves some deficiencies in LaTeX's built-in two column output.
multicol
LaTeX package to mix single and multiple columns. Allows you to shift between two and one columns anywhere.
multitoc.dvi
Typeset tables of contents and lists of figures and tables in multi-column mode.
ftnright
Customize placement of footnotes in two column documents.
picinpar
Insert pictures into paragraphs. (NOTE: Piet van Oostrum does not recommend this package. Picins is recommended instead.
picins 
Insert pictures into paragraphs.
rotating 
Environment to rotate text, figures etc. There are examples, as LaTeX source and dvi or PostScript output.
eso-pic
This package makes it easy to add some picture commands to every page.

Modifying document appearance

showkeys
Print label, ref, cite and bib keys.
showlabels
Print \label arguments or equation numbers in margin at point of definition.
changebar
Add "change bars" in a document margin using dvi \specials.
crop
Print crop marks.
draftcopy
Overprint DRAFT on each page of document to indicate draft copy. The directory latex/draftcopy/ has a number of examples.
count1to
Sets some new counters for section selection.
prelim2e.dvi
Allows marking of preliminary versions of a document in the output.
thumbpdf
Support of thumbnails with pdfTeX, plain/LaTeX formats.

Tables

array
An extended implementation of the array and tabular environments which implements options to format columns.
longtable
Support for tables longer than a page
delarray
Add delimiters (parentheses etc.) around arrays.
supertabular
A multi-page tables package.
dcolumn
Align on the decimal point of numbers in tabulars.
hhline
Better horizontal lines in tabulars and arrays.
tabularx
Tabulars that widen automatically.
ltxtable
Longtable combined with tabularx.
colortbl 
Add colour to LaTeX tables.
booktabs
A package to lay out tables in high-quality (according to the author's opinion) book form.
slashbox
Typeset a box with a diagonal divider for table headings.

Floats

Floats are environments like figure and table which move text etc around in the document.
afterpage
Implements a command that causes the commands specified in its argument to be expanded after the current page is output. Useful to flush floats, for example
float 
Improves the interface for defining floating objects such as figures and tables. Introduces the boxed float and the ruled float.
subfigure
Figures divided into subfigures.
endfloat
Place all figures on pages by themselves at the end of the document.
placeins
Keeps floats `in their place', preventing them from floating past a \FloatBarrier command into another section.
caption2 and caption
Extend caption capabilities for figures and tables, such as the caption width, style, font.
sidecap 
Defines new LaTeX environments called SCfigure and SCtable (analogous to figure and table), to typeset captions sideways. leftcaption and rightcaption.
floatflt
Float text around figures and tables which do not span the full width of a page. This is an improved version of floatfig. Examples, latex source,precursor package floatfig.
rotfloat
Combines rotating package with enhanced float facilities of float. Examples: LaTeX source and output.

Fonts and Supporting Packages

In addition to the preinstalled fonts, see the section on using fontinst  to install new fonts, especially PostScript Type 1 fonts and the font naming conventions.
ae
A set of virtual fonts designed to be a close approximation to a T1-encoded set based on the CM fonts. This should make it possible to use the existing Type1 versions of the CM fonts to produce PDF files even when one needs hyphenation patterns other than English. See also aecompl
fontsmpl
Print a sample of a font.
rawfonts
Emulation of LaTeX 2.09 low-level font commands, eg \tenrm.
beton 
Typeset a LaTeX2e document with the Concrete fonts designed by Don Knuth and used in his book ``Concrete Mathematics''.
ccfonts
LaTeX font definition files for the Concrete fonts and a LaTeX package for typesetting documents using Concrete as the default font family.
cmbright
Use the "Computer Modern bright" font family.
mathtime
Package to support the mathtime fonts, a mathematical font set complementary to Times-Roman. N.B. These fonts are not included in teTeX.
lucidabr
Package to use the Lucidea Bright font set from Y & Y. N.B. The fonts are not part of teTeX and must be purchased separately.
LY1
This font encoding package supports the `texnansi' encoding as used by default in the Y&Y TeX system. There is also an option to support the `ansinew' encoding that is the default encoding in Microsoft Windows.
dsfont
Double-stroke maths fonts. Declares the macro \mathds{} to use double-stroke roman fonts. Package option sans uses sans-serif version.
dotlessj
This package declares the macros \j and \jmath to insert a dotless j in text and math mode.
mflogo
LaTeX package and font definition file to access the Knuthian `logo' fonts described in `The MetaFontbook' and the MetaFont and logos in LaTeX documents.
Concrete Math fonts
A set of math fonts for use with Donald Knuth's concrete text fonts.
concrete
This package simply includes the beton and euler packages for an approximation of the style in Concrete Mathematics.
mathcomp
A package for using the Text Companion fonts in math mode. (For example to get an upright "mu".)
type1cm
Allows the use of Computer Modern fonts at arbitrary type sizes instead of the usual discrete magsteps.
pandora
The Pandora fonts.
yfonts
A LaTeX interface to the old-german fonts designed by Yannis Haralambous.
oldgerm
German handwriting fonts.
wasysym
This package defines LaTeX commands to insert the symbols in the wasysym font set.
stmaryrd
The "St Mary's Road" symbol fonts.
marvodoc
The martin Vogel symbol fonts.

AMS Maths

A very useful guide to the American Mathematical Society extensions to LaTeX is provided in Chapter 8 of The LaTeX Companion. A revised version is available online from a CTAN archive in directory info/companion-rev/ as PostScript or PDF courtesy of the publisher, Addison-Wesley.)
amsmath
User guide for AMS-LaTeX as implemented in the amsmath package.
Also see the frequently-asked-questions list , various Tex and LaTeX examples in the directory latex/amsmath/.
theorem
Enhancements to the theorem environments, giving more choice in theorem layout.
bbm
Blackboard variant fonts for Computer Modern, with LaTeX support . Font sample
euler 
Provides a setup for using the AMS Euler family of fonts for math in LaTeX documents.
eufrak
Use the Euler Fraktur symbols.
euscript
Substitute the usual math calligraphic characters with Euler script equivalents.
mathrsfs
This package defines the command \mathscr{ABC} which typesets symbols such as Hamiltonians using the Ralph Smith Formal Script (rsfs) calligraphic fonts.
amsguide
User guide for AMS-TeX (the original plain TeX maths package).
joyerr.tex
Errata for The Joy of TeX.
AMS Fonts
Documentation for the AMS mathematical font set. See also the package documentation, the bug list and the frequently-asked questions list.

Multilingual LaTeX

Multilingual support for LaTeX.
babel
This package supports multilingual documents in many language.
inputenc
Allows use of 8-bit character sets in source documents.
tb1202, tb1401, tb1604
Some articles on Babel which appeared in tugboat.
cyrillic 
Package for using cyrillic fonts.
T2
Another font encoding for Cyrillic.
MLTeX
MLTeX is a modification of TeX version that allows the hyphenation of words with accented letters using ordinary Computer Modern (CM) fonts. There are instructions on how to use MLTeX's \charsubdef extension with LaTeX .

Additional or alternative "document" types

seminar 
A LaTeX style for overhead transparencies and notes. Example 1, Example 2. List of frequently asked questions. List of known bugs.
examdoc
Style for preparing examination papers.
labels
A package for making sticky labels in LaTeX.
textmerg
Package for creating "text merges" (like wordprocessor mail merge letters) in LaTeX. The directory latex/textmerg contains examples.
eplain
Extended plain text format.

Programming and Package Authoring

ifthen
Defines if/then/else macros for conditional text.
calc
Package for infix arithmetic notation in LaTeX.
fp
Fixed-point arithmetic package forTeX and LaTeX
keyval
Provides support for writing keyword-style arguments to packages. Used by graphics.
somedefs
A "programmer's toolkit" for package writers.
fileerr
Implementation of an error handler for "file-not-found" errors.
localloc
Enhanced register-allocation macros.
doc
Literate Programming for package writers -- The combined LaTeX package-code/documentation suite.
docstrip
Package to build stripped-down version of package files for speed.
everysel
This package provides hooks into the NFSS command \selectfont called \EverySelectfont and \AtNextSelectfont analogous to \AtBeginDocument.
everyshi
This package defines a new command \EveryShipout analogous to \AtBeginDocument.
stdclsdv
Macros to interact with sectional divisions of standard LaTeX classes.

Web2C implementation

teTEX is based on the web2c implementation of TeX, metafont etc. Information on running the various programs is contained in web2c.pdf. All programs use a common, configurable, library for searching for files. The file kpathsea.pdf gives details. The file tree is built in compliance with the TeX directory structure

Ancillary Programs

Bibtex

Bibtex is a separate program for managing databases of bibliographic references and selecting for citation in a LaTeX document. It is described in chapter 13 of The LaTeX Companion and online in the documents entitled BibTexing and Designing BibTeX Styles.

The latter document, Designing BibTeX Styles is a guide to customizing the format of the reference list. The non-expert may find it more useful to use the ancillary program makebst which semi-automates the design of a new bibliography style.

natbib is a LaTeX package which allows customization of the citation style in the text (rather than the format of the reference list). It works with almost all bibliography styles, even those which define their own citation macros.

Makeindex

The makeindex program which provides facilities for generating an index is described in the documents Index Preparation and Processing and the Makeindex user guide.

Dvips

The full documentation for the dvips DVI -> PostScript translator. N.B. The advice concerning including PostScript graphics has been superceded by the standard LaTeX2e graphics package.

To use the new Type I versions of the computer-modern fonts, use dvips with the extra argument -Pcmz or (-Pcm which does not download the fonts in the PostScript output.) Mathematical documents will probably also require -Pamz (or -Pams) for the AMS math fonts. eg

dvips -Pcmz -Pamz -P myprinter mydoc.dvi
Type 1 fonts are scaleable so the resulting PostScript does not include bitmapped fonts and is therefore resolution-independent. This is very useful if the postscript is to be scaled up or down or the final destination printer is not known.

Xdvi

The online documentation for xdvi only available as a unix "man" page and is not accessible through this WWW page. Use man xdvi to read it.

Texinfo

Texinfo is a macro package for TeX used by the GNU system for producing printed manuals.

TeX and LaTeX Variants

This distribution includes several new developments of TeX (which are also supplied with LaTeX macros.
pdftex and pdflatex
Han the Thanth's variant which can generate output in Adobe PDF format as well as the usual DVI. Documentation is in the PDFTeX manual and there is a list of frequently-asked questions.
omega and lambda
The Omega system extends TeX for mixed multi-lingual typesetting using unicode. See the omega home page.
etex and elatex
e-TeX adds several extensions to TeX notably right-to-left typesetting.
ConTeXt
A new macro package for TeX. See also the full list of commands.

Local Additions

Your system administrator may have added additional packages and documentation as well as those which come with teTEX.

Other sources of Information

Here are some other useful sources of information on LaTeX, TeX and related program on the World-Wide Web.
Last modified: Mon Apr 19 14:42:32 BST 1999