DIGITAL TYPOGRAPHY USING LATEX Springer New York Berlin Heidelberg Hong Kong London Milan Paris Tokyo Apostolos Syropoulos Antonis Tsolomitis Nick Sofroniou
DIGITAL TYPOGRAPHY USING LATEX
With 68 Illustrations Apostolos Syropoulos Antonis Tsolomitis 366, 28th October St. Dept. of Mathematics GR-671 00 Xanthi University of the Aegean GREECE GR-832 00 Karlobasi, Samos [email protected] GREECE [email protected]
Nick Sofroniou Educational Research Centre St. Patrick’s College Drumcondra, Dublin 9 IRELAND [email protected]
Library of Congress Cataloging-in-Publication Data Syropoulos, Apostolos. Digital typography using LaTeX / Apostolos Syropoulos, Antonis Tsolomitis, Nick Sofroniou. p. cm. Includes bibliographical references and indexes. ISBN 0-387-95217-9 (acid-free paper) 1. LaTeX (Computer file) 2. Computerized typesetting. I. Tsolomitis, Antonis. II. Sofroniou, Nick. III. Title. Z253.4.L38 S97 2002 686.2´2544—dc21 2002070557
ACM Computing Classification (1998): H.5.2, I.7.2, I.7.4, K.8.1
ISBN 0-387-95217-9 (alk. paper) Printed on acid-free paper.
Printed on acid-free paper.
© 2003 Springer-Verlag New York, Inc. All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer-Verlag New York, Inc., 175 Fifth Avenue, New York, NY 10010, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether they are subject to proprietary rights.
Printed in the United States of America.
987654321 SPIN 10791970
A Typesetting: Pages created by the authors using L TEX www.springer-ny.com
Springer-Verlag New York Berlin Heidelberg A member of BertelsmannSpringer Science+Business Media GmbH Dedicated to the fond memory of Mikhail Syropoulos, my beloved brother, to my parents, Georgios and Vassiliki, and to my son, Demetrios-Georgios. — A.S.
◆
To my parents, Panagiotis and Evangelia, and to my wife, Angeliki. — A.T.
◆
To my father, Andreas Sofroniou, who introduced me to computers when they were few and far between. — N.S. C
Foreword by Yannis Haralambous xv
Preface xxv
1 Introduction 1 1.1 What Is TEX?...... 1 1.2 LogicalversusVisualDesign...... 3 A 1.3 Preparing a Document with LTEX ...... 4 1.4 How Does TEXTypeset?...... 10 1.5 MoreInformationandResources...... 11
2 e File Structure 13 2.1 eCharactersWeType...... 13 2.2 DocumentClassesandPa ages...... 17 2.3 Sectioning Commands ...... 20 2.4 eDocumentTitle...... 26 2.5 BasicLogos...... 28 2.6 ArticlePreparation...... 29 2.7 Le erPreparation...... 31 2.8 ProducingProceedingsArticles...... 33 A 2.9 Combining Individual LTEX Files ...... 34 3 Fonts and eir Use 39 3.1 ClassificationofFonts...... 39 3.2 AccessingmoreGlyphs...... 46 3.2.1 EuroFont...... 50 3.2.2 e wasysym Fonts...... 50 3.2.3 Phonetic Fonts ...... 52 3.3 AutomatedSpecialGlyphsSelection...... 53 3.4 Size-Changing Commands ...... 56 C
3.5 AdvancedAccents...... 59
4 Lists and Catalogs 61 4.1 UnitsofMeasure...... 61 4.2 Typese ingPoetry...... 63 4.3 Lists...... 64 4.3.1 CustomizingtheStandardLists...... 66 4.4 otations...... 68 4.5 Footnotes...... 69 4.5.1 CustomizingFootnotes...... 71 4.5.2 Endnotes...... 73 4.6 SimulatingTypedText...... 74 4.6.1 AdvancedTypedTextSimulation...... 75 4.7 CenteringandFlushingText...... 77 4.8 Alignment...... 78 4.8.1 e tabbing Environment ...... 79 4.8.2 e tabular Environment ...... 80 4.9 MoreonAlignment...... 84
5 Typese ing Mathematics 93 5.1 eMathematicsMode...... 93 5.2 FontSelectioninMathematicsMode...... 94 5.3 SymbolsfortheMathematicsMode...... 95 5.3.1 SpecialLatinAlphabets...... 95 5.3.2 e Greek Le ers ...... 96 5.3.3 AccentsinMathMode...... 97 5.3.4 BinaryOperators...... 98 5.3.5 Variable-SizeOperators...... 99 5.3.6 Delimiters...... 99 5.3.7 Arrows...... 99 5.3.8 RelationalOperators...... 100 5.3.9 MiscellaneousSymbols...... 102 5.3.10MoreMathSymbols...... 103 5.3.11 Other Mathematics Font Families ...... 107 5.4 eArtofTypese ingMathematicalText...... 107 5.4.1 Exponents, Indices, Fractions, and Roots ...... 107 5.4.2 Functions...... 109 5.4.3 OneAbovetheOther...... 111 5.4.4 HorizontalSpace...... 113 5.4.5 IntegralsandSeries...... 113 5.4.6 Matrices, Arrays, and Nonanalytically Defined Functions . . . . 115 5.4.7 eorems...... 117 5.4.8 Customizing the theorem Environment ...... 119 C
5.4.9 Equations...... 124 5.4.10 Size Selection in Math Modes ...... 126 5.4.11CommutativeDiagrams...... 126 5.5 e AMS ClassesandPa ages...... 128 5.5.1 AdditionalSymbols...... 129 5.5.2 AccentsinMath...... 129 5.5.3 Dots...... 130 5.5.4 NonbreakingDashes...... 130 5.5.5 OverandUnderArrows...... 131 5.5.6 MultipleIntegralSigns...... 131 5.5.7 Radicals...... 131 5.5.8 ExtensibleArrows...... 132 5.5.9 AffixingSymbolstoOtherSymbols...... 132 5.5.10 Fractions and Related Constructs ...... 132 5.5.11 e \smash Command ...... 133 5.5.12OperatorNames...... 133 5.5.13 e \mod Command and its Relatives ...... 134 5.5.14 e \text Command ...... 134 5.5.15IntegralsandSums...... 134 5.5.16CommutativeDiagrams...... 135 5.5.17 Displayed Equations and Aligned Structures ...... 135 5.5.18 Numbering Equations and Referencing ...... 138 5.5.19Matrices...... 140 5.5.20BoxedFormulas...... 140 5.5.21Customizing eorems...... 141 5.5.22 Options of the amsmath Pa age...... 142 A 5.5.23 Converting from Standard LTEXtotheAMS Pa ages ...... 143 5.5.24 e amsart Top Ma er Commands ...... 143 5.6 From Λ to MML ...... 144 5.7 Generating OMDoc Files ...... 148
6 More on the Core 151 6.1 Labels and References ...... 151 6.2 Hyper-references ...... 155 6.3 HorizontalandVerticalSpace...... 163 6.3.1 LengthVariables...... 163 6.3.2 HorizontalSpace...... 164 6.3.3 VerticalSpace...... 166 6.4 Counters...... 168 6.5 FloatingObjects...... 170 6.6 MarginalNotes...... 178 6.7 PageLayout...... 179 C
6.8 PageStyles...... 182 6.9 ePreparationofSlides...... 185 6.9.1 Advanced Slide Preparation ...... 187 6.10Boxes...... 196 6.10.1FancyBoxes...... 199 6.11 New Commands ...... 203 6.12 New Environments ...... 207 6.13NewLists...... 208 6.14 File Input ...... 211 A 6.15 LTEXàl’interactive...... 213 7 Miscellaneous Pa ages 215 7.1 e calc Pa age...... 215 7.2 e ifthen Pa age...... 216 7.3 SyntaxChe ing...... 217 7.4 Typese ingCDCovers...... 218 7.5 DropCapitals...... 220 7.6 PreparingaCurriculumVitae...... 222 7.7 MulticolumnTypese ing...... 225 7.8 HyphenatableLe erSpacing...... 225
8 Bibliography and Index 229 8.1 PreparingtheBibliography...... 229 8.2 Using B TEX ...... 231 8.2.1 e B TEXFields...... 236 8.2.2 Typese ing a Bibliographic Database ...... 237 8.2.3 Multiple Bibliographies in One Document ...... 237 8.2.4 Bibliography in a Multilingual Environment ...... 238 8.3 PreparingtheIndex...... 241 8.4 in a Multilingual Environment ...... 244 8.5 CustomizingtheIndex...... 245 8.6 GlossaryPreparation...... 247
9 Graphics 253 9.1 Drawing with the picture Environment ...... 253 9.1.1 InvisibleandFramedBoxes...... 254 9.1.2 LinesandArrows...... 255 9.1.3 CirclesandCurvedShapes...... 256 9.1.4 e Construction of Pa erns ...... 256 9.1.5 An Example of the Calculation of the Area of a Square ...... 257 9.1.6 A Diagram for the Calculation of the Area of a Circle ...... 258 9.1.7 Box-and-Whisker Plots in the Style of John W. Tukey ...... 259 9.1.8 ASca erPlotofTemperature...... 261 C
9.1.9 picture-Related Pa ages and Systems ...... 264 9.2 eGnuplotSystem...... 266 9.3 e graphicx Pa age...... 266 9.3.1 PlayingwithWords...... 268 A 9.4 Images that Can Be Loaded to a LTEX File ...... 270 A 9.5 Image Inclusion with pdfLTEX ...... 271 9.6 ImagesintheBa ground...... 271 9.7 e rotating Pa age...... 272 9.8 MathematicsDrawing...... 274 9.9 e PICTEXPa age...... 275 9.9.1 e PPCHTEX Pa age...... 285 9.9.2 ePSTri sPa ages...... 286 9.10 Graphs with METAPOST ...... 289 9.11ColorInformation...... 293 9.11.1 Color in our Documents ...... 293 9.11.2ColoringTables...... 295 9.11.3ColorandthePrintingIndustry...... 299 9.12PrintinginLandscapeMode...... 299
10 Multilingual Typese ing 301 10.1 e babel Pa age...... 302 10.2 e Ω Typese ingEngine...... 304 10.3 e ε-TEXTypese ingEngine...... 314 10.4 e Greek Language ...... 315 10.4.1 Writing Greek Philological Texts ...... 317 10.4.2 Working with esaurus Linguae Grecae ...... 318 10.5 eLatinLanguage...... 319 10.6 eDutLanguage...... 319 10.7 eEsperantoLanguage...... 320 10.8 eItalianLanguage...... 321 10.9 eIrishand‘‘British’’Languages...... 321 10.10 eGermanLanguage...... 321 10.11 eFrenLanguage...... 322 10.12 eBretonLanguage...... 323 10.13 eNordicLanguages...... 323 10.14 e aiLanguage...... 324 10.15 eBahasaIndonesiaLanguage...... 326 10.16 eSlovenianLanguage...... 326 10.17 eRomanianLanguage...... 327 10.18 eSlovakLanguage...... 327 10.19 eCzeLanguage...... 327 10.20 e Tibetan Language ...... 327 C
10.21 eJapaneseLanguage...... 329 10.22 e Spanish Language ...... 332 10.23OtherIberianLanguages...... 333 10.24 eEstonianLanguage...... 334 10.25 eKoreanLanguage...... 334 10.26 eHebrewLanguage...... 336 10.27 e Cyrillic Script ...... 338 10.28 eArmenianLanguage...... 340 10.29 e Polish Language ...... 342 10.30 e Georgian Language ...... 343 10.31 eEthiopianLanguage...... 344 10.32 eSerbianLanguage...... 346 10.33 eSorbianLanguages...... 347 10.34 eCroatianLanguage...... 347 10.35 ePerso-ArabicLanguages...... 348 10.36India’sLanguages...... 351 10.37 eCherokeeLanguage...... 355 10.38 eHungarianLanguage...... 357 10.39 eTurkishLanguage...... 358 10.40 eMongolianLanguage...... 358 10.40.1 Modern Mongolian — Cyrillic ...... 359 10.40.2ClassicalMongolian—Uighur...... 360 10.40.3 Classical Mongolian — Horizontal Square Writing ...... 362 10.40.4 Classical Mongolian – Soyombo ...... 363 10.41 eVietnameseLanguage...... 365 10.42 eManuLanguage...... 366 10.43 eInuktitutLanguage...... 367 10.44AraicWritingSystems...... 368
11 To Err Is Human 375 A 11.1 LTEX’sErrorLocator...... 377 11.2ErrorMessages...... 378 A 11.2.1 Errors found by LTEX ...... 381 A 11.2.2 Errors in LTEXPa ages...... 384 11.2.3 Errors Found by TEX ...... 384 11.3Warnings...... 387 A 11.3.1 Warnings Generated by LTEX...... 387 11.3.2 Warnings Generated by TEX...... 390 11.4 eLastStraw...... 390 C
12 Installing New Type 393 12.1 Installing METAFONT Fonts...... 393 A 12.2 Installing Type 1 Text Fonts in LTEX...... 394 12.2.1ExtractingMetricInformation...... 394 12.2.2EncodingVectors...... 395 12.2.3 Creating Virtual Fonts and Metric Files ...... 398 12.2.4 Creating More Fonts from a Type 1 Font ...... 400 12.3 Virtual Property List Files ...... 400 12.3.1TwoApplications...... 405 12.4 Creating Support Pa ages and Font Definition Files ...... 408 12.5 Systemwide Installation of Prepared Fonts ...... 411 A 12.6 Installing Scalable Fonts for pdfLTEX ...... 411 12.7 Installing Scalable Fonts for Λ ...... 413 12.8OpenTypeFonts...... 415 A 12.9 Installing Math Fonts for LTEX ...... 415 12.10 Installing Math Fonts for Λ ...... 420
Appendix A Using dvips 425
Appendix B Visual Editing 433
Appendix C Typese ing XML 439
Appendix D Web Publishing 445 A D.1 LTEX2HTML...... 445 D.2 tex4ht ...... 447
Appendix E New Features Introduced to Ω 1.23 451
Appendix F Solutions to All Exercises 455
Bibliography 469
Name Index 471
Subject Index 475 F