The Advanced TeXbook
Table of Contents
- Preface..........v
- Chapter 1: Introduction..........1
- 1.1 Basics..........2
- 1.2 Line Breaking and Page Layout..........6
- 1.3 Fonts..........7
- 1.4 The CM Fonts..........8
- 1.5 Font Examples..........10
- 1.6 Dimensions.........11
- 1.7 Scaling and Magnification..........12
- Chapter 2: Advanced Introduction..........15
- 2.1 Registers..........17
- 2.2 \the..........18
- 2.3 Modes..........18
- 2.4 Anatomy of TeX..........18
- 2.5 Characters..........20
- 2.6 Upper- and Lowercase Characters..........21
- 2.7 End-of-Line..........22
- 2.8 Numbers..........23
- 2.9 Category Codes..........23
- 2.10 Commands..........24
- 2.11 Assignments..........26
- 2.12 Lists..........26
- 2.13 Whastsits..........27
- 2.14 Parameters..........28
- 2.15 Discardable Items..........28
- 2.16 Macros..........29
- 2.17 Formats..........31
- Chapter 3: Boxes and Glue..........33
- 3.1 \hbox..........35
- 3.2 Box Registers..........38
- 3.3 Modes..........41
- 3.4 \vbox..........42
- 3.5 \boxmaxdepth..........46
- 3.6 \vtop..........48
- 3.7 Opening Boxes..........51
- 3.8 Simple Box Examples..........52
- 3.9 Glue..........53
- 3.10 Infinitely Flexible Glues..........55
- 3.11 Negative Multiples of fil..........57
- 3.12 The filneg Glues..........58
- 3.13 Glues with Negative Dimensions..........59
- 3.14 Predefined Fills..........60
- 3.15 Different Orders of Infinity..........60
- 3.16 The Glue Set Ration..........61
- 3.17 The Definition of Badness..........62
- 3.18 Classifying "Bad" Boxes..........63
- 3.19 The Interline Glue..........64
- 3.20 Suppressing the Interline Glue..........65
- 3.21 \kern..........66
- 3.22 Rules..........66
- 3.23 Placing Accents, an Example..........68
- 3.24 Phantoms and \smash..........71
- 3.25 More Advanced Examples..........74
- 3.26 Excercises..........77
- 3.27 \vsplit..........79
- 3.28 \lastbox..........82
- Chapter 4: Paragraphs..........87
- 4.1 Paragraph Start and End..........89
- 4.2 \everypar..........90
- 4.3 Horizontal Lists..........90
- 4.4 The InterWord Glue..........91
- 4.5 The Interline Glue..........95
- 4.6 Controlling Line Spacing..........96
- 4.7 Different Paragraph Shapes..........97
- 4.8 The Paragraph Indentation..........98
- 4.9 The Hanging Indentation..........98
- 4.10 \vadjust..........101
- 4.11 \obeylines..........102
- 4.12 Concatenating Paragraphs..........103
- 4.13 \par..........103
- 4.14 Example..........104
- 4.15 \prevgraf..........106
- 4.16 \parshape..........107
- Chapter 5: Macros..........109
- 5.1 Delimiting Parameters..........110
- 5.2 Macro Names..........111
- 5.3 Spurious Spaces..........111
- 5.4 Space Following a Number..........113
- 5.5 Reading the Source File..........114
- 5.6 Braces..........115
- 5.7 \let..........116
- 5.8 \futurelet..........117
- 5.9 \afterassignment..........119
- 5.10 \aftergroup..........121
- 5.11 \expandafter..........121
- 5.12 \csname..........124
- 5.13 Double ##..........126
- 5.14 Nested Macro Definitions..........127
- 5.15 Nested Macro Expansions..........129
- 5.16 Recursion..........130
- 5.17 \edef..........132
- 5.18 Other Ways to Define Macros..........134
- 5.19 Debugging Aids..........135
- 5.20 \catcode..........137
- 5.21 \jobname..........138
- 5.22 \chardef..........139
- 5.23 Unexpandable Control Sequences..........140
- 5.24 Active Characters..........140
- 5.25 Summary..........141
- Chapter 6: Conditionals..........143
- 6.1 Types of Conditionals..........144
- 6.2 Boolean Variables..........145
- 6.3 \ifx..........146
- 6.4 \if..........151
- 6.5 \ifcat..........153
- 6.6 Nested ifs..........154
- 6.7 Examples..........155
- 6.8 Evaluation of Conditionals..........159
- 6.9 Conclusion..........160
- Chapter 7: Examples of Macros..........161
- 7.1 Slanted Lines..........161
- 7.2 Generating a Grid..........163
- 7.3 Scanning the Argument..........165
- 7.4 Transferring an Argument..........165
- 7.5 Vertical Printing..........166
- 7.6 Scanning a String..........168
- 7.6 Reversing the Argument..........167
- 7.8 Adding a Constant..........168
- 7.9 Writing Strings on File..........169
- 7.10 Verbatim Listings..........171
- 7.11 Fancy Verbatim..........175
- 7.12 Complete Verbatim Macros..........179
- 7.13 Ignoring the Last Character..........181
- 7.14 Spreading on a String..........181
- 7.15 Placing Commas Between Digits..........182
- 7.16 A Table with No Markup..........183
- 7.17 Looking at the Next Word..........185
- 7.18 Bracketing Text..........185
- 7.19 A DropShadow..........186
- 7.20 Combining Text and Diagrams..........186
- 7.21 A Variation on \boxit..........188
- 7.22 Fitting Text in a Given Box..........189
- 7.23 The Sierpinski Triangle..........189
- 7.24 Macros for Looping..........190
- 7.25 Excercise..........192
- Chapter 8: Tokens and File I/O..........193
- 8.1 \toks..........193
- 8.2 Example..........196
- 8.3 Toks and Macros..........196
- 8.4 File I/O..........198
- 8.5 Example: Keyboard Input..........199
- 8.6 Example: File Input/Output..........199
- 8.7 Writing Arbitrary Strings on a File..........201
- 8.8 Last Words..........209
- Chapter 9: Multipass Jobs..........211
- 9.1 Cross-referencing a Document..........211
- 9.2 General Cross-referencing..........213
- 9.3 Creating a Table of Contents..........216
- 9.4 The Page Number..........218
- 9.5 Formatting the TOC..........219
- 9.6 Remarks..........219
- 9.7 A Simple Example..........220
- Chapter 10: Special Topics..........221
- 10.1 Pasting Material in Textures..........221
- 10.2 Creating Shaded Boxes with PostScript..........223
- 10.3 Arithmatic Calculations..........225
- Chapter 11: Leaders..........229
- 11.1 Horizontal Leaders..........229
- 11.2 Brace Fills..........231
- 11.3 Staggered Leaders..........232
- 11.4 Vertical Leaders..........233
- 11.5 Excercises..........234
- 11.6 Example..........234
- Chapter12: Tables..........237
- 12.1 \halign..........238
- 12.2 Examples of \halign..........238
- 12.3 Remarks....................243
- 12.4 \valign..........246
- Chapter 13: Advanced Math..........249
- 13.1 General Background..........249
- 13.2 Noncentered Displays..........250
- 13.3 Fonts in Math Mode..........251
- 13.4 The Four Styles..........254
- 13.5 Mathematical Units of Dimension..........256
- 13.6 Spacing in Math Mode..........256
- 13.7 Ordinary Symbols..........259
- 13.8 Large Operators..........260
- 13.9 Binary Operations..........262
- 13.10 Relations..........262
- 13.11 Combining Relations..........263
- 13.12 Openings and Closings..........264
- 13.13 Punctuations..........264
- 13.14 Inner Subformulas..........264
- 13.15 Delimiters..........265
- 13.16 Radicals..........266
- 13.17 \mathaccent..........267
- 13.18 Horizontally Extensible Symbols..........267
- 13.19 Super- and Subscripts..........268
- 13.20 Ellipses..........269
- 13.21 The Vertical Bar..........270
- 13.22 \mathsurround..........270
- 13.23 Excercises..........270
- Chapter 14: Line & Page Breaks..........271
- 14.1 The Tolerance..........272
- 14.2 The Definition of Demerits..........273
- 14.3 The Line-break Algorithm..........273
- 14.4 Hyphenation..........282
- 14.5 The Page-break Algorithm..........283
- Chapter 15: Handling Errors..........285
- 15.1 Warnings..........285'
- 15.2 Errors..........286
- 15.3 Fatal Errors..........292
- 15.4 General Notes..........293
- Chapter 16: Output Routines..........295
- 16.1 Introduction..........296
- 16.2 The MVL and the Page Builder..........297
- 16.3 The Current Page and LRC..........299
- 16.4 Examples..........305
- 16.5 a "Boxed" Page..........307
- 16.6 Header and Footer..........308
- 16.7 A Title Page..........309
- 16.8 Printer Crop Marks..........309
- 16.9 A Bordered Page..........312
- 16.10 Mailing Lables..........313
- 16.11 \vsplit..........315
- 16.12 Splitting a Box..........316
- 16.13 Double-column Pages..........317
- 16.14 \raggedbottom..........320
- 16.15 Facing Figures..........321
- 16.16 Selective Page Shipout..........323
- 16.17 End of the Document..........324
- Chapter 17: OTR Techniques: I..........327
- 17.1 Technique: Special Penalties..........328
- 17.2 The \lastxx Commands..........329
- 17.3 Technique: Breaking up a Page..........329
- 17.4 Duplicating a Page..........331
- 17.5 Reversing a Page..........333
- 17.6 Counting the Lines..........333
- 17.7 Breaking up a Line of Text..........334
- 17.8 Technique: Using \rightskip..........335
- 17.9 Technique: Using \parshape..........335
- 17.10 The Depth of \box255..........335
- 17.11 Technique: Communication by Kern..........336
- 17.12 {ractical Examples of OTRs..........336
- 17.13 Example: Start a Chapter..........336
- 17.14 Example: A Religious Hymn..........337
- 17.15 Example: Line Numbersing..........339
- 17.16 Example: Footnote Numbering..........341
- 17.17 A Simple but Wrong Approach..........341
- 17.18 A 2-pass Method..........342
- 17.19 Another 2-pass Solution ..........343
- 17.20 A Complex, 3-pass Approach..........345
- 17.21 Tables Broken Across Pages..........349
- 17.22 Communication by Special Vboxes..........350
- 17.23 Verse Numbers in the Left Margin..........351
- 17.24 Problems with This Approach..........352
- 17.25 Verse Numbers, Another Method..........353
- 17.26 A "Special Box" OTR..........356
- 17.27 Example: Revision Bars..........358
- 17.28 Summary..........361
- Chapter 18: OTR Techniques: II..........363
- 18.1 Method 1..........364
- 18.2 About the Examples..........365
- 18.3 Example 1: Widening Letters..........365
- 18.4 Method 2..........370
- 18.5 Example 2: Marginal Notes..........372
- 18.6 Tests..........374
- 18.7 Method 3..........375
- 18.8 Example 3: Revision Bars..........377
- Chapter 19: Insertions..........385
- 19.1 Introduction..........385
- 19.2 A Simple Example..........386
- 19.3 Insertions (Introductory)..........387
- 19.4 Insertions (Intermediate)..........388
- 19.5 Tracing Insertions (Preliminary)..........389
- 19.6 Example: Endnotes..........389
- 19.7 Example: Footnotes..........391
- 19.8 Example: Right Margin Insertions..........393
- 19.9 Example: Floating Insertions..........394
- 19.10 Example: Two Insertion Classes..........397
- 19.11 The Plain Format OTR..........398
- 19.12 \supereject..........400
- 19.13 \insertpenalties..........401
- 19.14 Insertions (Advanced)..........401
- 19.15 Tracing (in Detail)..........407
- 19.16 Summary..........413
- 19.17 Endnotes..........413
- 19.18 Practical OTR Problems..........414
- Chapter 20: Example Format..........417
- 20.1 Preliminaries..........417
- 20.2 The Main Macros..........419
- 20.3 The Final Typesetting..........427
- 20.4 The TOC Macros..........428
- 20.5 The Index..........429
- 20.6 Special Characters..........430
- References..........435
- Answers to Excercises..........439
- Index..........417
Back to The Advanced TeXbook
© Blue Sky TeX Systems