TEX in Practice: Volume II: Paragraphs, Math and Fonts

TEX in Practice: Volume II: Paragraphs, Math and Fonts

by Stephan v. Bechtolsheim

Paperback(Softcover reprint of the original 1st ed. 1993)

View All Available Formats & Editions
Eligible for FREE SHIPPING
  • Want it by Tuesday, October 23  Order now and choose Expedited Shipping during checkout.


TEX in Practice: Volume II: Paragraphs, Math and Fonts by Stephan v. Bechtolsheim

You might well wonder why TFPC in Practice is a part of the Monographs in Visualization series. However, if you really think about typesetting, especially fine typesetting, you soon realize that in large part it is a visual art as well as a science. 'lEX's algorithms produce in almost all cases aesthetic results of the highest quality. On the other hand, occasionally one may want to insert some additional space before a subscript or superscript, or one may want to adjust the vertical spacing in a fraction. Fortunately Donald Knuth, the author of 'lEX, allows one to program such corrections easily where needed. The four volumes of Stephan von Bechtolsheim's long awaited TFPC in Prac­ tice present a comprehensive view of 'lEX. His thorough discussion of each aspect of 'lEX is liberally laced with cogent illustrative examples. Many of these exam­ ples represent complete, ready to use macros that enhance the capabilities of 'lEX. These examples are of particular interest to both the typesetter and the 'lEX programmer. The typesetter can often solve an immediate problem by ei­ ther using one of the examples directly or by making minor changes to adapt it to the problem at hand. The 'lEX programmer can use the examples, along with Stephan's detailed discussion, to increase both the depth and breadth of his or her knowledge of 'lEX. The value of the text is further enhanced by Stephan's concerted effort to explain the reasoning behind each topic or example.

Product Details

ISBN-13: 9781461391418
Publisher: Springer New York
Publication date: 10/19/2011
Series: Monographs in Visual Communication
Edition description: Softcover reprint of the original 1st ed. 1993
Pages: 368
Product dimensions: 6.10(w) x 9.25(h) x 0.03(d)

Table of Contents

10 Building Paragraphs in TEX.- 10.1 The Basics.- 10.1.1 Spaces, Returns, etc..- 10.1.2 The Basics of Processing a Paragraph.- 10.1.3 The Operation of the Line Breaking Algorithm.- 10.2 Parameters Defining Paragraph Shapes.- 10.3 Paragraphs and Vboxes.- 10.3.1 Centering a Paragraph Enclosed in a Vbox.- 10.3.2 A Paragraph with a Predetermined First Line.- 10.4 Starting a Paragraph.- 10.4.1 Ways to Start a Paragraph.- 10.4.2 Computations Performed by TEX at the Beginning of a Paragraph.- 10.5 Ending a Paragraph.- 10.5.1 The \par-Primitive, \endgraf.- 10.5.2 Computations Performed at the End of a Paragraph.- 10.6 Indenting Paragraphs, \leftskip and \rightskip.- 10.6.1 Applications of \leftskip and \rightskip.- 10.6.2 Changing \leftskip and \rightskip.- 10.6.3 The Definition of Macro \narrower.- 10.6.4 Negative \leftskip and \rightskip.- 10.7 Paragraph Indentation, \parindent.- 10.7.1 Suppressing Paragraph Indentation, \noindent.- 10.7.2 The Meaning of the Primitive \indent.- 10.7.3 Negative Paragraph Indentation.- 10.7.4 Using Negative Paragraph Indentation for Typesetting a Bibliography.- 10.7.5 Using Negative Paragraph Indentation for Typesetting Dictionaries.- 10.7.6 Using Negative Paragraph Indentations for Lists.- 10.8 The Vertical Spacing Between Paragraphs, \parskip.- 10.8.1 Setting \parskip.- 10.8.2 An Example Involving \parskip.- 10.9 The Token Parameter \everypar.- 10.9.1 An Example of Applying \everypar.- 10.9.2 Dynamic \parskip Computations.- 10.9.3 Multiple \everypars.- 10.9.4 Suppressing the Paragraph Indentation Not Using \noindent.- 10.10 User-Controlled Line Breaks.- 10.10.1 Forcing Line Breaks Using \hfil\break.- 10.10.2 Every Line Becomes a Single Paragraph.- 10.10.3 Using Hboxes.- 10.10.4 Writing Single Lines Right Justified.- 10.10.5 Horizontal Glues in User-Determined Line Breaks.- 10.10.6 A Macro for Explicit Line Breaks in the Middle of a Paragraph, \\.- 10.11 \parfillskip.- 10.12 Macro for Writing Paragraph Layout Parameters to the Logfile.- 10.13 Summary.- 11 Paragraphs, Part II.- 11.1 Generating Lists.- 11.1.1 Item Labels Left of a Paragraph, Left Flush.- 11.1.2 Item Labels Left of a Paragraph, Right Flush.- 11.1.3 Macros for Printing Lists.- 11.1.4 An Example Using the Preceding Macros.- 11.1.5 Selecting Proper Dimensions.- 11.1.6 How To Handle Item Labels That Are Too Wide.- 11.1.7 The Automatic Numbering of Lists.- 11.1.8 An Interesting Variation of the List Problem.- 11.2 Improved Macros for Lists.- 11.2.1 The Macro Source Code.- 11.2.2 The Definition of the Label-Generating Macros.- 11.2.3 An Example Using the Preceding Macros.- 11.3 General List Macros.- 11.3.1 Numbered Lists.- 11.3.2 Numbered Lists in This Series.- 11.3.3 Itemized Lists, \BeginItemize, \EndItemize.- 11.3.4 Itemized Lists for This Series.- 11.3.5 An Example Application of the Preceding Macros.- 11.4 Hanging Indentations (\hangindent, \hangafter).- 11.4.1 The Counter Parameter \hangafter.- 11.4.2 The Dimension Parameter \hangindent.- 11.4.3 \hangindent and \hangafter Must Be Reloaded for Each Paragraph.- 11.4.4 Another Example of Hanging Indentation.- 11.4.5 Use of \hangafter and \hangindent to Generate Lists.- 11.4.6 Starting a Paragraph with Big Letters, \BigLetPar.- 11.4.7 Plain Format Macros \item and \itemitem.- 11.5 A Generic Heading Printing Macro.- 11.5.1 The Parameters of \GenericHeading.- 11.5.2 Token Register \EveryHeading.- 11.5.3 Controlling Linebreaks.- 11.5.4 Running Heads.- 11.5.5 The Macro Source Code.- 11.5.6 An Example Using the Preceding Macro.- 11.6 Using \leftskip and \rightskip with Stretchability.- 11.6.1 Ragged Right and Ragged Left Text, \raggedright.- 11.6.2 Automatically Centered Text.- 11.6.3 The Definition of \BeginCenter and \EndCenter.- 11.7 Summary.- 12 Paragraphs, Part III.- 12.1 General Paragraph Shapes, \parshape.- 12.1.1 A First \parshape Example.- 12.1.2 Another \parshape Example.- 12.1.3 An Extended \parshape Command, \XParShape.- 12.2 Timing Issues in Paragraph Parameters.- 12.3 Vertical Material Trickery, \vadjust.- 12.3.1 Applications of \vadjust.- 12.3.2 \vadjust for Inserting Figures.- 12.4 Table of Contents Typesetting.- 12.4.1 The Definition of Macro \GenTocEntry.- 12.4.2 An Example.- 12.4.3 Table of Contents Printing for This Series.- 12.4.4 List of Figure and List of Table Printing for This Series.- 12.5 \prevgraf.- 12.5.1 A Macro To Determine the Number of Lines of a Paragraph, \GetNumberOfLines.- 12.5.2 Setting \prevgraf.- 12.6 Now It Is Playtime.- 12.6.1 Hanging Indentation, Margins Moved In.- 12.6.2 Hanging Indentation, Ragged Right.- 12.6.3 Showing Bad Typesetting.- 12.6.4 First Line Special, \FirstLineSpecial.- 12.7 The Line Breaking Algorithm and Hyphenation.- 12.7.1 Tracing Line Break Computations, \tracingparagraphs.- 12.7.2 A Two Pass Algorithm.- 12.7.3 The \showhyphens Command.- 12.7.4 How TEX Determines the Hyphenation of a Word, \-, \discretionary.- 12.7.5 Making the Plain Format Multilingual.- 12.7.6 The Hyphenation Character, \hyphenchar.- 12.7.7 Default Hyphen Character, \defaulthyphenchar.- 12.7.8 \uchyph.- 12.7.9 Fine Points About the Line Breaking Algorithm.- 12.7.10 Penalties Associated with Line Break Computations.- 12.7.11 Turning Off Hyphenation.- 12.7.12 Hyphenation of Compound Words, \hyph, \slash.- 12.7.13 Print Hyphenation of a Word, \PrintHyphens.- 12.7.14 Hyphenation, This Series.- 12.7.15 Demerits and Additional Parameters in the Typesetting of a Paragraph.- 12.8 Various Topics.- 12.8.1 \looseness.- 12.8.2 Typesetting Narrow Columns.- 12.8.3 Additional Stretchability, \emergencystretch.- 12.8.4 The Input Form of Paragraphs.- 12.9 Summary.- 13 Typesetting Math Equations with TEX.- 13.1 Basics of Typesetting Mathematical Equations.- 13.1.1 Math Mode and Display Math Mode.- 13.1.2 General Rules for the Math Modes.- 13.1.3 Error Confinement: No Empty Lines in Math Formulas.- 13.1.4 Beginning and Ending Mathematical Equations.- 13.1.5 Superscripts and Subscripts.- 13.1.6 Error Confinement: Superscript and Subscript Related.- 13.2 Special Math Symbols and Characters.- 13.2.1 The Processing of Mathematical Equations in TEX.- 13.2.2 Variables in Math Equations.- 13.2.3 Lowercase Greek Letters.- 13.2.4 Uppercase Greek Letters.- 13.2.5 Other Alphabets.- 13.2.6 Miscellaneous Symbols of Type Ord.- 13.2.7 Binary Operations (Type Bin).- 13.2.8 Relational Operations (Type Rel).- 13.2.9 Arrows.- 13.2.10 Special Symbols.- 13.2.11 Overline and Underline.- 13.2.12 Text in Math Modes.- 13.3 Fractions and Fraction-Like Constructs.- 13.3.1 Fractions with \over.- 13.3.2 \atop, \choose and \above.- 13.3.3 General Fractions.- 13.3.4 Entering Fractions.- 13.3.5 Another Way of Entering Fractions, \frac.- 13.3.6 Using a Slash Instead of Fractions.- 13.3.7 Stacked Superscripts and Subscripts.- 13.4 Math Accents.- 13.4.1 Simple Math Accents.- 13.4.2 Wide Accents.- 13.5 Large Operators.- 13.5.1 Summation.- 13.5.2 Integral Signs.- 13.5.3 Changing the Positions of Large Operator-Related Subscripts and Superscripts, \limits and \nolimits.- 13.5.4 Roots and Square Roots, \sqrt, \root.- 13.6 Delimiters.- 13.6.1 Explicit Specification of the Size of a Delimiter.- 13.6.2 Implicit Specification of the Size of a Delimiter.- 13.6.3 An Example using \left and \right.- 13.6.4 Why and When is Explicit Size Specification Needed?.- 13.6.5 Fine Points in the Computation of Delimiter Sizes, \ delimitershortfall,\delimiterfactor.- 13.7 Horizontal Spacing in Math Modes.- 13.7.1 Changing Spacing by Hand.- 13.7.2 Instances Where Corrections in the Horizontal Spacing May Be Appropriate.- 13.8 Inline Mathmode.- 13.8.1 Horizontal Glue Around Inline Equations, \mathsurround, \m@th.- 13.8.2 Linebreaks in Inline Equations, \relpenalty, \binoppenalty.- 13.9 Summary.- 14 More on Math.- 14.1 Converting Math Formulas Into Printed Output.- 14.1.1 A Math List Example, \showlists.- 14.1.2 The Building of a Math List.- 14.2 A Closer Look at Atoms.- 14.3 Assigning Class, Family and Character Code to a Character.- 14.3.1 Putting Together a Mathcode.- 14.3.2 Assigning Mathcodes to Characters and Control Sequences, \mathcode, \mathchar, \mathchardef.- 14.4 Style Selection in Math Modes.- 14.4.1 Styles.- 14.4.2 Styles and Sizes.- 14.4.3 Rules for the Selection of Styles.- 14.4.4 Manual Style Selections.- 14.4.5 Making Up Your Own Symbols, \mathchoice, \mathpalette.- 14.5 Fonts and Font Families in Math Mode.- 14.5.1 Loading Math Fonts in the Plain Format.- 14.5.2 The Fonts of a Family, \textfont, \scriptfont, \scriptscriptfont.- 14.5.3 The Meaning of the Various Font Families.- 14.5.4 Relating Sizes and Fonts, \newfam.- 14.5.5 Integer Parameter \fam, Special Class 7.- 14.5.6 The Math Family Definitions of the Plain Format.- 14.5.7 Redefining Math Font Families.- 14.5.8 Adding Fonts to Math Mode.- 14.5.9 \defaultskewchar.- 14.6 Braces.- 14.6.1 Braces for Set Definitions.- 14.6.2 Braces in Describing “Cases” in Math Formulas, \cases.- 14.6.3 Braces Above and Below Formulas, \overbrace and \underbrace.- 14.7 Vertical Spacing, Phantoms, Struts in Math Formulas.- 14.8 How to Input Mathematical Equations.- 14.8.1 Empty Lines Before and After Displayed Equations.- 14.8.2 Recommendations for How to Write Readable Math Source Code.- 14.8.3 An Example.- 14.8.4 Building a Formula Step-By-Step Using Macros.- 14.8.5 Stepwise Refinement.- 14.9 Display Math Mode.- 14.9.1 Vertical Glue and Penalty Parameters, Associated with Display Math Mode.- 14.9.2 Equation Numbers, \eqno, \leqno.- 14.9.3 The Horizontal Positioning of Displayed Equations.- 14.9.4 More Display Mode Related Parameters, \predisplaysize, \displaywidth and \displaysize.- 14.10 Multiline Displays.- 14.10.1 Multiline Displays Without Equation Numbers.- 14.10.2 Multiline Displays With Equation Numbers.- 14.10.3 Matrices.- 14.11 Token Parameters \everymath and \everydisplay.- 14.12 Single and Double Math Shift Characters.- 14.13 Summary.- 15 Fonts in TEX.- 15.1 Magnification.- 15.1.1 Specifying Magnifications in TEX.- 15.1.2 Setting the Global Magnification, \mag.- 15.1.3 Unmagnified or true Dimensions.- 15.1.4 \magnification.- 15.2 The Basics of the Handling of Fonts by TEX.- 15.2.1 \nullfont.- 15.2.2 Character Codes.- 15.2.3 Characters Are Horizontal Boxes in TEX.- 15.2.4 Determining the Sizes of Characters in a Font, \ReportCharSize.- 15.2.5 A Macro to Print the Character Sizes of All Characters of a Particular Font, \TfmSizeTable.- 15.2.6 Determining the Length of a String, \StringLength.- 15.2.7 The Loading of Fonts by Loading TFM Files.- 15.2.8 The Information Stored in TFM Files.- 15.2.9 The Instruction \font Loads a Font.- 15.2.10 Changing Fonts Using Grouping.- 15.2.11 Loading Fonts Magnified, \font \xx = cm… scaled.- 15.2.12 Loading Fonts Magnified Using “at xpt”.- 15.2.13 Looking at Global and Font Magnification Together.- 15.2.14 A Font Magnification Table.- 15.2.15 Font Dimension Parameters, \fontdimen.- 15.2.16 The \fontname Instruction.- 15.3 The Fonts of TEX.- 15.3.1 Some Basic Typesetting Terminology.- 15.3.2 METAFONT and the Computer Modern Fonts.- 15.3.3 An Overview of Font Types Used With TEX.- 15.3.4 The Computer Modern Text Fonts.- 15.3.5 Standard Computer Modern Text Fonts, \rm, \bf, \it, \tt.- 15.3.6 Italic Correction.- 15.4 Font Sizes and Line Spacing.- 15.4.1 Font Sizes.- 15.4.2 Typical Font Sizes.- 15.4.3 Line Spacing, Leading, \baselineskip.- 15.5 Fonts in the Plain Format.- 15.5.1 The Fonts Loaded by the Plain Format.- 15.5.2 Font Changing Macros of the Plain Format.- 15.6 Summary.- 16 More on Fonts in TEX.- 16.1 A Sophisticated Way of Organizing Fonts.- 16.1.1 Safe Loading of Fonts, \NewFont.- 16.1.2 Loading Fonts on Demand.- 16.1.3 Font Substitution, the Definition of \SubstituteFontX.- 16.1.4 Another Font Substitution Macro.- 16.1.5 Grouping Fonts by Font Sizes.- 16.1.6 Font Size Change Instructions and Typeface Change Instructions.- 16.1.7 Font Size Grouping Macros, \DefineFontSizeGroup.- 16.1.8 Logical Font Size Names.- 16.1.9 An Example Application.- 16.1.10 Extension and Discussion of the Discussed Font Organization.- 16.2 Interword Spacing.- 16.2.1 Spaces in the Text Are Translated into Interword Glue.- 16.2.2 Typesetting a Paragraph.- 16.2.3 A Summary of The Rules About Interword Space Computation.- 16.2.4 An Example of User-Defined \spaceskip.- 16.2.5 French Spacing, Extended Space, \frenchspacing, \nonfrenchspacing.- 16.2.6 Another Look at \spaceskip.- 16.2.7 Space Factor Computation, \spacefactor, \sfcode.- 16.2.8 The Definitions of Macros \frenchspacing and \nonfrenchspacing.- 16.2.9 The Implicit Globalness of Space Factor Computations, \SaveSpaceFactor, \RestoreSpaceFactor.- 16.2.10 Another Look at Extended Spaces and Periods.- 16.2.11 “Characters Per Pica”.- 16.3 Printing Fonts Used in TEX Documents.- 16.3.1 Raster Output Devices.- 16.3.2 Source of Pixel of Fonts in TEX Documents.- 16.3.3 Pixel Files of METAFONT-Based Fonts.- 16.3.4 GF Files.- 16.3.5 The Numerical File Extension.- 16.3.6 PK Files.- 16.3.7 PXL Files.- 16.4 Ligatures, Kerning.- 16.4.1 Ligatures.- 16.4.2 Kerning.- 16.4.3 Suppressing Ligatures and Kerning.- 16.4.4 A Ligature and Kerning Related Example.- 16.5 Accents in Text.- 16.5.1 \accent to Generate an Accent.- 16.5.2 The Accent Definitions of the Plain. Format.- 16.5.3 Dotless Characters.- 16.6 Character Codes.- 16.6.1 \char.- 16.6.2 Computing the Character Code.- 16.6.3 TEX Fonts Usually Have 128 Characters.- 16.6.4 Unavailable Characters, \tracinglostchars.- 16.7 Underlining.- 16.8 Standard Font Table Macros.- 16.8.1 Macro Source Code.- 16.8.2 Font Table Print Example.- 16.9 “Comparative” Font Tables.- 16.9.1 A Brief Explanation of the Font Tables.- 16.9.2 Macros Used to Print the Font Tables.- 16.10 “External” Fonts.- 16.10.1 PostScript Fonts.- 16.10.2 Third Party Fonts.- 16.11 Summary.- 17 In and Around TEX.- 17.1 TEX Program Variants.- 17.1.1 Explaining initex and virtex, plain.tex, \dump.- 17.1.2 Commands tex, latex, amstex.- 17.1.3 Performance Comparison of initex versus virtex.- 17.2 METAFONT.- 17.2.1 The Interfacing of TEX and METAFONT.- 17.2.2 tfm File-Related Utilities, tftopl, pltotf.- 17.3 The WEB System.- 17.3.1 Combining Documentation and Programming, weave and tangle.- 17.3.2 Porting WEB Programs, Change Files.- 17.4 Environment Variables and Logical Names.- 17.4.1 Listing the Relevant Environment Variables.- 17.4.2 Sample Settings of TEX’s Environment Variables.- 17.5 What TEX Is Not Designed To Do.- 17.6 Utilities.- 17.7 Device Drivers, DVI Files.- 17.8 Checksums.- 17.9 TEX-Related File Types.- 17.10 The Version Number of the Plain Format Source Code.- 17.11 Summary.- Source Code File Index.

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews