The Latex2ε Sources
Total Page:16
File Type:pdf, Size:1020Kb
The LATEX 2" Sources Johannes Braams David Carlisle Alan Jeffrey Leslie Lamport Frank Mittelbach Chris Rowley Rainer Sch¨opf 1998/06/01 Contents a ltdirchk.dtx 1 1 LATEX System Dependent Initialisations 1 2 Initialisation 2 2.1 INITEX ................................. 2 2.2 Some bits of 2e ............................. 3 3 texsys.cfg 4 3.1 texsys.cfg ................................ 4 3.2 UNIX (web2c) ............................. 5 3.3 UNIX (other) .............................. 5 3.4 MSDOS (emtex) ............................ 6 3.5 MSDOS (other) ............................. 6 3.6 VMS (DECUS TEX, PD VMS 3.6) .................. 6 3.7 VMS (???) ................................ 6 3.8 MACINTOSH (OzTeX 1.6) ...................... 6 3.9 MACINTOSH (other) ......................... 7 3.10 FAKE EXAMPLE ........................... 7 4 Setting \@currdir 7 5 Setting \input@path 9 6 Filename Parsing 10 7 TEX Versions 11 8 ltxcheck.tex 12 i b ltplain.dtx 13 9 Plain TEX 13 c ltvers.dtx 24 10 Version Identifictation 24 d ltdefns.dtx 25 11 Definitions 25 11.1 Initex initialisations .......................... 25 11.2 Saved versions of TEX primitives ................... 25 11.3 Command definitions .......................... 26 11.4 Robust commands and protect .................... 33 11.5 Internal defining commands ...................... 36 11.6 Commands for Autoloading ...................... 37 e ltalloc.dtx 39 12 Counters 39 f ltcntrl.dtx 41 13 Program control structure 41 g lterror.dtx 45 14 Error handling 45 14.1 General commands ........................... 45 14.2 Specific errors .............................. 50 h ltpar.dtx 54 15 Paragraphs 54 15.1 Implementation ............................. 54 i ltspace.dtx 56 16 Spacing 56 16.1 User Commands ............................ 56 16.2 Chris' comments ............................ 56 16.3 Some immediate actions ........................ 58 16.4 The code ................................ 59 16.5 Vertical spacing ............................. 63 ii 16.6 Horizontal space ............................ 65 j ltlogos.dtx 68 17 Logos 68 k ltfiles.dtx 69 18 File Handling 69 18.1 Safe Input Macros ........................... 75 18.2 Listing files ............................... 77 l ltoutenc.dtx 79 19 Font encodings 79 19.1 Removing encoding-specific commands ................ 81 19.2 The order of declarations ....................... 82 19.3 Docstrip modules ............................ 82 19.4 Definitions for the kernel ........................ 83 19.4.1 Declaration commands ..................... 83 19.4.2 Hyphenation .......................... 88 19.4.3 Miscellania ........................... 89 19.4.4 Default encodings ....................... 89 19.4.5 Math material ......................... 91 19.5 The fontenc package .......................... 91 19.6 Definitions for the OT1 encoding ................... 92 19.7 Definitions for the T1 encoding .................... 93 19.8 Definitions for the OMS encoding ................... 98 19.9 Definitions for the OML encoding ................... 98 19.10Definitions for the OT4 encoding ................... 99 20 Package files 105 m ltcounts.dtx 109 21 Counters and Lengths 109 21.1 Environment Counter Macros ..................... 109 n ltlength.dtx 113 22 Lengths 113 o ltfssbas.dtx 114 23 Autoloading parts of NFSS 114 iii 24 Preliminary macros 114 25 Macros for setting up the tables 115 26 Selecting a new font 120 26.1 Macros for the user ........................... 120 26.2 Macros for loading fonts ........................ 123 27 Assigning math fonts to versions 129 p ltfsstrc.dtx 134 28 Introduction 134 29 A driver for this document 134 30 The Implementation 135 31 Handling Options 135 32 Macros common to fam.tex and tracefnt.sty 137 32.1 General font loading .......................... 137 32.2 Math fonts setup ............................ 141 32.2.1 Outline of algorithm for math font sizes ........... 141 32.2.2 Code for math font size setting ................ 143 32.2.3 Other code for math ...................... 144 33 Scaled font extraction 146 33.1 Sizefunctions .............................. 153 q ltfsscmp.dtx 157 34 Compatibility code for NFSS release 1 157 r ltfssdcl.dtx 162 35 Interface Commands 162 s ltfssini.dtx 183 36 NFSS Initialisation 183 36.1 Providing math versions ........................ 183 36.2 Miscellaneous .............................. 184 t fontdef.dtx 189 37 Introduction 189 iv 38 Customization 189 39 The docstrip modules 190 40 A driver for this document 190 41 The fonttext.ltx file 190 41.1 Encodings ................................ 191 41.2 Defaults ................................. 192 42 The fontmath.ltx file 193 42.1 The font encodings used ........................ 193 42.1.1 Symbolfont and Alphabet declarations ............ 193 42.2 Math font sizes ............................. 194 42.3 The math symbol assignments ..................... 195 42.3.1 The letters ........................... 195 42.3.2 The digits ............................ 196 42.3.3 Punctuation, brace, etc. keys ................. 196 42.3.4 Delimitercodes for characters ................. 196 42.4 Symbols accessed via control sequences ................ 197 42.4.1 Greek letters .......................... 197 42.4.2 Ordinary symbols ....................... 198 42.4.3 Large Operators ........................ 198 42.4.4 Binary symbols ......................... 199 42.4.5 Relations ............................ 199 42.4.6 Arrows ............................. 201 42.4.7 Punctuation symbols ...................... 201 42.4.8 Math accents .......................... 201 42.4.9 Radicals ............................. 202 42.4.10 Over and under something, etc ................ 202 42.4.11 Delimiters ............................ 202 42.5 Math versions of text commands ................... 204 42.6 Other special functions and parameters ............... 204 42.6.1 Biggggg ............................. 204 42.6.2 The log-like functions ..................... 204 42.6.3 Parameters ........................... 204 u preload.dtx 205 43 Overview 205 44 Customization 205 45 Module switches for the docstrip program 206 46 A driver for this document 206 47 The code 206 v v ltfntcmd.dtx 209 48 Introduction 209 49 The implementation 211 50 Initialization 216 w ltpageno.dtx 217 51 Page Numbering 217 x ltxref.dtx 218 52 Cross Referencing 218 52.1 Cross Referencing ............................ 218 52.2 An extension of counter referencing .................. 220 y ltmiscen.dtx 222 53 Miscellaneous Environments 222 53.1 Environments .............................. 222 53.2 Center, Flushright, Flushleft ...................... 226 53.3 Verbatim ................................ 228 z ltmath.dtx 231 54 Math setup 231 54.1 Math commands based on plain TEX ................. 231 54.1.1 The log-like functions ..................... 231 54.1.2 Biggggg ............................. 232 54.1.3 The UNSORTED Rest ..................... 232 54.2 Math Environments .......................... 235 54.3 External options to the standard document classes ......... 238 54.3.1 Left equation numbering .................... 238 54.3.2 Flush left equations ...................... 238 A ltlists.dtx 241 55 List, and related environments 241 55.1 List and Trivlist ............................ 242 55.2 Vertical Spacing (skips) ........................ 243 55.3 Penalties ................................. 243 55.4 Horizontal Spacing (dimens) ...................... 243 55.5 Default Values ............................. 244 55.6 Itemize and Enumerate ........................ 253 vi B ltboxes.dtx 256 56 LATEX Box commands 256 56.1 Some low-level constructs ....................... 266 C ltpictur.dtx 267 57 Picture Mode 267 57.1 Curves .................................. 285 D ltthm.dtx 288 58 Theorem Environments 288 E ltsect.dtx 292 59 Sectioning Commands 292 59.1 The Title ................................ 292 59.2 Sectioning ................................ 293 59.2.1 Initializations .......................... 299 59.3 Table of Contents etc. ......................... 299 59.3.1 Convention ........................... 299 59.3.2 Commands ........................... 299 F ltfloat.dtx 302 60 Floats 302 60.1 Floating Environments ......................... 302 60.2 Footnotes ................................ 313 G ltidxglo.dtx 318 61 Index and Glossary Generation 318 H ltbibl.dtx 320 62 Bibliography Generation 320 62.1 Default definitions ........................... 322 I ltpage.dtx 323 63 Page styles and related commands 323 63.1 Page Style Commands ......................... 323 63.2 How a page style makes running heads and feet ........... 323 63.3 marking conventions .......................... 323 vii J ltoutput.dtx 326 64 Output Routine 326 64.1 Floats .................................. 326 64.1.1 Kludgeins ............................ 366 64.1.2 Float control .......................... 368 64.1.3 Float placement parameters .................. 377 K ltclass.dtx 380 65 Introduction 380 66 User interface 380 66.1 Option processing ........................... 381 67 Class and Package interface 381 67.1 Class name and version ........................ 381 67.2 Package name and version ....................... 382 67.3 Requiring other packages ....................... 382 67.4 Declaring new options ......................... 383 67.5 Safe Input Macros ........................... 383 68 Implementation 384 68.1 Hooks .................................. 393 68.2 Providing shipment ........................... 395 69 After Preamble 397 L lthyphen.dtx 398 M ltfinal.dtx 400 70 Final