## Maintained for the UK TeX Users Group Committee by Robin Fairbairns

#### version 2.4.7a, date 2000/07/07

 Note

This document is an updated and extended version of the FAQ article that was published as the December 1994 and 1995, and March 1999 editions of the UKTUG magazine Baskerville (which weren't formatted like this). The article is also available via the World Wide Web.

Part A   Introduction... *
Part B   The Background... *
1   What is TeX?... *
2   How should I pronounce “TeX”?... *
3   What is MF?... *
4   What is MP?... *
5   How can I be sure it's really TeX?... *
6   Are TeX and friends Y2K compliant?... *
7   What is LaTeX?... *
8   How should I pronounce “LaTeX(2varepsilon)”?... *
9   Should I use plain TeX or LaTeX?... *
10   What is CONTeXT?... *
11   What are the AMS packages (AMSTeX, etc.)?... *
12   What is Eplain?... *
13   What is Lollipop?... *
14   What is Texinfo?... *
15   If TeX is so good, how come it's free?... *
16   What is the future of TeX?... *
17   What are TUG and TUGboat?... *
18   Are there nationally-based user groups, too?... *
19   TUG Technical Working Groups... *
Part C   Documentation and Help... *
20   Books on TeX and its relations... *
21   Books on Type... *
23   Where to get help... *
24   (La)TeX Tutorials... *
25   MF and MP Tutorials... *
26   BibTeX Documentation... *
27   The PiCTeX manual... *
28   Finding (La)TeX macro packages... *
29   Finding files in the CTAN archives... *
Part D   Bits and pieces of TeX... *
30   What is a DVI file?... *
31   What is a driver?... *
32   What are PK files?... *
33   What are TFM files?... *
34   Virtual fonts... *
35   \special commands... *
36   Documented LaTeX sources (.dtx files)... *
37   What are the EC fonts?... *
38   What is TDS?... *
Part E   Acquiring the Software... *
39   Repositories of TeX material... *
40   What's the CTAN nonfree tree?... *
41   Contributing a file to the archives... *
42   Finding new fonts... *
43   TeX CDROMs... *
Part F   TeX Systems... *
44   (La)TeX for different machines... *
45   TeX-friendly editors and shells... *
46   Commercial TeX implementations... *
Part G   DVI Drivers and Previewers... *
47   DVI to PostScript conversion programs... *
48   DVI drivers for HP LaserJet... *
49   DVI previewers... *
Part H   Support Packages for TeX... *
50   Fig, a TeX-friendly drawing package... *
51   TeXCAD, a drawing package for LaTeX... *
52   Spelling checkers for work with TeX... *
Part I   Literate programming... *
53   What is Literate Programming?... *
54   WEB for C, FORTRAN, and other languages... *
Part J   Format conversions... *
55   Conversion between (La)TeX and others... *
56   Conversion from (La)TeX to plain ASCII... *
57   Conversion from SGML or HTML to TeX... *
58   (La)TeX conversion to HTML... *
59   Making hypertext documents from TeX... *
60   Making Acrobat documents from LaTeX... *
61   Using TeX to read SGML or XML directly... *
Part K   MF... *
62   Getting MF to do what you want... *
63   Which font files should be kept... *
64   Getting bitmaps from the archives... *
Part L   PostScript and TeX... *
65   Using PostScript fonts with TeX... *
66   Previewing files using PostScript fonts... *
67   TeX font metric files for PostScript fonts... *
68   Problems using PostScript fonts... *
69   Choice of scalable outline fonts... *
70   Including a PostScript figure in (La)TeX... *
Part M   Special sorts of typesetting... *
71   Drawing with TeX... *
72   Double-spaced documents in LaTeX... *
73   Formatting a thesis in LaTeX... *
74   Flowing text around figures in LaTeX... *
75   Alternative head- and footlines in LaTeX... *
76   Including a file in verbatim in LaTeX... *
77   Including line numbers in typeset output... *
78   Generating an index in (La)TeX... *
79   Typesetting URLs... *
80   Citing URLs with BibTeX... *
81   Using BibTeX with plain TeX... *
82   Typesetting music in TeX... *
83   Drawing Feynman diagrams in LaTeX... *
Part N   How do I do X in TeX or LaTeX... *
84   Proof environment... *
85   Symbols for the number sets... *
86   Roman theorems... *
87   Fancy enumeration lists... *
89   Footnotes in tables... *
90   Style of section headings... *
91   Indent after section headings... *
92   Footnotes in LaTeX section headings... *
93   Changing the margins in LaTeX... *
94   Finding the width of a letter, word, or phrase... *
95   Changing the space between letters... *
96   Excluding blocks of text from the DVI file... *
97   Setting bold Greek letters in LaTeX... *
98   Defining a new log-like function in LaTeX... *
99   Typesetting all those TeX-related logos... *
100   1-column abstract in 2-column document... *
101   Changing babel's ideas of words to use... *
102   Code listings in LaTeX... *
Part O   Macros for Particular Types of Documents... *
103   Setting papers for journals... *
104   A ‘report’ from lots of ‘article’s... *
105   Curriculum Vitae (Resumé)... *
Part P   Things are Going Wrong…... *
106   Weird hyphenation of words... *
107   (Merely) peculiar hyphenation... *
108   Accented words aren't hyphenated... *
109   Enlarging TeX... *
110   Moving tables and figures in LaTeX... *
111   \pagestyle{empty} on first page in LaTeX... *
112   Underlined text won't break... *
113   Odd behaviour of \rm, \bf, etc.... *
114   Old LaTeX font references such as \tenrm... *
115   Missing symbols... *
116   LaTeX gets cross-references wrong... *
117   \@ and @ in macro names... *
118   Where are the msx and msy fonts?... *
119   Where are the am fonts?... *
120   ‘String too long’ in BibTeX... *
Part Q   Why does it do that?... *
121   What's going on in my \include commands?... *
122   Why does it ignore paragraph parameters?... *
123   What's the reason for ‘protection’?... *
124   Why doesn't \verb work within…?... *
125   Case-changing oddities... *
126   Why are # signs doubled in macros?... *
127   Why does LaTeX split footnotes across pages?... *
128   Getting \marginpar on the right side... *
129   Why does PiCTeX run out of ‘\dimen’s?... *
130   Why won't LaTeX ‘fixed’ names stay changed?... *
Part R   Current TeX Projects... *
131   LaTeX2e (the ‘new’ standard LaTeX)... *
132   The LaTeX3 project... *
133   The Omega project... *
134   The NTS project... *
135   The PDFTeX project... *
Part S   Perhaps There isn't an Answer... *
136   What to do if you find a bug... *

### Part A.   Introduction

This article was prepared by the Committee of the UK TeX Users Group (UK TUG)*1* as a development of a regular posting to the Usenet newsgroup comp.text.tex that was maintained for some time by Bobby Bodenheimer (bobby@hot.caltech.edu).

Therefore, a translation of the article has been made available on the World-Wide Web, via URL http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes

A hypertext version is also to be found on the TeX Live CDROM (question 43).

When we started, we rearranged Bobby's original, and we have since added new questions and answers on the basis of our experience of answering questions about TeX, writing documents in TeX, and developing macros for TeX, over the years.

The committee is grateful for help and advice, from the following outside its number: Donald Arseneau, Barbara Beeton, Karl Berry, Damian Cugley, Michael Downes, John Hobby, Berthold Horn, Werner Icking, David Kastrup, Ted Nieland, Pat Rau, Peter R. Wilson, Piet van Oostrum, Oren Patashnik, Joachim Schrod, Ulrik Vieth, Rick Zaccone and Reinhard Zierke.

Further, Rosemary Bailey and Chris Rowley (who resigned from the committee in 1995), Alan Jeffrey and Carol Hewlett (who resigned from the committee in 1996), David Carlisle (who resigned from the committee in 1997), and Robin Fairbairns, Jonathan Fine and Sebastian Rahtz (who resigned from the committee in 1998) all made significant contributions to the conception, development and subsequent revision of this FAQ while they remained on the committee, and we are grateful to them for their contributions to it. In particular, Alan Jeffrey developed the technique whereby the Web version of the FAQ is generated.

And lastly, the editor has regularly used the work of other groups for ‘inspiration’, notably the excellent (German-language) FAQ published by Dante e.V. (see http://www.dante.de/faq/de-tex-faq/).

#### Finding the Files

Unless otherwise specified, all files mentioned in this article are available from a CTAN archive, or from one of their mirrors. Question 39 gives details of the CTAN archives, and how to retrieve files from them. If you don't have access to the Internet, question 43 tells you of sources of CDROMs that offer snapshots of the archives.

The reader should also note that the first directory name of the path name of every file on CTAN has been elided from what follows, for the simple reason that it's always the same (tex-archive/).

To avoid confusion, we've also elided the full stop*3* from the end of any sentence whose last item is a path name (note that such sentences only occur at the end of paragraphs). Though the path names are set in a different font from running text, it's not easy to distinguish the font of a single dot!

### Part B.   The Background

#### 1.   What is TeX?

TeX is a typesetting system written by Donald E. Knuth, who says in the Preface to his book on TeX (see question 20) that it is “intended for the creation of beautiful books  -- and especially for books that contain a lot of mathematics”.

Knuth developed a system of ‘literate programming’ to write TeX, and he provides the literate (WEB) source of TeX free of charge, together with tools for processing the web source into something that can be compiled and something that can be printed; there's never any mystery about what TeX does. Furthermore, the WEB system provides mechanisms to port TeX to new operating systems and computers; in order that one may have some confidence in the ports, Knuth supplied a test by means of which one may judge the fidelity of a TeX system. TeX and its documents are therefore highly portable.

TeX is a macro processor, and offers its users a powerful programming capability. For this reason, TeX on its own is a pretty difficult beast to deal with, so Knuth provided a package of macros for use with TeX called plain TeX plain TeX is effectively the minimum set of macros one can usefully employ with TeX, together with some demonstration versions of higher-level commands (the latter are better regarded as models than used as-is). When people say they're “programming in TeX”, they usually mean they're programming in plain TeX.

#### 2.   How should I pronounce “TeX”?

The ‘X’ stands for the Greek letter Chi (chi), and is pronounced by English-speakers either a bit like the ‘ch’ in ‘loch’ ([x] in the IPA) or like ‘k’. It definitely is not pronounced ‘ks’.

#### 3.   What is MF?

MF was written by Knuth as a companion to TeX whereas TeX defines the layout of glyphs on a page, MF defines the shapes of the glyphs and the relations between them. MF details the sizes of glyphs, for TeX's benefit, and details the rasters used to represent the glyphs, for the benefit of programs that will produce printed output as post processes after a run of TeX.

MF's language for defining fonts permits the expression of several classes of things: first (of course), the simple geometry of the glyphs; second, the properties of the print engine for which the output is intended; and third, ‘meta’-information which can distinguish different design sizes of the same font, or the difference between two fonts that belong to the same (or related) families.

Knuth (and others) have designed a fair range of fonts using MF, but font design using MF is much more of a minority skill than is TeX macro-writing. The complete TeX-user nevertheless needs to be aware of MF, and to be able to run MF to generate personal copies of new fonts.

#### 4.   What is MP?

The MP system (by John Hobby) implements a picture-drawing language very much like that of MF except that it outputs Encapsulated PostScript files instead of run-length-encoded bitmaps. MP is a powerful language for producing figures for documents to be printed on PostScript printers, either directly or embedded in (La)TeX documents. It includes facilities for directly integrating TeX text and mathematics with the graphics. The PostScript output is of such a simple form that MP output files can be directly included in PDFLaTeX*4* documents (question 135). (Knuth tells us that he uses nothing else but MP for diagrams in text that he is writing.)

Much of MP's source code was copied from MF's sources with Knuth's permission.

#### 5.   How can I be sure it's really TeX?

TeX (and MF and MP) are written in a ‘literate’ programming language called Web (question 53) which is designed to be portable across a wide range of computer systems. How, then, is a new version of TeX checked?

Of course, any sensible software implementor will have his own suite of tests to check that his software runs: those who port TeX and its friends to other platforms do indeed perform such tests.

Knuth, however, provides a ‘conformance test’ for both TeX (trip) and MF (trap). He characterises these as ‘torture tests’: they are designed not to check the obvious things that ordinary typeset documents, or font designs, will exercise, but rather to explore small alleyways off the main path through the code of TeX. They are, to the casual reader, pretty incomprehensible!

Once an implementation of TeX has passed its trip, or and implementation of MF has passed its trap, test it may reasonably be distributed as a working version.

#### 6.   Are TeX and friends Y2K compliant?

Crashing:
None of TeX, MF or MP can themselves crash due to any change whatever in the date of any sort.
Timestamps:
As Knuth delivers the sources, a 2-digit year is stored as the creation time for format files and that value is printed in logfiles. These items should not be of general concern, since the only use of the date format file is to produce the log output, and the log file is designed for human readers only.

Knuth's distributed source does not designate the code, which generates this 2-digit date, as a valid area where implementations may differ. However, he announced in 1998 that implementators can alter this code without fear of being accused of non-compliance. Nearly all implementations that are being actively maintained had been modified to generate 4-digit years in the format file and the log, by the end of 1998.

The \year primitive:
Certification of a TeX implementation (see question 5) does not require that \year return a meaningful value (which means that TeX can, in principle, be implemented on platforms that don't make the value of the clock available to user programs). The TeXbook (see question 20) defines \year as “the current year of our Lord”, which is the only correct meaning for \year for those implementations which can supply a meaningful value, which is to say nearly all of them.

In short, TeX implementations should provide a value in \year giving the 4-digit year Anno Domini, or the value 1776 if the platform does not support a date function.

Note that if the system itself fails to deliver a correct date to TeX, then \year will of course return an incorrect value. TeX cannot be considered Y2K compliant, in this sense, on a system that is not itself Y2K compliant.

Macros:
TeX macros can in principle perform calculations on the basis of the value of \year. The LaTeX suite (question 7) performs such calculations in a small number of places; the calculations performed in the current (supported) version of LaTeX are known to be Y2K compliant.

Other macros and macro packages should be individually checked.

External software:
Software such as DVI translators needs to be individually checked.

#### 7.   What is LaTeX?

LaTeX is a TeX macro package, originally written by Leslie Lamport, that provides a document processing system. LaTeX allows markup to describe the structure of a document, so that the user need not think about presentation. By using document classes and add-on packages, the same document can be produced in a variety of different layouts.

Lamport says that LaTeXrepresents a balance between functionality and ease of use”. This shows itself as a continual conflict that leads to the need for such as the present article: LaTeX can meet most user requirements, but finding out how is often tricky.

#### 8.   How should I pronounce “LaTeX(2varepsilon)”?

Lamport never recommended how one should pronounce LaTeX, but a lot of people pronounce it ‘Lay TeX’ or perhaps ‘Lah TeX’ (with TeX pronounced as the program itself; see question 2).

The ‘epsilon’ in ‘LaTeX2e’ is supposed to be suggestive of a small improvement over the old LaTeX 2.09. Nevertheless, most people pronounce the name as ‘LaTeX-two-ee’.

#### 9.   Should I use plainTeX or LaTeX?

There's no straightforward answer to this question. Many people swear by plain TeX, and produce highly respectable documents using it (Knuth is an example of this, of course). But equally, many people are happy to let someone else take the design decisions for them, accepting a small loss of flexibility in exchange for a saving of brain power.

The arguments around this topic can provoke huge amounts of noise and heat, without offering much by way of light; your best bet is to find out what those around you are using, and to go with the crowd. Later on, you can always switch your allegiance; don't bother about it.

If you are preparing a manuscript for a publisher or journal, ask them what markup they want before you develop your own; many big publishers have developed their own LaTeX styles for journals and books, and insist that authors stick closely to their markup.

#### 10.   What is CONTeXT?

CONTeXT is a macro package developed by Hans Hagen, originally to serve the needs of the Dutch firm, Pragma. It was designed with the same general-purpose aims as LaTeX, but (being younger) reflects much more recent thinking about the structure of markup, etc. In particular, CONTeXT can customise its markup to an author's language (customising modules for Dutch, English and German are provided, at present).

CONTeXT is well integrated, in all of its structure, with the needs of hypertext markup, and in particular with the facilities offered by PDFTeX.

CONTeXT doesn't yet have quite such a strong developer community as does LaTeX, but those developers who are active seem to have prodigious energy.

Try a copy, from macros/context

#### 11.   What are the AMS packages (AMSTeX, etc.)?

AMSTeX is a TeX macro package, originally written by Michael Spivak for the American Mathematical Society (AMS) during 1983-1985. It is described in “The Joy of TeX” by Michael D. Spivak (second edition, AMS, 1990, ISBN 0-821-82997-1). It is based on plain TeX, and provides many features for producing more professional-looking maths formulas with less burden on authors. It pays attention to the finer details of sizing and positioning that mathematical publishers care about. The aspects covered include multi-line displayed equations, equation numbering, ellipsis dots, matrices, double accents, multi-line subscripts, syntax checking (faster processing on initial error-checking TeX runs), and other things.

As LaTeX increased in popularity, authors asked to submit papers to the AMS in LaTeX, and so the AMS developed AMSLaTeX, which is a collection of LaTeX packages and classes that offer authors most of the functionality of AMSTeX.

#### 12.   What is Eplain?

The Eplain macro package expands on and extends the definitions in plain TeX. Eplain is not intended to provide “generic typesetting capabilities”, as do LaTeX or Texinfo (question 14). Instead, it provides definitions that are intended to be useful regardless of the high-level commands that you use when you actually prepare your manuscript.

For example, Eplain does not have a command \section, which would format section headings in an “appropriate” way, as LaTeX's \section. The philosophy of Eplain is that some people will always need or want to go beyond the macro designer's idea of “appropriate”. Such canned macros are fine  -- as long as you are willing to accept the resulting output. If you don't like the results, or if you are trying to match a different format, you are out of luck.

On the other hand, almost everyone would like capabilities such as cross-referencing by labels, so that you don't have to put actual page numbers in the manuscript. Karl Berry, the author of Eplain, says he is not aware of any generally available macro packages that do not force their typographic style on an author, and yet provide such capabilities.

#### 13.   What is Lollipop?

Lollipop is a macro package written by Victor Eijkhout; it was used in the production of his book “TeX by Topic” (see question 20). The manual says of it:

Lollipop is ‘TeX made easy’. Lollipop is a macro package that functions as a toolbox for writing TeX macros. It was my intention to make macro writing so easy that implementing a fully new layout in TeX would become a matter of less than an hour for an average document, and that it would be a task that could be accomplished by someone with only a very basic training in TeX programming.

Lollipop is an attempt to make structured text formatting available for environments where previously only WYSIWYG packages could be used because adapting the layout is so much more easy with them than with traditional TeX macro packages.

The manual goes on to talk of ambitions to “capture some of the LaTeX market share”; it's a very witty package, but little sign of it taking over from LaTeX is detectable… An article about Lollipop appeared in TUGboat 13(3).

#### 14.   What is Texinfo?

Texinfo is a documentation system that uses one source file to produce both on-line information and printed output. So instead of writing two different documents, one for the on-line help and the other for a typeset manual, you need write only one document source file. When the work is revised, you need only revise one document. You can read the on-line information, known as an “Info file”, with an Info documentation-reading program. By convention, Texinfo source file names end with a .texi or .texinfo extension. You can write and format Texinfo files into Info files within GNU emacs, and read them using the emacs Info reader. If you do not have emacs, you can format Texinfo files into Info files using makeinfo and read them using info.

The Texinfo distribution, including a set of TeX macros for formatting Texinfo files is available as macros/texinfo-dist

#### 15.   If TeX is so good, how come it's free?

It's free because Knuth chose to make it so. He is nevertheless apparently happy that others should earn money by selling TeX-based services and products. While several valuable TeX-related tools and packages are offered subject to restrictions imposed by the GNU General Public Licence (‘Copyleft’), TeX itself is not subject to Copyleft.

There are commercial versions of TeX available; for some users, it's reassuring to have paid support. What is more, some of the commercial implementations have features that are not available in free versions. (The reverse is also true: some free implementations have features not available commercially.)

Usually, this article does not describe commercial versions; Question 46 lists the major vendors.

#### 16.   What is the future of TeX?

Knuth has declared that he will do no further development of TeX he will continue to fix any bugs that are reported to him (though bugs are rare). This decision was made soon after TeX version 3.0 was released; at each bug-fix release the version number acquires one more digit, so that it tends to the limit pi (at the time of writing, Knuth's latest release is version 3.14159). Knuth wants TeX to be frozen at version pi when he dies; thereafter, no further changes may be made to Knuth's source. (A similar rule is applied to MF; its version number tends to the limit e, and currently stands at 2.718.)

There are projects (some of them long-term projects: see, for example, question 132) to build substantial new macro packages based on TeX. For the even longer term, there are various projects to build a successor to TeX see questions 133 and  134.

#### 17.   What are TUG and TUGboat?

TUG is the TeX Users Group. TUGboat is TUG's main journal, containing useful articles about TeX and MF. TUG also produces a newsletter for members (TeX and TUG News), organises a yearly conference, runs training courses, sells almost all TeX-related books, and distributes TeX-related microcomputer software on disk. TUG has a Technical Council to coordinate TeX-related developments (question 19). Enquiries should be directed to:

TeX Users Group
1466 NW Front Avenue, Suite 3141
Portland, OR 97209
USA
Tel: +1 503-223-9994
Fax: +1 503-223-3960
Email: tug@mail.tug.org
Web: http://www.tug.org/
CTAN details: usergrps/tug

#### 18.   Are there nationally-based user groups, too?

The following groups publish their membership (etc.) information electronically on CTAN archives:

DANTE, Deutschsprachige Anwendervereinigung TeX e.V.
Postfach 101840
D-69008 Heidelberg
Germany
Tel: +49 06221 29766
Fax: +49 06221 167906
Email: dante@dante.de
Web: http://www.dante.de/
CTAN details: usergrps/dante

Association GUTenberg,
BP 10,
93220 Gagny principal,
France
Email: secretariat@gutenberg.eu.org
Web: http://www.gutenberg.eu.org/
CTAN details: usergrps/gut

NTG
Postbus 394, 1740AJ Schagen,
The Netherlands
Email: ntg@nic.surfnet.nl
Web: http://www.ntg.nl/
CTAN details: usergrps/ntg

UK TeX Users' Group,
Membership enquiries: c/o Dr James Foster,
School of Mathematical Sciences
University of Sussex
Falmer, Brighton BN1 9QH
United Kingdom
Tel: +44 1273 678781
Fax: +44 1273 678097
Email: j.foster@sussex.ac.uk
General enquiries: uktug-enquiries@tex.ac.uk
Web: http://uk.tug.org/uk-tug

A listing of all known groups is available as usergrps-list

#### 19.   TUG Technical Working Groups

TUG (question 17) has an autonomous Technical Council which can appoint Technical Working Groups related to the specific areas of interest to the TeX community. Each group has a chair/contact person and establishes its own working methods and membership; anyone interested in taking part should contact the group's chair person. Suggestions for new groups should be addressed to tech-council@tug.org; a list of members of the Technical Council can be found at http://tug.org/committees.html

Below is a brief list of currently active groups:

WG-92-01
TeX Extended Mathematics Font Encoding.
To create font encoding standards for Mathematical fonts used in TeX systems.

Contact: Barbara Beeton (bnb@math.ams.org)

WG-92-05
TeX Archive Guidelines.
To develop guidelines for the effective management and utilisation of major TeX archives, and to initiate communication among the maintainers of the existing archives for the purpose of coordination and synchronisation.

Contact: Sebastian Rahtz (s.rahtz@elsevier.co.uk)

WG-94-07
TeX Directory Structure.
To identify a universal directory structure for macros, fonts and other related TeX software so that recommendations can be made to all suppliers of TeX software.

The group's current set of proposals are to be found on CTAN at tds/draft-standard/tds-0.9996.

Contact: Karl Berry (kb@cs.umb.edu)

WG-94-08
DVI Driver Implementation and Standardisation Issues.
To study the issues in the requirements of DVI Drivers imposed by changing needs and technologies, and to make recommendations for implementation and standardisation of such drivers to enhance the uniformity of their use. Work will include, but not be limited to, the examination of the use, syntax, and semantics of \special{..} commands.

Contact: Michael Sofka (sofkam@rpi.edu)

WG-94-10
TeX and Linguistics.
To study and discuss the requirements for typesetting linguistics in TeX and as a means of identifying, examining, testing, and comparing macros, fonts, style files and other aids for typesetting linguistics.

Contact: Christina Thiele (cthiele@ccs.carleton.ca)

### Part C.   Documentation and Help

#### 20.   Books on TeX and its relations

While Knuth's book is the definitive reference for TeX, there are other books covering TeX:

The TeXbook
by Donald Knuth (Addison-Wesley, 1984, ISBN 0-201-13447-0, paperback ISBN 0-201-13448-9)
A Beginner's Book of TeX
by Raymond Seroul and Silvio Levy, (Springer Verlag, 1992, ISBN 0-387-97562-4)
TeX by Example: A Beginner's Guide
by Arvind Borde (Academic Press, 1992, ISBN 0-12-117650-9)
Introduction to TeX
by Norbert Schwarz (Addison-Wesley, 1989, ISBN 0-201-51141-X)
A Plain TeX Primer
by Malcolm Clark (Oxford University Press, 1993, ISBNs 0-198-53724-7 (hardback) and 0-198-53784-0 (paperback))
TeX by Topic
by Victor Eijkhout (Addison-Wesley, 1992, ISBN 0-201-56882-9)
TeX for the Beginner
by Wynter Snow (Addison-Wesley, 1992, ISBN 0-201-54799-6)
TeX for the Impatient
by Paul W. Abrahams, Karl Berry and Kathryn A. Hargreaves (Addison-Wesley, 1990, ISBN 0-201-51375-7)
TeX in Practice
by Stephan von Bechtolsheim (Springer Verlag, 1993, 4 volumes, ISBN 3-540-97296-X for the set, or Vol. 1: ISBN 0-387-97595-0, Vol. 2: ISBN 0-387-97596-9, Vol. 3: ISBN 0-387-97597-7, and Vol. 4: ISBN 0-387-97598-5)
TeX: Starting from Square One
by Michael Doob (Springer Verlag, 1993, ISBN 3-540-56441-1)
by David Salomon (Springer Verlag, 1995, ISBN 0-387-94556-3)

A collection of Knuth's publications about typography has recently been published:

Digital Typography
by Donald Knuth (CSLI and Cambridge University Press, 1999, ISBN 1-57586-011-2, paperback ISBN 1-57586-010-4).

For LaTeX, see:

LaTeX, a Document Preparation System
by Leslie Lamport (second edition, Addison Wesley, 1994, ISBN 0-201-15790-X)
A guide to LaTeX2e
Helmut Kopka and Patrick W. Daly (third edition, Addison-Wesley, 1998, ISBN 0-201-39825-7)
The LaTeX Companion
by Michel Goossens, Frank Mittelbach, and Alexander Samarin (Addison-Wesley, 1993, ISBN 0-201-54199-8)
The LaTeX Graphics Companion:
Illustrating documents with TeX and PostScript by Michel Goossens, Sebastian Rahtz and Frank Mittelbach (Addison-Wesley, 1997, ISBN 0-201-85469-4)
The LaTeX Web Companion
Integrating TeX, HTML and XML by Michel Goossens and Sebastian Rahtz (Addison-Wesley, 1999, ISBN 0-201-43311-7)
TeX Unbound:
LaTeX and TeX strategies for fonts, graphics, and more by Alan Hoenig (Oxford University Press, 1998, ISBN 0-19-509685-1 hardback, ISBN 0-19-509686-X paperback)
Math into TeX:
A Simplified Introduction using AMSLaTeX by George Grätzer (Birkhäuser, 1993, ISBN 0-817-63637-4, or, in Germany, ISBN 3-764-33637-4)
Math into LaTeX:
An Introduction to LaTeX and AMSLaTeX by George Grätzer (Birkhäuser, 1996, ISBN 0-817-63805-9)
First Steps in LaTeX
by George Grätzer (Birkhäuser, 1999, ISBN 0-8176-4132-7)
LaTeX: Line by Line:
Tips and Techniques for Document Processing by Antoni Diller (second edition, John Wiley & Sons, 1999, ISBN 0-471-97918-X)
LaTeX for Linux:
A Vade Mecum by Bernice Sacks Lipkin (Springer-Verlag, 1999, ISBN 0-387-98708-8, second printing)

A list of errata for the first printing is available from:

 http://www.springer-ny.com/catalog/np/jan99np/0-387-98708-8.html .

A sample of George Grätzer's book, in Adobe Acrobat format, is also available (info/mil/mil.pdf).

Example files for the LaTeX Graphics and Web Companions are available in info/lgc (Graphics) and info/lwc (Web). Example files for George Grätzer's ‘First Steps’ are available in info/FirstSteps

The list for MF is rather short:

The MFbook
by Donald Knuth (Addison Wesley, 1986, ISBN 0-201-13445-4, ISBN 0-201-52983-1 paperback)

Alan Hoenig's ‘TeX Unbound’ includes some discussion and examples of using MF.

This list only covers books in English: UK TUG cannot hope to maintain a list of books in languages other than our own.

#### 21.   Books on Type

The following is a partial listing of books on typography in general. Of these, Bringhurst seems to be the one most often recommended.

The Elements of Typographic Style
by Robert Bringhurst (Hartley & Marks, 1992, ISBN 0-88179-033-8)
Finer Points in the Spacing & Arrangement of Type
by Geoffrey Dowding (Hartley & Marks, 1996, ISBN 0-88179-119-9)
The Thames & Hudson Manual of Typography
by Ruari McLean (Thames & Hudson, 1980, ISBN 0-500-68022-1)
The Form of the Book
by Jan Tschichold (Lund Humphries, 1991, ISBN 0-85331-623-6)
Type & Layout
by Colin Wheildon (Strathmore Press, 1995, ISBN 0-9624891-5-8)
The Design of Books
by Adrian Wilson (Chronicle Books, 1993, ISBN 0-8118-0304-X)

There are many catalogues of type specimens but the following books provide a more interesting overall view of types in general and some of their history.

Alphabets Old & New
by Lewis F. Day (Senate, 1995, ISBN 1-85958-160-9)
An Introduction to the History of Printing Types
by Geoffrey Dowding (British Library, 1998, UK ISBN 0-7123-4563-9; USA ISBN 1-884718-44-2)
The Alphabet Abecedarium
by Richar A. Firmage (David R. Goodine, 1993, ISBN 0-87923-998-0)
The Alphabet and Elements of Lettering
by Frederick Goudy (Dover, 1963, ISBN 0-486-20792-7)
Anatomy of a Typeface
by Alexander Lawson (David R. Goodine, 1990, ISBN 0-87923-338-8)
A Tally of Types
by Stanley Morison (David R. Goodine, 1999, ISBN 1-56792-004-7)
Counterpunch
by Fred Smeijers (Hyphen, 1996, ISBN 0-907259-06-5)
Treasury of Alphabets and Lettering
by Jan Tschichold (W. W. Norton, 1992, ISBN 0-393-70197-2)

The above lists are limited to books published in English. Typographic styles are somewhat language-dependent, and similarly the ‘interesting’ fonts depend on the particular writing system involved.

Bobby Bodenheimer's article, from which the present one was developed, used to be posted (nominally monthly) to newsgroup comp.text.tex and cross-posted to newsgroups news.answers and comp.answers. The most recently posted copy of that article is kept on CTAN in directory obsolete/help; it is no longer kept in the news.answers archives.

A version of the present article may be browsed via the World-Wide Web, at URL

 http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes;

the sources of the article are available from usergrps/uktug-faq

Both the Francophone TeX usergroup Gutenberg and the Czech/Slovak usergroup CS-TUG have published translations of this FAQ, with extensions appropriate to their languages.

In addition, the German usergroup Dante posts a FAQ in German to de.comp.tex, which is archived as usergrps/dante-faq, and Marie-Paule Kluth posts a FAQ in French to fr.comp.text.tex, which is archived as help/LaTeX-FAQ-francaise

#### 23.   Where to get help

First … read any FAQ you can find. (Which is what you're doing now, isn't it?)

The tutorials and other on-line documentation can get you started but for more in-depth understanding you should get and read at least one of the many good books on the subject (question 20). The definitive source for (La)TeX is the source code itself, but that is not something to be approached lightly (if at all).

If you are seeking a particular package or program, look on your own system first: you might already have it.

If you have access to the internet, and in particular newsgroups, then (La)TeX discussions, including MF and MP, are on comp.text.tex. It is best to spend a little time familiarising yourself with the current threads before asking a question. The group is normally very responsive but asking a question that has just been answered is likely to dampen people's enthusiasm to help you. In case you are not familiar with some of the abbreviations used in newsgroup postings, RTFM*5* stands for ‘Read The … Manual’, and you don't really want to get that response, do you?

http://www.deja.com/usenet makes a good job of archiving Usenet news discussions, and comp.text.tex may be found there. If your internet access doesn't include direct access to Usenet news, you can participate in discussions via Deja.

The few people who can't use the World Wide Web, can't access Usenet news, but can use electronic mail can seek help through mailing lists.

The TeXhax digest is operated as a mailing list. Send a message ‘subscribe texhax’ to texhax-request@tex.ac.uk to join it. Its turn-around is not rapid, but questions submitted to it do eventually get answered.

Many mailing lists exist that cover some small part of the TeX arena. A good source of pointers is http://www.tug.org/

Announcements of TeX-related installations on the CTAN archives are sent to the mailing list ctan-ann. Subscribe to the list by sending a message subscribe ctan-ann <your name>' to listserv@urz.Uni-Heidelberg.de

Issues related to MF (and, increasingly, MP) are discussed on the metafont mailing list; subscribe by sending a message ‘subscribe metafont <your name>’ to listserv@ens.fr

Several other TeX-related lists may be accessed via listserv@urz.uni-heidelberg.de. Send a message containing the line ‘help’ to this address.

#### 24.   (La)TeX Tutorials

Some very fine tutorials have been written, over the years. Michael Doob's splendid ‘Gentle Introduction’ to plain TeX has been stable for a very long time. See info/gentle/gentle.pdf

More dynamic is Tobias Oetiker's ‘(Not so) Short Introduction to LaTeX2e’, which is regularly updated, as people suggest better ways of explaining things, etc. See info/lshort/english/lshort.pdf

A recent entrant is Harvey Greenberg's ‘Simplified Introduction to LaTeX’; this was written for a lecture course, and is available (PostScript only, unfortunately) as info/simplified-latex/latex.ps

#### 25.   MF and MP Tutorials

Unfortunately there appear to be no tutorials on how to use either MF or MP, except for the information provided by their respective authors. There are, though, a couple of articles on how to run the programs.

Geoffrey Tobin has provided MF for Beginners which is available as info/metafont-for-beginners.tex (question 62). This describes how the MF system works and how to avoid some of the potential pitfalls.

Peter Wilson's Some Experiences in Running MF and MP is available at info/metafp.ps (PostScript) or info/metafp.pdf (PDF format). On the MF side the article is more geared towards testing and installing new MF fonts than on the system, while on the other side it describes how to use MP illustrations in LaTeX and PDFLaTeX documents, with an emphasis on how to use appropriate fonts for any text or mathematics.

#### 26.   BibTeX Documentation

BibTeX, a program originally designed to produce bibliographies in conjunction with LaTeX, is explained in Section 4.3 and Appendix B of Leslie Lamport's LaTeX manual (see question 20). The document “BibTeXing”, contained in the file btxdoc.tex, gives a more complete description. The LaTeX Companion (see question 20) also has information on BibTeX and writing BibTeX style files.

The document “Designing BibTeX Styles”, contained in the file btxhak.tex, explains the postfix stack-based language used to write BibTeX styles (.bst files). The file btxbst.doc is the template for the four standard styles (plain, abbrv, alpha, unsrt). It also contains their documentation. The complete BibTeX documentation set (including the files above) is in support/lsedit/bibtex-doc

There is a Unix BibTeX man page in the web2c package (see question 44). Any copy you may find of a man page written in 1985 (before “BibTeXing” and “Designing BibTeX Styles” appeared) is obsolete, and should be thrown away.

#### 27.   The PiCTeX manual

PiCTeX is a set of macros by Michael Wichura for drawing diagrams and pictures. The macros are freely available in graphics/pictex; however, the PiCTeX manual itself is not free. Unfortunately, TUG is no longer able to supply copies of the manual (as it once did), and it is now available only through Personal TeX Inc, the vendors of PCTeX (http://www.pctex.com/). The manual is not available electronically.

#### 28.   Finding (La)TeX macro packages

Before you ask for a TeX macro or LaTeX class or package file to do something, try searching Graham Williams' catalogue, available as help/Catalogue/catalogue.html, or for efficient interactive searching via http://www.tex.ac.uk/tex-archive/help/Catalogue/catalogue.html; this lists many macro packages together with brief descriptive texts.

Having learnt of a file that seems interesting, search a CTAN archive for it (see question 29). For packages listed in The LaTeX Companion ( question 20), the file info/companion.ctan may be consulted as an alternative to searching the archive's index. It lists the current location in the archive of such files.

#### 29.   Finding files in the CTAN archives

To find software at a CTAN site, you can use anonymous ftp to the host with the command ‘quote site index <term>’, or the searching script at http://www.dante.de/cgi-bin/ctan-index

To get the best use out of the ftp facility you should remember that <term> is a Regular Expression and not a fixed string, and also that many files are distributed in source form with an extension different to the final file. (For example LaTeX packages are often distributed sources with extension dtx rather than as package files with extension sty.)

One should make the regular expresion general enough to find the file you are looking for, but not too general, as the ftp interface will only return the first 20 lines that match your request.

The following examples illustrate these points. To search for the LaTeX package ‘caption’, you might use the command:

quote site index caption.sty

but it will fail to find the desired package (which is distributed as caption.dtx) and does return unwanted ‘hits’ (such as hangcaption.sty). Also, although this example does not show it the ‘.’ in ‘caption.sty’ is used as the regular expression that matches any character. So

quote site index doc.sty

matches such unwanted files as language/swedish/slatex/doc2sty/makefile

Of course if you know the package is stored as .dtx you can search for that name, but in general you may not know the extension used on the archive. The solution is to add ‘/’ to the front of the package name and ‘\\.’ to the end. This will then search for a file name that consists solely of the package name between the directory separator and the extension. The two commands:

quote site index /caption\\.
quote site index /doc\\.

do narrow the search down sufficiently. (In the case of doc, a few extra files are found, but the list returned is sufficiently small to be easily inspected.)

If the search string is too wide and too many files would match, the list will be truncated to the first 20 items found. Using some knowledge of the CTAN directory tree you can usually narrow the search sufficiently. As an example suppose you wanted to find a copy of the dvips driver for MSDOS. You might use the command:

quote site index dvips

but the result would be a truncated list, not including the file you want. (If this list were not truncated 412 items would be returned!) However we can restrict the search to MSDOS related drivers as follows.

quote site index msdos.*dvips

Which just returns relevant lines such as systems/msdos/dviware/dvips/dvips5528.zip

A basic introduction to searching with regular expressions is:

• Most charcters match themselves, so "a" matches "a" etc.;

• "." matches any character;

• "[abcD-F]" matches any single character from the set {"a","b","c","D","E","F"};

• "*" placed after an expression matches zero or more occurrences so "a*" matches "a" and "aaaa", and "[a-zA-Z]*" matches a ‘word’;

• "\" ‘quotes’ a special character such as "." so "\." just matches ".";

• "^" matches the beginning of a line;

• "$" matches the end of a line. For technical reasons in the quote site index command, you need to ‘double’ any \ hence the string /caption\\. in the above example. The quote site command ignores the case of letters. Searching for caption or CAPTION would produce the same result. ### Part D. Bits and pieces of TeX #### 30. What is a DVI file? A DVI file (that is, a file with the type or extension .dvi) is TeX's main output file, using TeX in its broadest sense to include LaTeX, etc. ‘DVI’ is supposed to be an acronym for DeVice-Independent, meaning that the file can be printed on almost any kind of typographic output device. The DVI file is designed to be read by a driver (question 31) to produce further output designed specifically for a particular printer (e.g., a LaserJet) or to be used as input to a previewer for display on a computer screen. DVI files use TeX's internal coding; a TeX input file should produce the same DVI file regardless of which implementation of TeX is used to produce it. A DVI file contains all the information that is needed for printing or previewing except for the actual bitmaps or outlines of fonts, and possibly material to be introduced by means of \special commands (question 35). The canonical reference for the structure of a DVI file is the source of dvitype (systems/knuth/texware/dvitype.web). #### 31. What is a driver? A driver is a program that takes as input a dvi file (question 30) and (usually) produces a file that can be sent to a typographic output device, called a printer for short. A driver will usually be specific to a particular printer, although any PostScript printer ought to be able to print the output from a PostScript driver. As well as the DVI file, the driver needs font information. Font information may be held as bitmaps or as outlines, or simply as a set of pointers into the fonts that the printer itself ‘has’. Each driver will expect the font information in a particular form. For more information on the forms of fonts, see questions 32, 33, 34 and 65. #### 32. What are PK files? PK files (packed raster) contain font bitmaps. The output from MF (question 62) includes a generic font (GF) file and the utility gftopk produces the PK file from that. There are a lot of PK files, as one is needed for each font, that is each magnification (size) of each design (point) size for each weight for each family. Further, since the PK files for one printer do not necessarily work well for another, the whole set needs to be duplicated for each printer type at a site. As a result, they are often held in an elaborate directory structure, or in ‘font library files’, to regularise access. #### 33. What are TFM files? TFM stands for TeX font metrics, and TFM files hold information about the sizes of the characters of the font in question, and about ligatures and kerns within that font. One TFM file is needed for each font used by TeX, that is for each design (point) size for each weight for each family; one TFM file serves for all magnifications, so that there are (typically) fewer TFM files than there are PK files. The important point is that TFM files are used by TeX (LaTeX, etc.), but are not, generally, needed by the printer driver. #### 34. Virtual fonts Virtual fonts for TeX were first implemented by David Fuchs in the early days of TeX, but for most people they started when Knuth redefined the format, and wrote some support software, in 1989. Virtual fonts provide a way of telling TeX about something more complicated than just a one-to-one character mapping. The entities you define in a virtual font look like characters to TeX (they appear with their sizes in a font metric file), but the DVI processor may expand them to something quite different. You can use this facility just to remap characters, to make a composite font with glyphs drawn from several sources, or to build up an effect in arbitrarily complicated ways -- a virtual font may contain anything which is legal in a DVI file. In practice, the most common use of virtual fonts is to remap PostScript fonts (see question 67) or to build ‘fake’ maths fonts. It is important to realise that TeX itself does not see virtual fonts; for every virtual font read by the DVI driver there is a corresponding TFM file read by TeX. Virtual fonts are normally created in a single ASCII vpl (Virtual Property List) file, which includes both sets of information. The vptovf program is then used to the create the binary TFM and VF files. The commonest way (nowadays) of generating vpl files is to use the fontinst package, which is described in detail in question 67. fonts/utilities/qdtexvpl is another utility for creating ad-hoc virtual fonts. #### 35. \special commands TeX provides the means to express things that device drivers can do, but about which TeX itself knows nothing. For example, TeX itself knows nothing about how to include PostScript figures into documents, or how to set the colour of printed text; but some device drivers do. Such things are introduced to your document by means of \special commands; all that TeX does with these commands is to expand their arguments and then pass the command to the DVI file. In most cases, there are macro packages provided (often with the driver) that provide a comprehensible interface to the \special; for example, there's little point including a figure if you leave no gap for it in your text, and changing colour proves to be a particularly fraught operation that requires real wizardry. LaTeX2e has standard graphics and colour packages that make file inclusion, rotation, scaling and colour via \specials all easy. The allowable arguments of \special depend on the device driver you're using. Apart from the examples above, there are \special commands in the emTeX drivers (e.g., dvihplj, dviscr, etc.) that will draw lines at arbitrary orientations, and commands in dvitoln03 that permit the page to be set in landscape orientation. #### 36. Documented LaTeX sources (.dtx files) LaTeX2e, and many support macro packages, are now written in a literate programming style (question 53), with source and documentation in the same file. This format, known as ‘doc’, was originated by Frank Mittelbach. The documented sources conventionally have the suffix .dtx, and should normally be stripped of documentation before use with LaTeX. Alternatively you can run LaTeX on a .dtx file to produce a nicely formatted version of the documented code. An installation script (with suffix .ins) is usually provided, which needs the standard LaTeX2e docstrip package (among other things, the installation process strips all the comments that make up the documentation for speed when loading the file into a running LaTeX system). Several packages can be included in one .dtx file, with conditional sections, and there facilities for indices of macros etc. Anyone can write .dtx files; the format is explained in The LaTeX Companion (see question 20). There are no programs yet to assist in composition. .dtx files are not used by LaTeX after they have been processed to produce .sty or .cls (or whatever) files. They need not be kept with the working system; however, for many packages the .dtx file is the primary source of documentation, so you may want to keep .dtx files elsewhere. #### 37. What are the EC fonts? A font consists of a number of glyphs. In order that the glyphs may be printed, there has to be some way of accessing them; in TeX they're arranged in a numerical order called an encoding, and their number in the encoding is used. For various reasons, Knuth chose rather eccentric encodings; in particular, he chose different encodings for different fonts. When TeX version 3 arrived, some at least of the reasons for the eccentricity of Knuth's encodings went away, and at TUG's Cork meeting, an encoding for a set of 256 glyphs, for use in TeX text, was defined. The intention was that these glyphs should cover ‘most’ European languages, in the sense of including all accented letters needed. (Knuth's CMR fonts missed things necessary for Icelandic, Polish and Sami, for example, but the Cork fonts have them.) LaTeX2e (question 131) refers to the Cork encoding as T1, and provides the means to use fonts thus encoded to avoid problems with the interaction of accents and hyphenation (see question 108). The only MF-fonts that conform to the Cork encoding are the EC fonts (available as fonts/ec). They look CM-like, and are now regarded as ‘stable’ (in the same sense that the CM fonts are stable: their metrics are unlikely ever to change). Their serious disadvantage for the casual user is that they are large -- each EC font is roughly twice the size of the corresponding CM font; what's more, until corresponding fonts for mathematics are produced, the CM fonts must be retained. The EC fonts supersede the experimental DC fonts, which have now been removed from the archives. They are distributed with a set of ‘Text Companion’ (TC) fonts that provide glyphs for symbols commonly used in text. The TC fonts are encoded according to the LaTeX TS1 encoding, and are not viewed as ‘stable’ in the same way as are the EC fonts are. The Cork encoding is also implemented by the PSNFSS system (question 65), for PostScript fonts. #### 38. What is TDS? TDS stands for the TeX Directory Structure, which is a standard way of organising all the TeX-related files on a computer system. The TDS specification can be found on CTAN in tds/draft-standard/tds-0.9996 Most modern distributions conform to the TDS, which provides for both a ‘standard’ hierarchy and a ‘local’ hierarchy. The TDS reserves the name texmf as the name of the root directory (folder) of the hierachies. Files supplied as part of the distribution are put into the standard hierarchy. The location of the standard hierarchy is system dependent, but on a Unix system it might be at /usr/local/texmf, or /usr/local/share/texmf, or /opt/texmf, or a similar location, but in each case the TeX files will be under the /texmf subdirectory. There can be multiple ‘local’ hierarchies in which additional files can be put. In the extreme an installation can have a local hierarchy and each user can also have an individual local hierarchy. The location of any local hierarchy is not only system dependent but also user dependent. Again, though, all files should be put under a local /texmf directory. ### Part E. Acquiring the Software #### 39. Repositories of TeX material To aid the archiving and retrieval of of TeX-related files, a TUG working group developed the Comprehensive TeX Archive Network (CTAN). Each CTAN site has identical material, and maintains authoritative versions of its material. These collections are extensive; in particular, almost everything mentioned in this article is archived at the CTAN sites, even if its location isn't explicitly stated. The CTAN sites are currently dante.ctan.org (Mainz, Germany), cam.ctan.org (Cambridge, UK) and tug.ctan.org (Colchester, Vermont, USA). Two of the CTAN web servers offer a search facility: http://www.tex.ac.uk/search and http://www.ctan.org/search; you can look for a file whose name you already know, or you can do a keyword-based search of the catalogue. The search script requires that you choose an appropriate CTAN site or mirror to retrieve files from, and stores details of that site in a cookie on your machine. Choose a site that is close to you, to reduce network load. The organisation of TeX files on all CTAN sites is identical and starts at tex-archive/. Again, to reduce network load, please use the CTAN site or mirror closest to you. A complete and current list of CTAN sites and known mirrors can be obtained by using the finger utility on ‘user’ ctan@cam.ctan.org, ctan@dante.ctan.org or ctan@tug.ctan.org; it is also available as file CTAN.sites To find software at a CTAN site using anonymous ftp to the host, execute the command ‘quote site index <term>’ (see question 29 for details). The email servers ftpmail@dante.ctan.org and ftpmail@tug.ctan.org provide an ftp-like interface through mail. Send a message containing just the line ‘help’ to your nearest server, for details of use. There is also the DECUS TeX collection of material for VMS, Unix, MSDOS, and the Macintosh. It is available via anonymous ftp from wuarchive.wustl.edu (128.252.135.4) in decus/tex/. It can also be obtained from the DECUS Library (reference number VS0058) in the US, or through your DECUS office outside of the US. To contact the DECUS Library, send mail or telephone: DECUS LIBRARY ORDER PROCESSING 334 South Street, SHR3-1/T25 Shrewsbury, MA 01545-4195 USA Tel: 800-DECUS55 (within the USA, for information) Fax: +1 508-841-3373 (for inquiries) or send electronic mail for information to the DECUS TeX Collection Editor, Ted Nieland (nieland@ted.hcst.com). Finally, of course, the TeX user who has no access to any sort of network may buy a copy of the archive on CDROM (see question 43). #### 40. What's the CTAN nonfree tree? The CTAN archives are currently restructuring their holdings so that files that are ‘not free’ are held in a separate tree. The definition of what is ‘free’ (for this purpose) is influenced by, but not exactly the same as the Debian Free Software Guidelines (DFSG: see The Debian Social Contract). Material is placed on the nonfree tree if it is not freely-usable (e.g., if the material is shareware, commercial, or if its usage is not permitted in certain domains at all, or without payment). Users of the archive should check that they are entitled to use material they have retrieved from the nonfree tree. For details of the licence categories, see  http://www.tex.ac.uk/tex-archive/help/Catalogue/licenses.html . #### 41. Contributing a file to the archives Use anonymous ftp to any CTAN archive (see question 39) and retrieve the file README.uploads in the root directory. It contains instructions for uploading files and notifying the appropriate people for that site. If you cannot use ftp, mail your contribution to ctan@urz.Uni-Heidelberg.de and it will be passed along. You will make everyone's life easier if you choose a descriptive and unique name for your submission, so it's probably a good idea to check that your style file's name is not already in use by means of the ‘site index’ command (question 29). #### 42. Finding new fonts A comprehensive list of MF fonts is posted to comp.fonts and to comp.text.tex, roughly every six weeks, by Lee Quin (lee@sq.sq.com); it is available as info/metafont-list The list contains details both of commercial fonts and of fonts available via anonymous ftp. Most of the fonts are available via anonymous ftp from the CTAN archives (see question 39). #### 43. TeX CDROMs If you don't have access to the Internet, there are obvious attractions to TeX collections on a CDROM. Even those with net access will find large quantities of TeX-related files to hand a great convenience. Ready-to-run TeX systems on CDROM are available: • A consortium of User Groups (notably TUG, UK TUG and GUTenberg) distribute the TeX Live CDROM, now in its third edition. All members of several User Groups are receiving copies, and additional copies may be purchased, for example, from UK TUG for £25, including an edition of Baskerville which serves as a manual. On-line details of TeX Live are available at http://www.tug.org/texlive.html • The Dutch TeX Users Group (NTG) publish the whole 4AllTeX workbench on a 2-CDROM set packed with all the MSDOS TeX software, macros and fonts you can want. It is available from NTG direct (see question 18), from TUG for$40 and from UK TUG for £30 (a manual is included). It is a useful resource for anyone to browse, not just for MSDOS users.

An alternative to the ready-to-run system is the CTAN archive snapshot; in general one would expect that such systems would be harder to use, but that the volume of resources offered would balance this extra inconvenience.

Walnut Creek CDROM provide a two-disc CDROM set, holding 1000Mb of TeX-related material. Information about the CDROM is available at

 http://www.cdrom.com/titles/prog/tex.html,

which also has a link to an ordering page. Walnut Creek's address, etc., are:

Walnut Creek CDROM
4041 Pike Lane, Ste D-www
Concord, CA 94520
USA
Tel: +1 510 674-0783 or
800 786-9907 (within the USA and Canada)
Fax: +1 510 674-0821
Email: info@cdrom.com (for questions) and
orders@cdrom.com (for orders)

Walnut Creek (who run one of the major CTAN mirrors) are rumoured to be producing a new release of their disc set in 1997.

Prime Time Freeware produced TeXcetera 1.1 in July 1994, which was a snapshot of CTAN taken in June 1994. Regular updates were planned (but have not apparently been forthcoming). The material is all compressed in ZIP format to fit it all on one CD, and to avoid the limitations of the ISO 9660 file system directory. You can buy the CD from:

Prime Time Freeware
370 Altair Way, Suite 150
Sunnyvale CA 94086
USA
Tel: +1 408 433 9662
Fax: +1 408 433 0727
Email: ptf@cfcl.com


• delete its last line, which just says "s" (line 84 in the version on CTAN).

Finally, change your \bibliographystyle command to refer to the name of the new file.

This technique applies equally to any bibliography style: the same change can be made to any similar output.nonnull function.

If you're reluctant to make this sort of change, the only way forward is to take the entry out of the database, so that you don't encounter BibTeX's limit, but you may need to retain the entry because it will be included in the typeset document. In such cases, put the body of the entry in a separate file:

@article{long.boring,
author =    "Fred Verbose",
...
abstract =  "{\input{abstracts/long.tex}}"
}

In this way, you arrange that all BibTeX has to deal with is the file name, though it will tell TeX (when appropriate) to include all the long text.

### Part Q.   Why does it do that?

#### 121.   What's going on in my \include commands?

The original LaTeX provided the \include command to address the problem of long documents: with the relatively slow computers of the time, the companion \includeonly facility was a boon. With the vast increase in computer speed, \includeonly is less valuable (though it still has its place in some very large projects). Nevertheless, the facility is retained in current LaTeX, and causes some confusion to those who misunderstand it.

In order for \includeonly to work, \include makes a separate .aux file for each included file, and makes a ‘checkpoint’ of important parameters (such as page, figure, table and footnote numbers); as a direct result, it must clear the current page both before and after the \include command. What's more, this mechanism doesn't work if a \include command appears in a file that was \included itself: LaTeX diagnoses this as an error.

• Why does LaTeX throw a page before and after \include commands?

Answer: because it has to. If you don't like it, replace the \include command with \input  -- you won't be able to use \includeonly any more, but you probably don't need it anyway, so don't worry.

• Why can't I nest \included files?  -- I always used to be able to under LaTeX 2.09.

Answer: in fact, you couldn't, even under LaTeX 2.09, but the failure wasn't diagnosed. However, since you were happy with the behaviour under LaTeX 2.09, replace the \include commands with \input commands (with \clearpage as appropriate).

#### 122.   Why does it ignore paragraph parameters?

When TeX is laying out text, it doesn't work from word to word, or from line to line; the smallest complete unit it formats is the paragraph. The paragraph is laid down in a buffer, as it appears, and isn't touched further until the end-paragraph marker is processed. It's at this point that the paragraph parameters have effect; and it's because of this sequence that one often makes mistakes that lead to the paragraph parameters not doing what one would have hoped (or expected).

Consider the following sequence of LaTeX:

{\raggedright % declaration for ragged text
Here's text to be ranged left in our output,
but it's the only such paragraph, so we now
end the group.}

Here's more that needn't be ragged...

TeX will open a group, and set the ragged-setting parameters within that group; it will then save a couple of sentences of text and close the group (thus restoring the previous value of the ragged-setting parameters). Then it encounters a blank line, which it knows to treat as a \par token, so it typesets the two sentences; but because the enclosing group has now been closed, the parameter settings have been lost, and the paragraph will be typeset normally.

The solution is simple: close the paragraph inside the group, so that the setting parameters remain in place. An appropriate way of doing that is to replace the last three lines above with:

end the group.\par}
Here's more that needn't be ragged...

In this way, the paragraph is completed while the setting parameters are still in force within the enclosing group.

Another alternative is to define an environment that does the appropriate job for you. For the above example, LaTeX already defines an appropriate one:

\begin{flushleft}
Here's text to be ranged left...
\end{flushleft}

#### 123.   What's the reason for ‘protection’?

Sometimes LaTeX saves data it will reread later. These data are often the argument of some command; they are the so-called moving arguments. (‘Moving’ because data are moved around.) Places to look for are all arguments that may go into table of contents, list of figures, etc.; namely, data that are written to an auxiliary file and read in later. Other places are those data that might appear in head- or footlines. Section headers and figure captions are the most prominent examples; there's a complete list in Lamport's book (see question 20).

What's going on really, behind the scenes? The commands in the moving arguments are already expanded to their internal structure during the process of saving. Sometimes this expansion results in invalid TeX code when processed again. “\protect\cmd” tells LaTeX to save \cmd as \cmd, without expansion.

What is a ‘fragile command’? It's a command that expands into illegal TeX code during the save process.

What is a ‘robust command’? It's a command that expands into legal TeX code during the save process.

No-one (of course) likes this situation; the LaTeX3 team have removed the need for protection of some things in the production of LaTeX2e, but the techniques available to them within current LaTeX mean that this is an expensive exercise. It remains a long-term aim of the team to remove all need for these things.

#### 124.   Why doesn't \verb work within…?

The LaTeX verbatim commands work by changing category codes. Knuth says of this sort of thing “Some care is needed to get the timing right…”, since once the category code has been assigned to a character, it doesn't change. So \verb has to assume that it is getting the first look at its parameter text; if it isn't, TeX has already assigned category codes so that \verb doesn't have a chance. For example:

\verb+\error+

will work (typesetting ‘\error’), but

\newcommand{\unbrace}[1]{#1}
\unbrace{\verb+\error+}

will not (it will attempt to execute \error). Other errors one may encounter are ‘\verb ended by end of line’, or even ‘\verb illegal in command argument’.

This is why the LaTeX book insists that verbatim commands must not appear in the argument of any other command; they aren't just fragile, they're quite unusable in any command parameter, regardless of \protection (question 123).

#### 125.   Case-changing oddities

TeX provides two primitive commands \uppercase and \lowercase to change the case of text; they're not much used, but are capable creating confusion.

The two commands do not expand the text that is their parameter  -- the result of \uppercase{abc} is ‘ABC’, but \uppercase{\abc} is always ‘\abc’, whatever the meaning of \abc. The commands are simply interpreting a table of equivalences between upper- and lowercase characters. They have (for example) no mathematical sense, and

\uppercase{About $y=f(x)$}

will produce

ABOUT $Y=F(X)$

which is probably not what is wanted.

In addition, \uppercase and \lowercase do not deal very well with non-American characters, for example \uppercase{\ae} is the same as \ae.

LaTeX provides commands \MakeUppercase and \MakeLowercase which fixes the latter problem. These commands are used in the standard classes to produce upper case running heads for chapters and sections.

Unfortunately \MakeUppercase and \MakeLowercase do not solve the other problems with \uppercase, so for example a section title containing \begin{tabular}\end{tabular} will produce a running head containing \begin{TABULAR}. The simplest solution to this problem is using a user-defined command, for example:

\newcommand{\mytable}{\begin{tabular}...
\end{tabular}}
\section{A section title \protect\mytable{}
with a table}

Note that \mytable has to be protected, otherwise it will be expanded and made upper case.

#### 126.   Why are # signs doubled in macros?

The way to think of this is that ## gets replaced by # in just the same way that #1 gets replaced by ‘whatever is the first argument’.

So if you define a macro and use it as:

\def\a#1{+++#1+++#1+++#1+++}  \a{b}

the macro expansion produces ‘+++b+++b+++b+++’, which people find normal. However, if we now replace part of the macro:

\def\a#1{+++#1+++\def\x #1{xxx#1}}

\a{b} will expand to ‘+++b+++\def\x b{xxxb}’. This defines \x to be a macro delimited by b, and taking no arguments, which people may find strange, even though it is just a specialisation of the example above. If you want \a to define \x to be a macro with one argument, you need to write:

\def\a#1{+++#1+++\def\x ##1{xxx##1}}

and \a{b} will expand to ‘+++b+++\def\x #1{xxx#1}’, because #1 gets replaced by ‘b’ and ## gets replaced by #.

To nest a definition inside a definition inside a definition then you need ####1, as at each stage ## is replaced by #. At the next level you need 8 #s each time, and so on.

#### 127.   Why does LaTeX split footnotes across pages?

LaTeX splits footnotes when it can think of nothing better to do. Typically, when this happens, the footnote mark is at the bottom of the page, and the complete footnote would overfill the page. LaTeX could try to salvage this problem by making the page short of both the footnote and the line with the footnote mark, but its priorities told it that splitting the footnote would be preferable.

As always, the best solution is to change your text so that the problem doesn't occur in the first place. Consider whether the text that bears the footnote could move earlier in the current page, or on to the next page.

If this isn't possible, you might want to change LaTeX's perception of its priorities: they're controlled by \interfootnotelinepenalty  -- the larger it is, the less willing LaTeX is to split footnotes.

Setting

\interfootnotelinepenalty=10000

inhibits split footnotes altogether, which will cause ‘Underfull \vbox’ messages unless you also specify \raggedbottom. The default value of the penalty is 100, which is rather mild.

An alternative technique is to juggle with the actual size of the pages. \enlargethispage changes the size of the current page by its argument (for example, you might say \enlargethispage{\baselineskip} to add a single line to the page, but you can use any ordinary TeX length such as 15mm or -20pt as argument). Reducing the size of the current page could force the offending text to the next page; increasing the size of the page may allow the footnote to be included in its entirety. It may be necessary to change the size of more than one page.

#### 128.   Getting \marginpar on the right side

In twoside documents, LaTeX makes stirling attempts to put \marginpars in the correct margin (the outer or the gutter margin, according to the user's command). However, a booby-trap arises because TeX runs its page maker asynchronously. If a \marginpar is processed while page n is being being built, but doesn't get used until page n+1, then the \marginpar will turn up on the wrong side of the page.

The solution to the problem is for LaTeX to ‘remember’ which side of the page each \marginpar should be on. The package macros/latex/contrib/supported/mparhack does this, using marks stored in the .aux file.

#### 129.   Why does PiCTeX run out of ‘\dimen’s?

PiCTeX uses a lot of TeX's counter and length registers. Since TeX only has 256 of each, it's therefore often impossible to load PiCTeX.

The ConTeXt modules m-pictex.tex (for plain TeX and variants) or m-pictex.sty (for LaTeX both files are available from macros/context-tmf). m-pictex.tex provides an ingenious solution to the problem based on hacking the code of \newdimen itself.

An alternative is Andreas Schrell's pictexwd packages (from graphics/pictex-addon, which replaces PiCTeX itself and simply uses less registers.

#### 130.   Why won't LaTeX ‘fixed’ names stay changed?

LaTeX has many commands that define the names that are used for common functions in document  -- for example, \chaptername, \figurename, and so on. These names allow users to adjust the appearance of their documents, most notably when the document itself is being written in a language other than LaTeX's default English.

The babel package, of course, uses this mechanism extensively, setting up a new set of names whenever the user declares that the current language is changing. However, babel's defaults are not to everyone's liking, so users often want to change names after they've loaded babel.

The simplest approach:

\usepackage[frenchb]{babel}
\renewcommand{\refname}{Bibliographie}

doesn't work: babel actually performs its \selectlanguage operation at the start of the document, and so the \renewcommand is lost. For a single-language document, the sequence:

\usepackage[frenchb]{babel}
\AtBeginDocument{%
\renewcommand{\refname}{Bibliographie}%
}

will overcome this problem, but this solution is not stable  -- if the document later becomes a multi-language one, the original version of \refname will be restored every time the language switches back to French. The solution is to use the babel command \addto, as follows:

\usepackage[frenchb]{babel}
\renewcommand{\refname}{Bibliographie}%
}

This last code will establish the new name for use at every change of to the language, and is the recommended way for defining new names. The \captionsfrenchb shown above is an example: in general the name to use is \captions<your language>, where <your language> is the language option given to babel in the first place.

### Part R.   Current TeX Projects

#### 131.   LaTeX2e (the ‘new’ standard LaTeX)

LaTeX2e is the version of LaTeX prepared and supported by the LaTeX3 project team (question 132). With the advent of LaTeX2e, users gained a formal support structure, and the knowledge that bug fixes would be incorporated into the distribution on a fairly regular basis (new releases appear at approximately 6-month intervals).

LaTeX2e is so structured that significant enhancements may be added using macro add-ons, rather than by the different TeX formats that were the bane of the LaTeX 2.09 world.

LaTeX2e is upwardly compatible with LaTeX 2.09, but has new features. In the latest (June 1999) release, these include:

• The font selection scheme is different (based on the ‘New Font Selection Scheme’ (NFSS) described by Frank Mittelbach and Rainer Schöpf in TUGboat 10(2). The NFSS the user may select a font by specifying an array of required properties (such as size, weight and series); commands that provide the LaTeX 2.09 syntax remain.

• SliTeX is now merely a different document class, so that there is no longer a need for a separate format.

• Better control of floating environments, such as figures.

• There is a documented interface for package and class writers (though not yet for designers).

• The box commands have been enhanced, with e.g., options to specify the height of a minipage.

• Several standard commands are no longer fragile (question 123); they can therefore be included in the argument of commands such as \caption without being protected.

• \newcommand can define commands with one optional argument; such commands are automatically robust; there is also a separate command to define robust commands.

• There are standard packages for graphics inclusion and colour typesetting.

• There is standard support for typesetting in cyrillic.

#### 132.   The LaTeX3 project

The LaTeX3 project team (see http://www.latex-project.org/latex3.html) is a small group of volunteers whose aim is to produce a major new document processing system based on the principles pioneered by Leslie Lamport in the current LaTeX. It will remain freely available and it will be fully documented at all levels.

The LaTeX3 team's first product, LaTeX2e (question 131), was delivered in 1994, and the team undertakes its maintenance.

#### 133.   The Omega project

Omega (Omega) is a program built as an extension of the TeX sources which works internally with 16-bit characters (Unicode); this allows it to work with most scripts in the world with much reduced coding scheme complications. Omega also has a powerful concept of input and output filters to allow the user to work with existing transliteration schemes, etc. Omega is an ongoing project by John Plaice (plaice@cse.unsw.edu.au) and Yannis Haralambous (Yannis.Haralambous@univ-lille1.fr). An email discussion list is available: subscribe by sending a message ‘subscribe omega <your name>’ to listserv@ens.fr

The base distribution of Omega was released in November 1996; it is available via systems/omega

Implementations of Omega are available as part of the teTeX, mikTeX, fpTeX and CMacTeX distributions (Qref{}{TeX-systems}).

#### 134.   The NTS project

The NTS project first saw the light of day at the Hamburg meeting of DANTE during 1992, as a response to an aspiration to produce something even better than TeX. The project is not simply enhancing TeX, for two reasons: first, that TeX itself has been frozen by Knuth (see question 16), and second, even if they were allowed to develop the program, some members of the NTS team feel that TeX in its present form is simply unsuited to further development. While all those involved in the project are involved with, and committed to, TeX, they recognise that the end product may very well have little in common with TeX other than its philosophy.

Initially, and despite the reservations expressed at the inaugural meeting, the group is concentrating on extending TeX per se: members are implementing extensions and enhancements to TeX through the standard medium of a change-file. These extensions and enhancements, together with TeX proper, form a system called eTeX, which is 100% compatible with TeX furthermore, it is possible during format creation to construct a format that is TeX: no extensions or enhancements are present.

The final aim of the project will be to produce an entirely new typesetting system, building on the experience gained in the earlier phases. This system is intended to provide a stable basis for typesetting in the future, in the way that TeX has since it was first offered to the world.

A distribution of eTeX was made available in November 1996. It is available via systems/e-tex; eTeX is also distributed on the TeX Live CDROM (see question 43).

#### 135.   The PDFTeX project

PDFTeX (formerly known as TeX2PDF) arose from Han The Thanh's post-graduate research at Masaryk University, Brno, Czech Republic. The basic idea is very simple: to provide a version of TeX that can output PDF as an alternative format to DVI. PDFTeX implements a small number of new primitives, to switch to PDF output, and to control various PDF features. Han The Thanh is continuing work on the project; the latest version is available from systems/pdftex, and a version was distributed on the TeX Live CDROM (see question 43).

### Part S.   Perhaps There isn't an Answer

#### 136.   What to do if you find a bug

For a start, make entirely sure you have found a bug. Double-check with books about TeX, LaTeX, or whatever you're using; compare what you're seeing against the other answers above; ask every possible person you know who has any TeX-related expertise. The reasons for all this caution are various.

If you've found a bug in TeX itself, you're a rare animal indeed. Don Knuth is so sure of the quality of his code that he offers real money prizes to finders of bugs; the cheques he writes are such rare items that they are seldom cashed. If you think you have found a genuine fault in TeX itself (or MF, or the CM fonts, or the TeXbook), don't immediately write to Knuth, however. He only looks at bugs once or twice a year, and even then only after they are agreed as bugs by a small vetting team. In the first instance, contact Barbara Beeton at the AMS (bnb@math.ams.org), or contact TUG (question 17).

If you've found a bug in LaTeX2e, look in the bugs database to see if it's already been reported. If not you should submit details of the bug to the LaTeX3 team. To do this, you should process the file latexbug.tex with LaTeX (the file is part of the LaTeX2e distribution. The process will give you instructions about what to do with your bug report (it can, for example, be sent to the team by email). Please be sparing of the team's time; they're doing work for the good of the whole LaTeX community, and any time they spend tracking down non-bugs is time not available to write or debug new code. Details of the whole process, and an interface to the database, are available via http://www.latex-project.org/help.html

If you've found a bug in LaTeX 2.09, or some other such unsupported software, there's not a lot you can do about it. You may find help or de facto support on a newsgroup such as comp.tex.tex or on a mailing list such as texhax@tex.ac.uk, but posting non-bugs to any of these forums can lay you open to ridicule! Otherwise you need to go out and find yourself a willing TeX-consultant  -- TUG maintains a register of TeX consultants (see http://www.tug.org/consultants.html).

### Footnotes

1. * For 1998-99: Peter Abbott, Kaveh Bazargan, Malcolm Clark, Roy Everett, James Foster, David Hardy, Hong Ji, Phil Molyneux, John Palmer, Kim Roberts, Philip Taylor and Dominik Wujastyk.
2. * Usenet, as its name implies, is a means of using some sort of network; in the earliest days the network was made by stringing together a series of telephone lines, but nowadays Usenet is most often carried over the Internet
3. * ‘Full stop’ (British English)==‘period’ (American English)
4. * PDFLaTeX cannot normally handle PostScript inclusions
5. * The F stands for ‘Fill in the blank’
6. * The command_name is symbolically linked to virmf, and virmf loads command_name.base
7. * Note that the file name may be transmuted by such operating systems as MSDOS, which don't permit long file names
8. * Re-worded for the GELLMU edition
9. * The fonts acquired their label ‘Almost’ following the realisation that their first implementation in MF79 still wasn't quite right; Knuth's original intention had been that they were the final answer