TeX Frequently Asked Questions

# Welcome to the UK List of
TeX Frequently Asked Questions

## Introduction

This is a set of Frequently Asked Questions (FAQ) for English-speaking users of TeX. The questions answered here cover a wide range of topics, but the actual typesetting issues are mostly covered from the viewpoint of a LaTeX user.

You may use the FAQ

- by reading a printed document,
- by viewing a PDF file, with hyperlinks to assist browsing: copies are available formatted for printing on A4 paper or on North American “letter” paper, or
- by using the FAQ’s web interface (base URL: http://www.tex.ac.uk/faq); this version provides simple search capabilities, as well as a link to Google for a more sophisticated search restricted to the FAQ itself, or
- via Scott Pakin’s Visual FAQ.

Unless otherwise specified, all files mentioned in this FAQ are available from a CTAN archive, or from a mirror of CTAN — see later discussion of the CTAN archives and how to retrieve files from them. If you don’t have access to the internet, the TeX Live distribution offers off-line snapshots of the archives.

The reader should also note that the first directory name of the path name of every file on CTAN is omitted from what follows, for the simple reason that, while it’s always the same (tex-archive/) on the main sites, mirror sites often choose something else.

To avoid confusion, we also omit the full stop from the end of any sentence whose last item is a path name (such sentences are rare, and 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!

Origins

The FAQ was originated by the Committee of the UK TeX Users’ Group (UK TUG) as a development of a regular posting to the Usenet newsgroup comp.text.tex that was maintained for some time by Bobby Bodenheimer. The first UK version was much re-arranged and corrected from the original, and little of Bodenheimer’s work now remains.

The following people (at least — there are almost certainly others whose names weren’t correctly recorded) have contributed help or advice on the development of the FAQ: Donald Arseneau, Rosemary Bailey, Barbara Beeton, Karl Berry, Giuseppe Bilotta, Charles Cameron, François Charette, Damian Cugley, Michael Dewey, Michael Downes, Jean-Pierre Drucbert, Michael Ernst, Thomas Esser, Ulrike Fischer, Anthony Goreham, Norman Gray, Eitan Gurari, William Hammond, John Harper, John Hammond, Troy Henderson, Hartmut Henkel, Stephan Hennig, John Hobby, Morten Høgholm, Berthold Horn, Ian Hutchinson, Werner Icking, William Ingram, Alan Jeffrey, Regnor Jernsletten, David Kastrup, Oleg Katsitadze, Isaac Khabaza, Ulrich Klauer, Markus Kohm, Stefan Kottwitz David Kraus, Ryszard Kubiak, Simon Law, Daniel Luecking, Aditya Mahajan, Sanjoy Mahajan, Andreas Matthias, Brooks Moses, Iain Murray, Vilar Camara Neto, Dick Nickalls, Ted Nieland, Hans Nordhaug, Pat Rau, Heiko Oberdiek, Piet van Oostrum, Scott Pakin, Oren Patashnik, Manuel Pégourié-Gonnard, Steve Peter, Sebastian Rahtz, Philip Ratcliffe, Chris Rowley, José Carlos Santos, Walter Schmidt, Hans-Peter Schröcker, Joachim Schrod, Maarten Sneep, Axel Sommerfeldt, Philipp Stephani, James Szinger, Ulrik Vieth, Mike Vulis, Chris Walker, Peter Wilson, Joseph Wright, Rick Zaccone and Reinhard Zierke.

### The Background

- What is TeX?
- How should I pronounce “TeX”?
- What is Metafont?
- What is MetaPost?
- Things with “TeX” in the name
- How can I be sure it’s really TeX?
- Are TeX and friends Y2K compliant?
- What is e-TeX?
- What is PDFTeX?
- What is LaTeX?
- What is LaTeX2e?
- How should I pronounce “LaTeX(2e)”?
- Should I use Plain TeX or LaTeX?
- How does LaTeX relate to Plain TeX?
- What is ConTeXt?
- What are the AMS packages (AMSTeX, etc.)?
- What is Eplain?
- What is Lollipop?
- What is Texinfo?
- If TeX is so good, how come it’s free?
- What is the future of TeX?
- Reading (La)TeX files
- Why is TeX not a WYSIWYG system?
- TeX User Groups

### Documentation and Help

- Books on TeX and its relations
- Books on Type
- Where to find FAQs
- How to get help
- Specialist mailing lists
- How to ask a question
- How to make a “minimum example”
- (La)TeX Tutorials, etc.
- Online introductions: Plain TeX
- Online introductions: LaTeX
- Specialised (La)TeX tutorials
- Reference documents
- WIKI pages for TeX and friends
- Typography tutorials
- Directories of (La)TeX information
- Freely available (La)TeX books
- Documentation of packages
- Learning to write LaTeX classes and packages
- Metafont and MetaPost Tutorials
- BibTeX Documentation
- Where can I find the symbol for …
- The PicTeX manual

### Bits and pieces of (La)TeX

- What is a DVI file?
- What is a DVI driver?
- What are PK files?
- What are TFM files?
- Virtual fonts
- What are (TeX) macros
- `\``special` commands
- How does hyphenation work in TeX?
- What are LaTeX classes and packages?
- Documented LaTeX sources (`.dtx` files)
- What are encodings?
- What are the EC fonts?
- What is the TDS?
- What is “Encapsulated PostScript” (“EPS”)?
- Adobe font formats
- What are “resolutions”?
- What is the “Berry naming scheme”?

### Acquiring the Software

- Repositories of TeX material
- Ready-built installation files on the archive
- What is the CTAN `nonfree` tree?
- Contributing a file to the archives
- Finding (La)TeX files
- Finding new fonts
- The TeX collection

### TeX Systems

- (La)TeX for different machines
- TeX-friendly editors and shells
- Commercial TeX implementations

### DVI Drivers and Previewers

- DVI to PostScript conversion programs
- DVI drivers for HP LaserJet
- Output to “other” printers
- DVI previewers
- Generating bitmaps from DVI

### Support Packages for TeX

- (La)TeX-friendly drawing packages
- TeXCAD, a drawing package for LaTeX
- Spelling checkers for work with TeX
- How many words have you written?

### Literate programming

- What is Literate Programming?
- WEB systems for various languages

### Format conversions

- Conversion from (La)TeX to plain text
- Conversion from SGML or HTML to TeX
- Conversion from (La)TeX to HTML
- Other conversions to and from (La)TeX
- Using TeX to read SGML or XML directly
- Retrieving (La)TeX from DVI, etc.
- Translating LaTeX to Plain TeX

### Installing (La)TeX files

- Installing things on a (La)TeX system
- Finding packages to install
- Unpacking LaTeX packages
- Generating package documentation
- Installing files “where (La)TeX can find them”
- Which tree to use
- Where to install packages
- Tidying up after installation
- Shortcuts to installing files
- Installation using MiKTeX package manager
- Installing using ready-built ZIP files
- “Temporary” installation of (La)TeX files
- “Private” installations of files
- Installing a new font
- Installing a font provided as Metafont source
- Installing a PostScript printer built-in font
- Preparing a Type 1 font
- Installing a Type 1 font
- Installing the Type 1 versions of the CM fonts

### Fonts

#### Metafont fonts

- Getting Metafont to do what you want
- Which font files should be kept
- Acquiring bitmap fonts

#### Adobe Type 1 (“PostScript”) fonts

- Using PostScript fonts with TeX
- Previewing files using Type 1 fonts
- TeX font metric files for PostScript fonts
- Deploying Type 1 fonts
- Choice of scalable outline fonts
- Weird characters in dvips output

#### Macros for using fonts

- Using non-standard fonts in Plain TeX

#### Particular font families

- Using the “Concrete” fonts
- Using the Latin Modern fonts

### Hypertext and PDF

- Making hypertext documents from TeX
- Making Acrobat PDF documents from (La)TeX
- Quality of PDF from PostScript
- The wrong type of fonts in PDF
- Fuzzy fonts because Ghostscript too old
- Fonts go fuzzy when you switch to T1
- Characters missing from PDF output
- Finding ‘8-bit’ Type 1 fonts
- Replacing Type 3 fonts in PostScript
- Hyperref and repeated page numbers
- Searching PDF files

### Graphics

- Importing graphics into (La)TeX documents
- Imported graphics in dvips
- Imported graphics in PDFLaTeX
- Imported graphics in dvipdfm
- “Modern” graphics file names
- Importing graphics from “somewhere else”
- Portable imported graphics
- Repeated graphics in a document
- Limit the width of imported graphics
- Top-aligning imported graphics
- Displaying MetaPost output in ghostscript
- Drawing with TeX
- Drawing Feynman diagrams in LaTeX
- Labelling graphics

### Bibliographies and citations

#### Creating bibliographies

- Creating a BibTeX bibliography file
- Creating a bibliography style
- Capitalisation in BibTeX
- Accents in bibliographies
- ‘String too long’ in BibTeX
- BibTeX doesn’t understand lists of names
- URLs in BibTeX bibliographies
- Using BibTeX with Plain TeX
- Reconstructing `.bib` files
- BibTeX sorting and name prefixes
- ‘Multi-letter’ initials in BibTeX

#### Creating citations

- “Normal” use of BibTeX from LaTeX
- Choosing a bibliography style
- Separate bibliographies per chapter?
- Multiple bibliographies?
- Putting bibliography entries in text
- Sorting and compressing citations
- Multiple citations
- References from the bibliography to the citation
- Sorting lists of citations
- Reducing spacing in the bibliography
- Table of contents rearranges “unsrt” ordering
- Non-english bibliographies
- Format of numbers in the bibliography

#### Manipulating whole bibliographies

- Listing all your BibTeX entries
- Making HTML of your Bibliography

### Adjusting the typesetting

#### Alternative document classes

- Replacing the standard classes
- Producing slides
- Creating posters with LaTeX
- Formatting a thesis in LaTeX
- Setting papers for journals
- A ‘report’ from lots of ‘article’s
- Curriculum Vitae (Résumé)
- Letters and the like
- Other “document font” sizes?

#### Document structure

- The style of document titles
- The style of section headings
- Appendixes
- Indent after section headings
- How to create a `\``subsubsubsection`
- The style of captions
- Alternative head- and footlines in LaTeX
- Wide figures in two-column documents
- 1-column abstract in 2-column document
- Really blank pages between chapters
- Balancing columns at the end of a document
- My section title is too wide for the page header
- Page numbering “<n> of <m>”
- Page numbering by chapter

#### Page layout

- The size of printed output
- Adobe Reader messing with print size
- Getting the right paper geometry from (La)TeX
- Changing the margins in LaTeX
- Packages to set up page designs
- How to set up page layout “by hand”
- Changing margins “on the fly”
- How to get rid of page numbers
- How to create crop marks
- ‘Watermarks’ on every page
- Typesetting things in landscape orientation
- Putting things at fixed positions on the page
- Preventing page breaks between lines
- Parallel setting of text
- Typesetting epigraphs

#### Spacing of characters and lines

- Double-spaced documents in LaTeX
- Changing the space between letters
- Setting text ragged right
- Cancelling `\``ragged` commands

#### Typesetting specialities

- Including a file verbatim in LaTeX
- Including line numbers in typeset output
- Code listings in LaTeX
- Typesetting pseudocode in LaTeX
- Generating an index in (La)TeX
- Typesetting URLs
- Typesetting music in TeX
- Zero paragraph indent
- Big letters at the start of a paragraph
- The comma as a decimal separator
- Breaking boxes of text
- Overstriking characters
- Realistic quotes for verbatim listings
- Printing the time
- Redefining counters’ `\``the-`commands

#### Tables of contents and indexes

- The format of the Table of Contents, etc.
- Unnumbered sections in the Table of Contents
- Bibliography, index, etc., in TOC
- Table of contents, etc., per chapter
- Multiple indexes

#### Labels and references

- Referring to things by their name
- Referring to labels in other documents

### How do I do…?

#### Mathematics

- Proof environment
- Theorem bodies printed in a roman font
- Defining a new log-like function in LaTeX
- Set specifications and Dirac brackets
- Cancelling terms in maths expressions
- Adjusting maths font sizes
- Ellipses
- Sub- and superscript positioning for operators
- Text inside maths
- Re-using an equation
- Line-breaking in in-line maths
- Numbers for referenced equations only

#### Lists

- Fancy enumeration lists
- How to adjust list spacing
- Interrupting enumerated lists

#### Tables, figures and diagrams

- The design of tables
- Fixed-width tables
- Variable-width columns in tables
- Spacing lines in tables
- Tables longer than a single page
- How to alter the alignment of tabular cells
- The thickness of rules in LaTeX tables
- Flowing text around figures
- Diagonal separation in corner cells of tables
- How to change a whole row of a table
- Merging cells in a column of a table

#### Floating tables, figures, etc.

- Floats on their own on float pages
- Extra vertical space in floats
- Centring a very wide figure or table
- Placing two-column floats at bottom of page
- Floats in multicolumn setting
- Facing floats on 2-page spread
- Vertical layout of float pages
- Figure (or table) exactly where I want it

#### Footnotes

- Footnotes in tables
- Footnotes in LaTeX section headings
- Footnotes in captions
- Footnotes whose texts are identical
- More than one sequence of footnotes
- Footnotes numbered “per page”
- Not resetting footnote numbers per chapter

#### Document management

- What’s the name of this file
- All the files used by this document
- Marking changed parts of your document
- Conditional compilation and “comments”
- Bits of document from other directories
- Version control using RCS, CVS or the like
- Makefiles for LaTeX documents
- How many pages are there in my document?
- Including Plain TeX files in LaTeX

#### Hyphenation

- My words aren’t being hyphenated
- Weird hyphenation of words
- (Merely) peculiar hyphenation
- Accented words aren’t hyphenated
- Using a new language with Babel
- Stopping all hyphenation
- Preventing hyphenation of a particular word
- Hyphenation exceptions

#### Odds and ends

- Typesetting all those TeX-related logos
- How to do bold-tt or bold-sc
- Automatic sizing of `minipage`

### Symbols, etc.

- Using symbols
- Symbols for the number sets
- Better script fonts for maths
- Setting bold Greek letters in LaTeX
- The Principal Value Integral symbol
- How to use the underscore character
- How to type an ‘@’ sign?
- Typesetting the Euro sign
- How to get copyright, trademark, etc.
- Using “old-style” figures

### Macro programming

#### “Generic” macros and techniques

- Non-letters in macro names
- Finding the width of a letter, word, or phrase
- Patching existing commands
- Comparing the “job name”
- Is the argument a number?
- Defining macros within macros
- Spaces in macros
- How to break the 9-argument limit
- Key-value input for macros and package options
- Defining characters as macros
- Active characters in command arguments
- Defining a macro from an argument
- Transcribing LaTeX command definitions
- Detecting that something is empty
- Am I using PDFTeX?
- Subverting a token register
- Is this command defined?

#### LaTeX macro tools and techniques

- Using Plain or primitive commands in LaTeX
- `\``@` and `@` in macro names
- What’s the reason for ‘protection’?
- `\``edef` does not work with `\``protect`
- The definitions of LaTeX commands
- Optional arguments like `\``section`
- More than one optional argument
- Commands defined with * options
- LaTeX internal “abbreviations”, etc.
- Defining LaTeX commands within other commands

#### LaTeX macro programming

- How to change LaTeX’s “fixed names”
- Changing the words babel uses
- Running equation, figure and table numbering
- Making labels from a counter
- Finding if you’re on an odd or an even page
- How to change the format of labels
- Adjusting the presentation of section numbers
- There’s a space added after my environment
- Finding if a label is undefined
- Master and slave counters
- Fonts at arbitrary sizes
- The quality of your LaTeX

### Things are Going Wrong…

#### Getting things to fit

- Enlarging TeX
- Why can’t I load PicTeX?

#### Making things stay where you want them

- Moving tables and figures in LaTeX
- Underlined text won’t break
- Controlling widows and orphans

#### Things have “gone away”

- Old LaTeX font references such as `\``tenrm`
- Missing symbol commands
- Where are the `msx` and `msy` fonts?
- Where are the `am` fonts?

### Why does it do that?

#### Common errors

- LaTeX gets cross-references wrong
- Start of line goes awry
- Why doesn’t verbatim work within …?
- No line here to end
- Two-column float numbers out of order
- Accents misbehave in `tabbing`
- Package reports “command already defined”
- Why are my sections numbered 0.1 …?
- Link text doesn’t break at end line
- Page number is wrong at start of page
- My brackets don’t match
- Characters disappear from figures in PDFTeX

#### Common misunderstandings

- What’s going on in my `\``include` commands?
- Why does it ignore paragraph parameters?
- Case-changing oddities
- Why does LaTeX split footnotes across pages?
- Getting `\``marginpar` on the right side
- Where have my characters gone?
- “Rerun” messages won’t go away
- Commands gobble following space
- (La)TeX makes overfull lines
- Maths symbols don’t scale up
- Why doesn’t `\``linespread` work?
- Only one `\``baselineskip` per paragraph
- Numbers too large in table of contents, etc.
- Why is the inside margin so narrow?

#### Why shouldn’t I?

- Why use fontenc rather than t1enc?
- Why bother with inputenc and fontenc?
- Why not use `eqnarray`?
- Why use `\``[` …`\``]` in place of `$$` …`$$`?
- What’s wrong with `\``bf`, `\``it`, etc.?
- What’s wrong with `\``newfont`?

### The joy of TeX errors

- How to approach errors
- The structure of TeX error messages
- An extra ‘`}`’??
- Capacity exceeded [semantic nest …]
- No room for a new ‘thing’
- `epsf` gives up after a bit
- Improper `\``hyphenation` will be flushed
- “Too many unprocessed floats”
- `\``spacefactor` complaints
- `\``end` occurred inside a group
- “Missing number, treated as zero”
- “Please type a command or say `\``end`”
- “Unknown graphics extension”
- “Missing `$` inserted”
- Warning: “Font shape … not available”
- Unable to read an entire line
- “Fatal format file error; I’m stymied”
- Non-PDF special ignored!
- Mismatched mode ljfour and resolution 8000
- “Too deeply nested”
- Capacity exceeded — input levels
- PDFTeX destination … ignored
- Alignment tab changed to `\``cr`
- Graphics division by zero
- Missing `\``begin``{document}`
- `\``normalsize` not defined
- Too many math alphabets
- Not in outer par mode
- Perhaps a missing `\``item`?
- Illegal parameter number in definition
- Float(s) lost
- Token not allowed in PDFDocEncoded string
- Option clash for package
- Checksum mismatch in font
- Entering compatibility mode

### Current TeX-related projects

- The LaTeX project
- Future WWW technologies and (La)TeX
- Making outline fonts from Metafont
- The TeX document preparation environment
- Omega and Aleph
- The XeTeX project
- PDFTeX and LuaTeX
- The ANT typesetting system
- The ExTeX project
- Replacing the BibTeX–LaTeX mechanism

### You’re still stuck?

- You don’t understand the answer
- Submitting new material for the FAQ
- Reporting a LaTeX bug
- What to do if you find a bug