Table of Contents
32 The Page Breaking Algorithm.- 32.1 Definitions and Other Basics.- 32.1.1 Definitions Relating to the Page Breaking Algorithm.- 32.1.2 The Main Vertical List.- 32.1.3 Where Page Breaks Can Occur.- 32.1.4 Tracing TEX’s Page Break Computations, \showlists, \tracingpages.- 32.2 The Page Breaking Algorithm in General.- 32.2.1 Accounting for the Page Dimensions, \pagetotal and \pagegoal.- 32.2.2 Updating \pagegoal and \pagetotal.- 32.2.3 Printing \pagetotal and \pagegoal, \LogPageTG.- 32.2.4 Computing the Available Vertical Space on a Page, \ComputeFreeSpaceOnPage, \FreeSpaceConditional.- 32.2.5 \pagegoal and Insertions.- 32.3 Page Layouts “Bottom Flush” and “Ragged Bottom”.- 32.3.1 The Page Layouts in General.- 32.3.2 Page Layouts in the Plain Format.- 32.4 Vertical Glues of the Main Vertical List.- 32.4.1 Writing the Current Page Part of the Main Vertical List to a Log File.- 32.4.2 Glue Inserted at the Top of Every Page, \topskip.- 32.4.3 Implicit Vertical Glues and Page Breaks.- 32.4.4 Explicit Vertical Glues and Page Breaks.- 32.4.5 Closing Remark.- 32.5 Penalties Controlling Page Breaks.- 32.5.1 Macros Combining Vertical Glue and Vertical Penalties, \smallbreak, \medbreak, and \bigbreak.- 32.5.2 Explicit Vertical Penalties, \filbreak, \goodbreak, \eject.- 32.5.3 Applying Explicit Vertical Penalties.- 32.5.4 Implicit Vertical Penalties.- 32.5.5 Illustrating \interline-, \club-, \widow- and \brokenpenalty.- 32.5.6 Page Breaks Around Headings.- 32.5.7 Other Approaches to Header Macros.- 32.6 Other Page Break Algorithm Controlling Parameters.- 32.6.1 Some Basic Parameters.- 32.6.2 Other \page Parameters.- 32.7 Insertions.- 32.7.1 Insertion Classes Are Identified by Numbers.- 32.7.2 \newinsert To Allocate a New Insertion Class.- 32.7.3 Registers in Insertions.- 32.7.4 Generating Insertion Material (\insert).- 32.7.5 Updating \pagegoal in Insertion Processing.- 32.7.6 \insertpenalties.- 32.7.7 \floatingpenalty.- 32.7.8 Counter Parameter \holdinginserts.- 32.7.9 Concluding Remarks About Insertions.- 32.8 Comparing the Line Breaking and the Page Breaking Algorithm.- 32.9 Summary.- 33 Output Routines, Basics.- 33.1 An Overview of the Presented Output Routines.- 33.2 The Page-Breaking Algorithm and Output Routine.- 33.3 Comments on Generating the Chapters on Output Routines.- 33.3.1 Merging DVI Files.- 33.3.2 Dimensions in the Presented Output Routines.- 33.3.3 Visible Boxes in Output Routines.- 33.4 Basics of Output Routines.- 33.4.1 Setting Up an Output Routine, \output.- 33.4.2 Logical/Physical Page.- 33.4.3 Page Dimensions.- 33.4.4 Left-Hand and Right-Hand Pages.- 33.4.5 Portrait Mode and Landscape Mode.- 33.5 Page Numbering, \pageno.- 33.5.1 Page Numbers and \shipout.- 33.5.2 Roman Page Numbers in the Plain Format.- 33.5.3 Plain Format Macros to Administer Page Numbers.- 33.5.4 Double Page Numbers.- 33.5.5 Page Numbers as in “Page 3 of 12”.- 33.6 Box Register 255 and the Output Routine.- 33.6.1 \outputpenalty, \supereject.- 33.6.2 Ending a Document, \end, \bye.- 33.6.3 Vertical Material Generated in the Output Routine.- 33.6.4 Shifting Pages Horizontally and Vertically, \hoffset and \voffset.- 33.6.5 Output Routines Form Implicit Groups.- 33.7 Page Layout and the Output Routine.- 33.8 Summary.- 34 Some Simple Output Routines..- 34.1 Two Trivial Output Routines.- 34.2 An Output Routine for the Selective Printing of Pages.- 34.3 Output Routine Generating Double Rules Around Pages.- 34.4 An Output Routine with Running Heads.- 34.4.1 The Code of the Output Routine.- 34.4.2 An Example Application of the Preceding Output Routine.- 34.5 Output Routine to Print Library Cards.- 34.5.1 The Code of the Output Routine.- 34.5.2 The Source Code of the Example Application.- 34.5.3 The Log File.- 34.6 Specific Positioning Printing.- 34.7 Marks.- 34.7.1 Generation of a Mark Using \mark.- 34.7.2 Accessing Marks by \topmark, \firstmark, and \botmark.- 34.7.3 A Short Example.- 34.7.4 Using Marks for Printing Running Heads in Dictionaries.- 34.7.5 Marks and Running Heads as Used in This Series.- 34.8 Summary.- 35 The Plain Format Output Routine and Insertions.- 35.1 A Brief Overview.- 35.2 A Simplified Output Routine of the Plain Format.- 35.2.1 Running Header and Running Footer, \headline,.- \footline.- 35.2.2 Suppressing the Printing of the Page Number, \nopagenumbers.- 35.2.3 The Code of the Simplified Plain Format Output Routine.- 35.3 The Ordinary Plain Format Output Routine.- 35.4 The Insertions of the Plain Format.- 35.4.1 Footnotes in the Plain Format, \footnote.- 35.4.2 Automatically Numbered Footnotes, \FootNote.- 35.4.3 Topinsertions, Applying \topinsert ... \endinsert.- 35.4.4 Applying \pageinsert ... \endinsert.- 35.4.5 Applying \midinsert ... \endinsert.- 35.4.6 The Macros of the Insertion Class \topins.- 35.4.7 The Definitions of \supereject and \dosupereject.- 35.5 Oversized Insertion Material.- 35.5.1 An Example Showing the Problem.- 35.5.2 Fixing the Problem.- 35.5.3 Repeating the Preceding Example.- 35.6 Modifying \pagecontents and \endinsert.- 35.6.1 A Redefined \pagecontents.- 35.6.2 An Extended \endinsert.- 35.7 Improving \midinsert.- 35.7.1 The Strategy of Fixing \midinsert.- 35.7.2 The Source Code of the New \midinsert.- 35.7.3 Showing That It Works.- 35.8 Dumping the Page’s Main Vertical List into the Logfile, \ShowPlainLists.- 35.9 Output Routine and Related Macros for This Series.- 35.9.1 The Output Routine Used in This Series.- 35.9.2 The Definition of \@PageLayoutCodeThree.- 35.9.3 Figures and Tables Using \topinsert.- 35.10 Summary.- 36 Output Routines with Insertions.- 36.1 An Output Routine Setup for the Development of an Index.- 36.1.1 The Output Routine for Index Printing.- 36.1.2 An Example Application of the Preceding Output Routine.- 36.1.3 A Different Approach Solving the Same Problem.- 36.2 An Output Routine with Flexible Figure Caption Placement.- 36.2.1 Sketching Two Different Solutions.- 36.2.2 Presenting the Solutions.- 36.2.3 Code Common to Both Output Routines.- 36.2.4 The Source Code of the Two Pass Output Routine.- 36.2.5 The Code of the Second Output Routine (One Pass Approach).- 36.2.6 The Source Code of the Example Applications of the Preceding Output Routines.- 36.3 Footnote-Related Problems in the Design of Output Routines.- 36.3.1 Footnote Numbering Reset on Every Page.- 36.3.2 Multiple Footnote References.- 36.4 Limitations of the Insertion Concept.- 36.5 Summary.- 37 Double Column Output Routines.- 37.1 Double Column Output Routine I.- 37.1.1 Source Code of the Output Routine.- 37.1.2 An Example Application.- 37.2 A Single/Double Column Output Routine.- 37.2.1 Macros to Be Called by the User.- 37.2.2 A Quick Rundown.- 37.2.3 The Page Layout of the Presented Macros.- 37.2.4 Column Break Computations.- 37.2.5 Column Break Cases in the Double Column Output Routine.- 37.2.6 On the Presentation of the Macros.- 37.2.7 The Output Routine Macros Source Code.- 37.2.8 The Example Source Code.- 37.3 Summary.- 38 Tables in TEX Using \halign.- 38.1 The Page Layout of the Chapters on Tables.- 38.2 Basics.- 38.2.1 Templates and Preamble.- 38.2.2 Special Symbols and Control Sequences in Tables.- 38.2.3 The General Structure of a Table Built with \halign.- 38.2.4 How TEX Evaluates a Tabled Coded by \halign.- 38.3 Simple Tables.- 38.3.1 Standard Templates.- 38.3.2 A Very Simple Table.- 38.3.3 Leaders in Templates.- 38.3.4 Font Changes and Inline Math Mode in Templates.- 38.3.5 Columns Form Implicit Groups.- 38.3.6 Eliminating a Column.- 38.3.7 Determining the Width of a Column.- 38.3.8 Headings and Table Entries.- 38.3.9 Repeated Use of Table Entries.- 38.3.10 Repeated Entries in Columns.- 38.3.11 Templates Without Glue.- 38.3.12 Omitting Templates, \omit.- 38.3.13 Omitting and Skipping Columns, Empty Rows.- 38.3.14 Using Glue of a Higher Order to Change Justification.- 38.3.15 Static Columns.- 38.3.16 Repeated Use of the Same Template(s).- 38.3.17 Spaces After the Tab Character “&” Are Ignored.- 38.4 Spacing Between Table Columns, \tabskip.- 38.4.1 Identical \tabskip for All Columns.- 38.4.2 Tables with Different \tabskips for Each Column.- 38.4.3 Spaces and Templates.- 38.4.4 Incomplete \tabskip Specifications.- 38.4.5 The Special Importance of First and Last \tabskip.- 38.4.6 \tabskip Default, tab0.- 38.4.7 Another Example.- 38.5 Controlling the Spacing Between Columns by Glue in Templates.- 38.6 Numerical Alignment.- 38.6.1 The Right-Justified/Left-Justified Solution.- 38.6.2 The Decimal Point as an Alignment Character.- 38.6.3 Aligning Numbers Using a Dummy Character.- 38.7 The Width of a Table.- 38.7.1 \halign spread and \halign to.- 38.7.2 Presetting the Width of Each Column.- 38.8 Summary.- 39 More Tables in TEX Using \halign..- 39.1 Vertical Spacing of Tables.- 39.2 Inserting Material Not Subject to Alignment, \noalign.- 39.2.1 Changing the Vertical Spacing with \noalign.- 39.2.2 Inserting Horizontal Rules with \noalign.- 39.2.3 Multiple \noaligns.- 39.2.4 Double Printed Horizontal Rules.- 39.2.5 Horizontal Rules Made Part of the \vbox Enclosing the.- Table.- 39.3 Entries Spanning Multiple Columns.- 39.3.1 Macro \hidewidth.- 39.3.2 \span and \omit, \multispan.- 39.3.3 A Problem with \multispan.- 39.3.4 Headers Over Left- and Right-Justified Columns.- 39.4 Struts and the Vertical Spacing of Tables.- 39.4.1 A Table with Strut-Controlled Spacing.- 39.4.2 Using \offinterlineskip but No Struts.- 39.4.3 Using a Different Strut.- 39.5 Vertical Rules in Tables.- 39.5.1 A Simple Example.- 39.5.2 Separating Struts and Vertical Rules.- 39.5.3 Multiple Vertical Rules.- 39.6 Vertical and Horizontal Rules.- 39.6.1 \tabskips and Struts.- 39.6.2 Double Vertical Rules.- 39.6.3 Fine-Tuning Vertical Rules.- 39.6.4 Vertical Rules and \multispan.- 39.6.5 First and Last Rows in a Table with Horizontal Rules.- 39.6.6 Horizontal Rules Spanning Selected Columns Only.- 39.7 The Proper Way to Input Tables.- 39.8 Summary.- 40 Even More Tables.- 40.1 Centering a Table on the Page.- 40.1.1 Centering a Table Using Display Mathmode.- 40.1.2 Centering a Table Using \tabskip.- 40.1.3 One Column Text, Widest Entry Centered.- 40.1.4 Centering a Table Using \centerline.- 40.2 Sparse Tables.- 40.2.1 An Example.- 40.2.2 Naming Columns.- 40.3 Vboxes as Table Entries.- 40.3.1 A Paragraph As a Table Entry.- 40.3.2 Improved Version of a Paragraph within a Table.- 40.3.3 Another Case of a Paragraph in a Table.- 40.3.4 Tables Inside Tables.- 40.4 Tables and Paragraphs.- 40.4.1 A Paragraph Followed by a Table.- 40.4.2 Footnotes in Tables.- 40.4.3 Paragraphs Between Table Rows.- 40.4.4 Computing the Width of a Paragraph Table Column.- 40.5 Tables Can Run Across Multiple Pages.- 40.6 Macros to Build Tables and Preambles.- 40.6.1 Beginning and Ending Tables using \bgroup and \egroup.- 40.6.2 Macros Defining a Preamble.- 40.6.3 Macros for Templates.- 40.6.4 Template Macros, Forced Expansion Using \edef.- 40.6.5 Template Macros, Forced Expansion Using \span.- 40.6.6 Changing Templates.- 40.6.7 A Forgotten \cr Can Be Inserted Automatically, \crcr.- 40.6.8 Macros to Begin and En nd Centered Tables.- 40.7 Summary.- 41 Still Tables.- 41.1 Numerical Computations in Tables.- 41.2 Parentheses Around and Within Tables.- 41.2.1 Parenthesis Around a Table.- 41.2.2 Increasing the Height and Depth of Parentheses Around Tables.- 41.2.3 Parentheses Spanning Multiple Rows Within a Table.- 41.3 Vertical Splitting Tables by Hand.- 41.3.1 An Easy Example.- 41.3.2 Splitting the Table Twice.- 41.3.3 Penalty Controlled Splits.- 41.3.4 Page Breaks in Tables with Horizontal Rules.- 41.4 Table-Related Macros in the Plain Format.- 41.5 Vertical Alignment, \valign.- 41.6 Double Tables.- 41.6.1 Some Double Table Examples.- 41.6.2 Organizing a Double Table.- 41.6.3 Printing the Left and Right Table Separately.- 41.6.4 Double Tables with Semiautomatic Determination of the Column Widths of Text Columns.- 41.6.5 Stretching Tables without Paragraph Text Columns.- 41.7 The Placement of Tables.- 41.7.1 Tables within Paragraphs.- 41.7.2 Two Tables Side-By-Side.- 41.8 The Token Register \everycr.- 41.8.1 \everycr and \cr of the Preamble.- 41.8.2 An Example.- 41.9 Expansion Issues in Tables.- 41.10 Summary.- Source Code File Index.