D IGI T A L T YPOGRAPHY
A
U SING L T X
E
Springer
New Y o rk Berlin Heidelberg Hong Kong London Milan Paris Tokyo
Apostolos Syropoulos Antonis Tsolomitis Nick Sofroniou
D IGI T A L T YPOGRAPHY
A
U SING L T X
E
With 68 Illustrations
Apostolos Syropoulos 366, 28th October St. GR-671 00 Xanthi
Antonis Tsolomitis Dept. of Mathematics University of the Aegean GR-832 00 Karlobasi, Samos GREECE
GREECE [email protected] [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.
- 9 8 7 6 5 4 3 2 1
- 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 m y parents,
Panagiotis and Evangelia, and to my wife,
Angeliki.
— A.T.
◆
To m y father,
Andreas Sofroniou, who introduced me to computers when they were few and far between.
— N.S.
C
Foreword by Yannis Haralambous Preface xv xxv
- 1
- Introduction
- 1
134
1.1 What Is T X? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E
1.2 Logical versus Visual Design . . . . . . . . . . . . . . . . . . . . . . . . .
A
1.3 Preparing a Document with LT X . . . . . . . . . . . . . . . . . . . . . .
E
1.4 How Does T X Typeset? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
E
1.5 More Information and Resources . . . . . . . . . . . . . . . . . . . . . . . 11
- 2
- ꢀe File Structure
- 13
2.1 ꢀe Characters We Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Document Classes and Paꢁages . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Sectioning Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.4 ꢀe Document Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.5 Basic Logos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.6 Article Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.7 Leꢂer Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.8 Producing Proceedings Articles . . . . . . . . . . . . . . . . . . . . . . . 33 2.9 Combining Individual LT X Files . . . . . . . . . . . . . . . . . . . . . . 34
A
E
- 3
- Fonts and ꢀeir Use
- 39
3.1 Classification of Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.2 Accessing more Glyphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.2.1 Euro Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.2.2 ꢀe wasysym Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.2.3 Phonetic Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.3 Automated Special Glyphs Selection . . . . . . . . . . . . . . . . . . . . . 53 3.4 Size-Changing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 56
-
- C
3.5 Advanced Accents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
- 4
- Lists and Catalogs
- 61
4.1 Units of Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.2 Typeseꢀing Poetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.3.1 Customizing the Standard Lists . . . . . . . . . . . . . . . . . . . . 66
4.4 ꢁotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.5 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.5.1 Customizing Footnotes . . . . . . . . . . . . . . . . . . . . . . . . 71 4.5.2 Endnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.6 Simulating Typed Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.6.1 Advanced Typed Text Simulation . . . . . . . . . . . . . . . . . . 75
4.7 Centering and Flushing Text . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.8 Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.8.1 ꢂe tabbing Environment . . . . . . . . . . . . . . . . . . . . . . . 79 4.8.2 ꢂe tabular Environment . . . . . . . . . . . . . . . . . . . . . . . 80
4.9 More on Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
- 5
- Typeseꢀing Mathematics
- 93
5.1 ꢂe Mathematics Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.2 Font Selection in Mathematics Mode . . . . . . . . . . . . . . . . . . . . . 94 5.3 Symbols for the Mathematics Mode . . . . . . . . . . . . . . . . . . . . . 95
5.3.1 Special Latin Alphabets . . . . . . . . . . . . . . . . . . . . . . . . 95 5.3.2 ꢂe Greek Leꢀers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.3.3 Accents in Math Mode . . . . . . . . . . . . . . . . . . . . . . . . . 97 5.3.4 Binary Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 5.3.5 Variable-Size Operators . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3.6 Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3.7 Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3.8 Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . 100 5.3.9 Miscellaneous Symbols . . . . . . . . . . . . . . . . . . . . . . . . 102 5.3.10 More Math Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . 103 5.3.11 Other Mathematics Font Families . . . . . . . . . . . . . . . . . . . 107
5.4 ꢂe Art of Typeseꢀing Mathematical Text . . . . . . . . . . . . . . . . . . 107
5.4.1 Exponents, Indices, Fractions, and Roots . . . . . . . . . . . . . . 107 5.4.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.4.3 One Above the Other . . . . . . . . . . . . . . . . . . . . . . . . . . 111 5.4.4 Horizontal Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 5.4.5 Integrals and Series . . . . . . . . . . . . . . . . . . . . . . . . . . . 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.11 Commutative Diagrams . . . . . . . . . . . . . . . . . . . . . . . . 126
5.5 ꢀe A S Classes and Paꢁages . . . . . . . . . . . . . . . . . . . . . . . . 128
M
5.5.1 Additional Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . 129 5.5.2 Accents in Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 5.5.3 Dots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.5.4 Nonbreaking Dashes . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.5.5 Over and Under Arrows . . . . . . . . . . . . . . . . . . . . . . . . 131 5.5.6 Multiple Integral Signs . . . . . . . . . . . . . . . . . . . . . . . . . 131 5.5.7 Radicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 5.5.8 Extensible Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 5.5.9 Affixing Symbols to Other Symbols . . . . . . . . . . . . . . . . . 132 5.5.10 Fractions and Related Constructs . . . . . . . . . . . . . . . . . . . 132 5.5.11 ꢀe \smash Command . . . . . . . . . . . . . . . . . . . . . . . . . 133 5.5.12 Operator Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 5.5.13 ꢀe \mod Command and its Relatives . . . . . . . . . . . . . . . . 134 5.5.14 ꢀe \text Command . . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.5.15 Integrals and Sums . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.5.16 Commutative Diagrams . . . . . . . . . . . . . . . . . . . . . . . . 135 5.5.17 Displayed Equations and Aligned Structures . . . . . . . . . . . . 135 5.5.18 Numbering Equations and Referencing . . . . . . . . . . . . . . . 138 5.5.19 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.5.20 Boxed Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.5.21 Customizing ꢀeorems . . . . . . . . . . . . . . . . . . . . . . . . 141 5.5.22 Options of the amsmath Paꢁage . . . . . . . . . . . . . . . . . . . 142
A
5.5.23 Converting from Standard LT X to the A S Paꢁages . . . . . . 143
M
E
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 Horizontal and Vertical Space . . . . . . . . . . . . . . . . . . . . . . . . 163
6.3.1 Length Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6.3.2 Horizontal Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 6.3.3 Vertical Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
6.4 Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 6.5 Floating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.6 Marginal Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 6.7 Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
-
- C
6.8 Page Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 6.9 ꢀe Preparation of Slides . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
6.9.1 Advanced Slide Preparation . . . . . . . . . . . . . . . . . . . . . . 187
6.10 Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
6.10.1 Fancy Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
6.11 New Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 6.12 New Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 6.13 New Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 6.14 File Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
A
6.15 LT X à l’interactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
E
78
- Miscellaneous Paꢀages
- 215
7.1 ꢀe calc Paꢁage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 7.2 ꢀe ifthen Paꢁage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 7.3 Syntax Cheꢁing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 7.4 Typeseꢂing CD Covers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 7.5 Drop Capitals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 7.6 Preparing a Curriculum Vitae . . . . . . . . . . . . . . . . . . . . . . . . 222 7.7 Multicolumn Typeseꢂing . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 7.8 Hyphenatable Leꢂer Spacing . . . . . . . . . . . . . . . . . . . . . . . . . 225
- Bibliography and Index
- 229
8.1 Preparing the Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . 229 8.2 Using BT X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
E
8.2.1 ꢀe BT X Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
E
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 Preparing the Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 8.4 in a Multilingual Environment . . . . . . . . . . . . . . . . . 244 8.5 Customizing the Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 8.6 Glossary Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
- 9
- Graphics
- 253
9.1 Drawing with the picture Environment . . . . . . . . . . . . . . . . . . 253
9.1.1 Invisible and Framed Boxes . . . . . . . . . . . . . . . . . . . . . . 254 9.1.2 Lines and Arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 9.1.3 Circles and Curved Shapes . . . . . . . . . . . . . . . . . . . . . . 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 A Scaꢂer Plot of Temperature . . . . . . . . . . . . . . . . . . . . . 261
- C
-
9.1.9 picture-Related Paꢀages and Systems . . . . . . . . . . . . . . . 264
9.2 ꢁe Gnuplot System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 9.3 ꢁe graphicx Paꢀage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
9.3.1 Playing with Words . . . . . . . . . . . . . . . . . . . . . . . . . . 268
A
9.4 Images that Can Be Loaded to a LT X File . . . . . . . . . . . . . . . . . . 270
E
A
9.5 Image Inclusion with pdfLT X . . . . . . . . . . . . . . . . . . . . . . . . 271
E
9.6 Images in the Baꢀground . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 9.7 ꢁe rotating Paꢀage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 9.8 Mathematics Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 9.9 ꢁe PCT X Paꢀage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
- I
- E
- 9.9.1 ꢁe PPCH
- Paꢀage . . . . . . . . . . . . . . . . . . . . . . . . . . 285
9.9.2 ꢁe PSTriTꢀEXs Paꢀages . . . . . . . . . . . . . . . . . . . . . . . . . 286
9.10 Graphs with METAPOST . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 9.11 Color Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
9.11.1 Color in our Documents . . . . . . . . . . . . . . . . . . . . . . . . 293 9.11.2 Coloring Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 9.11.3 Color and the Printing Industry . . . . . . . . . . . . . . . . . . . 299
9.12 Printing in Landscape Mode . . . . . . . . . . . . . . . . . . . . . . . . . 299
- 10 Multilingual Typeseꢀing
- 301
10.1 ꢁe babel Paꢀage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 10.2 ꢁe Ω Typeseꢂing Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 10.3 ꢁe ε-T X Typeseꢂing Engine . . . . . . . . . . . . . . . . . . . . . . . . . 314
E
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 ꢁe Latin Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 10.6 ꢁe Dutꢃ Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 10.7 ꢁe Esperanto Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 10.8 ꢁe Italian Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 10.9 ꢁe Irish and ‘‘British’’ Languages . . . . . . . . . . . . . . . . . . . . . . 321 10.10 ꢁe German Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 10.11 ꢁe Frenꢃ Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 10.12 ꢁe Breton Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 10.13 ꢁe Nordic Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 10.14 ꢁe ꢁai Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 10.15 ꢁe Bahasa Indonesia Language . . . . . . . . . . . . . . . . . . . . . . . 326 10.16 ꢁe Slovenian Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 10.17 ꢁe Romanian Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 10.18 ꢁe Slovak Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 10.19 ꢁe Czeꢃ Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 10.20 ꢁe Tibetan Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327