The LaTeX Companion

Table of Contents

1. Introduction
1.1 A Short History of TeX and LaTeX...................................1
1.1.1 In the Beginning There Was TeX
1.1.2 Then Leslie Lamport Developed LaTeX
1.1.3 With LaTeX toward the year 2000?
1.2 LaTeX and Its Components............................................3
1.2.1 How Does LaTeX Work?
1.2.2 Output Processors
1.3 The Concept of Generic Markup......................................6
1.3.1 What Is Generic Markup?
1.3.2 Advantages of Generic Markup
1.3.3 Separation of Content and Form
1.4 Necessity of Layout Markup...........................................9
1.4.1 Pitfalls of Layout Markup
1.4.2 When to Use Layout Markup
2. The Structure of a LaTeX Document
2.1 The Structure of a Source File........................................11
2.1.1 Processing of Options and Packages
2.1.2 Splitting the Source File into Parts
2.1.3 Combining Several Files
2.2 Logical Structure.......................................................17
2.3 Sectioning Commands.................................................18
2.3.1 Numbering Headings
2.3.2 Formatting Headings
2.3.3 Changing Fixed Heading Texts
2.4 Structure of the Table of Contents...................................31
2.4.1 Typesetting a Contents List
2.4.2 Entering Information into the Contents Files
2.4.3 Defining a New TOC-Like File
2.4.4 Multiple Tables of Contents
2.5 Managing References..................................................40
2.5.1 varioref-More Flexible Cross-References
2.5.2 References to External Documents
3. Basic Formatting Tools
3.1 The Structure of a Source File........................................48
3.1.1 letterspace-Changing Inter-Letter Spacing
3.1.2 ulem-Emphasize via Underline
3.1.3 xspace-Gentle Spacing after a Macro
3.1.4 Paragraph Justification
3.1.5 doublespace-Changing Inter-Line Spacing
3.1.6 picinpar-Typeset a Paragraph with a Rectangular Hole
3.1.7 shapepar-Typeset a Paragraph with a Specified Shape
3.2 List Structures...........................................................56
3.2.1 Modifying the Standard Lists
3.2.2 Making your Own Lists
3.3 Simulating Typed Text.................................................66
3.3.1 alltt-A Verbatim-Like Environment
3.3.2 verbatim-A Style for Literal Text
3.3.3 moreverb-More Verbatim-Like Envrionments
3.4 Footnotes, Endnotes, and Marginals...................................70
3.4.1 Customizing Footnotes
3.4.2 Marginal Notes
3.4.3 Endnotes
3.5 Using Multiple Columns...............................................75
3.5.1 multicol-A Flexible Way to Handle Multiple Columns
3.5.2 Typesetting in Columns
3.5.3 Customizing the multicols Environment
3.5.4 Floats and Footnotes in multicol
3.5.5 ftnright-Right Footnotes in a Two-Columns Environment
3.6 Simple Version Control...............................................80
4. The Layout of the Page
4.1 Geometrical Dimensions of the Layout..............................84
4.2 Changing the Layout...................................................87
4.2.1 Page Layout Packages
4.2.2 Typesetting Pages in Landscape Mode
4.3 Page Styles..............................................................91
4.3.1 Writing New Page Styles
4.3.2 Customizing Page Styles with fancyheadings
4.4 Visual Formatting......................................................99
5. Tabular Material
5.1 Comparing the tabbing and tabular Environments............102
5.2 Using the tabbing Environment....................................102
5.2.1 The program Environment
5.3 array-Extending the tabular Environments.....................104
5.3.1 Examples of Preamble Commands
5.3.2 Style Parameters
5.3.3 Defining New Column Specifiers
5.3.4 Some Peculiarities of the array Implementation
5.3.5 tabularx-Automatic Calculation of the Column Widths
5.3.6 delarray-Specifying Delimiters Surrounding an Array
5.4 Multipage Tabular Material............................................118
5.4.1 supertab-Making Multipage Tabulars
5.4.2 longtable-Sophisticated Multipage Tabulars
5.4.3 A Final Comparison
5.5 Bells and Whistles......................................................129
5.5.1 dcolumn-Defining Column Alignments
5.5.2 hhline-Combining Horizontal and Vertical Lines
5.6 Applications.............................................................131
5.6.1 Hyphenation in Narrow Columns
5.6.2 Footnotes in Tabular Material
5.6.3 Managing Tables with Wide Entries
5.6.4 Columns Spanning Multiple Rows
5.6.5 Tables Inside Tables
5.6.6 Two More Examples
6. Mastering Floats
6.1 Understanding Float Parameters......................................141
6.2 Improved Float Control................................................144
6.3 float-Creating New Float Types....................................146
6.3.1 I Want My Float "Here"!
6.4 Different Kinds of Floating Environments...........................150
6.4.1 floatfig-Narrow Floating Figures
6.4.2 wrapfig-Wrapping Text around a Figure
6.4.3 subfigure-Figures inside Figures
6.4.4 endfloat-Place Figures and Tables at the End
6.5 Customizing Your Captions............................................154
7. Font Selection
7.1 Introduction to NFSS...................................................157
7.2 Understanding Font Characteristics...................................159
7.2.1 Monospaced and Proportional Fonts
7.2.2 Serifed and Sans Serif Fonts
7.2.3 Font Families and Their Attributes
7.2.4 Encoding Schemes
7.3 Using Fonts in Text.....................................................165
7.3.1 Standard NFSS Font Commands
7.3.2 Combining Standard Font Commands
7.3.3 Font Commands versus Declarations
7.3.4 Accessing All Characters of a Font
7.3.5 Changing the Default Text Fonts
7.3.6 LaTeX 2.09 Font Commands
7.4 Using Fonts in Math....................................................174
7.4.1 Special Math Alphabet Identifiers
7.4.2 Text Font Commands in Math
7.4.3 Mathematical Formula Versions
7.5 Standard Packages......................................................180
7.5.1 Providing New Text Fonts
7.5.2 Providing New Math Fonts
7.5.3 slides-Producing Overhead Slides
7.5.4 Processing Older Documents
7.5.5 Special Packages for NFSS
7.6 The Low-Level Interface...............................................187
7.6.1 Setting Individual Font Attributes
7.6.2 Setting Several Font Attributes
7.6.3 Automatic Substitution of Fonts
7.6.4 Using Low-Level Commands in the Document
7.7 Setting Up New Fonts..................................................194
7.7.1 Overviews
7.7.2 Declaring New Fonts Families and Font Shape Groups
7.7.3 Modifying Fonts Families and Font Shape Groups
7.7.4 Declaring New Encoding Schemes
7.7.5 Internal File Organization
7.7.6 Declaring New Fonts for Use in Math
7.7.7 The Order of Declaration
7.8 Warning and Error Messages..........................................210
8. Higher Mathematics
8.1 The AMS-LaTeX Project..............................................215
8.2 Fonts and Symbols in Formulae......................................216
8.2.1 Names of Math Font Commands
8.2.2 Mathematical Symbols
8.3 Compound Symbols, Delimiters, and Operators...................223
8.3.1 Multiple Integral Signs
8.3.2 Over and Under Arrows
8.3.3 Dots
8.3.4 Accents in Math
8.3.5 Superscripted Accents
8.3.6 Dot Accents
8.3.7 Roots
8.3.8 Boxed Formulae
8.3.9 Extensible Arrows
8.3.10 \overset, \underset, and \sideset
8.3.11 The \smash Command
8.3.12 The \text Command
8.3.13 Operator Names
8.3.14 \mod and Its Relatives
8.3.15 Fractions and Related Constructions
8.3.16 Continued Fractions
8.3.17 Big-g-g-g Delimiters
8.4 Matrix-Like Environments and Commutative Diagrams...........231
8.4.1 The cases Environment
8.4.2 The Matrix Environments
8.4.3 The Sb and Sp Environments
8.4.4 Commutative Diagrams
8.5 Alignment Structures for Equations..................................235
8.5.1 The align Environment
8.5.2 The gather Environment
8.5.3 The alignat Environment
8.5.4 The multline Environment
8.5.5 The split Environment
8.5.6 Alignment Environments as Parts of Displays
8.5.7 Vertical Spacing and Page Breaks in Equation Structures
8.5.8 The \intertext Command
8.6 Miscellaneous...........................................................240
8.6.1 Equation Numbers
8.6.2 Resetting the Equation Counter
8.6.3 Fine-Tunig Spacing in Math Mode
8.6.4 A Few Points to Note
8.6.5 Options and Sub-Packages to the amstex Package
8.6.6 AMS-LaTeX Document Classes
8.7 Examples of Multiple-Line Equation Structures....................244
8.7.1 The split Environment
8.7.2 The multline Environment
8.7.3 The gather Environment
8.7.4 The align Environment
8.7.5 Using the align and split Environments within gather
8.7.6 Using the alignat Environments
8.8 Extensions to the theorem Environment............................251
8.8.1 Defining New Theorem Environments
8.8.2 Examples of the Definition and Use of Theorems
8.8.3 Special Considerations
8.9 Mathematical Style Parameters........................................255
8.8.1 Controlling the Size of Characters
8.8.2 LaTeX Math Style Parameters
9. LaTeX in a Multilingual Environment
9.1 TeX and Non-English Languages....................................259
9.1.1 The Virtual Font Mechanism
9.2 Babel-LaTeX Speaks Multiple Languages...........................262
9.2.1 The User Interface
9.2.2 The german Option
9.2.3 The Structure of the babel Language Style Files
9.3 Implementing Typographic Rules....................................272
9.3.1 Traditional French Typographic Rules
9.3.2 Commands of the french Package
9.3.3 Structure of the french Package
10. Portable Graphics in LaTeX
10.1 Ornaments.............................................................277
10.1.1 Boxed Minipages
10.1.2 Shadow Boxes
10.1.3 Fancy Frames
10.2 The picture Environment..........................................280
10.2.1 Bezier Approximations
10.2.2 Putting Multiple Boxes
10.2.3 Drawing Binary or Ternary Trees
10.2.4 Drawing Bar Charts
10.2.5 Examples of the barenv Environment
10.2.6 Drawing Arbitrary Curves
10.2.7 Other Packages
10.3 Enhancements to the picture Environment-epic...............293
10.3.1 Description of the Commands
10.4 Extending the epic Package........................................300
10.4.1 eepic's Extensions to LaTeX
10.4.2 eepic's Extensions to epic
10.4.3 New Commands with eepic
10.4.4 Compatibility
10.4.5 Examples
10.5 Packages based on epic.............................................303
10.5.1 Drawing Bipartite Graphs
10.5.2 Drawing Trees
11. Using PostScript
11.1 The PostScript Language............................................311
11.1.1 About the Language
11.1.2 What is Encapsulated PostScript?
11.2 dvips-A dvi to PostScript Converter .............................315
11.3 Merging Text and PostScript Graphics............................317
11.3.1 Simple Figures
11.3.2 Draft Figures
11.3.3 More Complex Figure Arrangements
11.4 Rotating Material.....................................................320
11.4.1 Rotating the Tabular Material
11.4.2 Rotating a Figure
11.4.3 Rotated Captions Only
11.5 Using Revision Bars.................................................328
11.6 Boxing and Gray Shading...........................................330
11.7 Color Output..........................................................331
11.8 Overlaying Text on the Output Page...............................332
11.9 The NFSS Revisited.................................................332
11.9.1 Naming Those Thousands of Fonts
11.9.2 The PSNFSS System
11.9.3 Using the PostScript Pi Fonts
11.9.4 Generic Commands in the Style pifont
11.9.5 The Symbol Font
11.9.6 Setting Up New PostScript Fonts Yourself
11.9.7 Replacing All TeX Fonts with PostScript Fonts
11.10 DCPS-The Cork Encoding with PostScript Fonts..............340
12. Index Generation
12.1 Syntax of Index Entries.............................................346
12.1.1 Simple Index Entries
12.1.2 Generating Subentries
12.1.3 Page Ranges and Cross-References
12.1.4 Controlling the Presentation Form
12.1.5 Printing Those Special Characters
12.1.6 Points to Note
12.1.7 Consistency and Index Entries
12.2 Preparing the Index..................................................352
12.2.1 Generating the Raw Entries
12.2.2 Generating the Formatted Index
12.3 Running the MakeIndex Program..................................353
12.3.1 Detailed Options of the MakeIndex Program
12.3.2 Error Messages
12.4 Customizing the Index...............................................357
12.4.1 Example of Index Style Files
12.4.2 A Stand-Alone Index
12.4.3 Changing the "Special Characters"
12.4.4 Changing the Output Format of the Index
12.4.5 Treating Funny Page Numbers
12.4.6 Glossary Entries
12.5 Modifying the Layout................................................364
12.5.1 Multiple Indexes
12.5.2 A Reimplementation of the Index Commands
13. Bibliography Generation
13.1 Entering the Citations.................................................372
13.1.1 Customizing the Citations
13.1.2 Customizing the Bibliography Labels
13.2 Using BibTeX with LaTeX..........................................375
13.2.1 A List of BibTeX Stlye Files
13.2.2 Examples of BibTeX Styles
13.3 Multiple Bibliographies in One Document..........................385
13.3.1 The chapterbib Package
13.3.2 The bibunits Package
13.4 Bibliography Data Base Management Tools.......................392
13.5 The General Format of the .bib file................................398
13.5.1 The General Format of a BibTeX Entry
13.5.2 The Text Part of a Field Explained
13.5.3 Abbreviations in BibTeX
13.5.4 A BibTeX Preamble
13.5.5 Cross-References
13.5.6 Some Further Remarks
13.6 Detailed Description of the Entries..................................405
13.7 Understanding BibTeX Styles.......................................407
13.7.1 A General Description of a BibTeX Style File
13.7.2 The BibTeX Style File Commands
13.7.3 The Built-In Functions
13.7.4 The Documentation Style btxbst.doc
13.8 Introducing Small Changes in a Style File.........................414
13.8.1 Adding a New Field
13.8.2 Foreign Language Support
13.9 makebst-Customizing Bibliographic Style FIles..................419
13.9.1 Running makebst
14. LaTeX Package File Documentation Tools
14.1 Documenting Package Files.........................................421
14.2 The User Interface for the doc Package...........................422
14.2.1 General Conventions
14.2.2 Describing New Macros and Environments
14.2.3 Cross-Referencing All Macros Used
14.2.4 Producing the Actual Index Entries
14.2.5 Additional Bells and Whistles
14.2.6 The Driver File
14.2.7 A Simple Example of a File Documented with doc
14.3 The DOCSTRIP Utility................................................432
14.3.1 Batch File Commands
14.3.2 Conditional Inclusion of Code
14.4 An Example of an Installation Procedure..........................435
A. A LaTeX Overview for Package and Class Writers
A.1 Linking Markup and Formatting......................................439
A.1.1 Defining New Commands
A.1.2 Defining New Environments
A.1.3 Defining and Changing Counters
A.1.4 Defining and Changing Space Parameters
A.2 Page Markup--Several Kinds of Boxes...............................451
A.2.1 LR Boxes
A.2.2 Paragraph Boxes
A.2.3 Rule Boxes
A.2.4 Manipulating Boxed Material
A.3 Package and Class File Structure.....................................460
A.3.1 The Identification Part
A.3.2 The Initial Code Part
A.3.3 The Declaration of Options
A.3.4 The Execution of Options
A.3.5 The Package Loading Part
A.3.6 The Main Code Part
A.3.7 Special Commands for Package and Class Files
A.3.8 Special Commands for Class Files
A.4 calc-Arithmetic Calculations.........................................468
A.5 ifthen-Advanced Control Structures................................470
B. TeX Archive Sites
B.1 The Main TeX Internet Sites..........................................475
B.2 Mail Servers............................................................479
B.3 TeX User Groups......................................................479
Bibliography..........................................................481
Index..................................................................493


Back to The LaTeX Companion

Books Home

© Blue Sky TeX Systems