Baskerville The Annals of the UK TEX Users Group Guest Editor: Dominik Wujastyk Vol. 9 No. 2 ISSN 1354–5930 August 1999 Baskerville is set in Monotype Baskerville, with Typewriter for literal text. Editing, production and distribution are undertaken by members of the Committee. Contributions and correspondence should be sent to baskerville@.ac.uk.

Editorial The Guest Editor of the last issue of Baskerville, James Foster, maintainer of this FAQ, many people have contributed to it, explained in that issue how members of the UK-TUG Com- as is explained in the introduction below. mittee have assumed editorial responsibility for the prepara- The TEX FAQ has been published in Baskerville twice be- tion and formatting of individual numbers of the newsletter. fore, in 1994 and 1995. These are the issues of Baskerville Like James, I am deeply grateful for, and awed by, the amount which I have most often lent or recommended to other TEX of work and expertise which Sebastian Rahtz has put into users. In fact, I currently do not have the 1995 FAQ issue past issues of Baskerville. Thanks, Sebastian! because I gave it away to someone who needed it as a mat- James also mentioned the hard work which Robin ter of urgency! I am confident that this newly updated TEX Fairbairns has done over the years in producing and distrib- FAQ, now expanded to cover 126 questions, will be every bit uting Baskerville. Although Robin is now liberated from these as popular and useful as its predecessors, and will save TEX particular tasks, he is still heavily involved in supporting the users many hours of valuable time. TEX community in various ways. In particular, he is the cur- Don’ overlook Gareth Suggett’ review on p. 37. If you rent custodian and mastermind behind the invaluable TEX write lots of equations, this software could be for you! And FAQ. This he maintains as a multi-format document which finally, I wonder how many Baskerville readers remember the includes an incarnation on the world-wide (see question bits and pieces recalled in Historical Snippets (p. 38)? If you 20 below). have never heard of any of this stuff before, then you are just The TEX FAQ is a very special document, since it tackles the kind of vibrant, new, upcoming UK-TUG member that head-on many of the most urgent and practical issues about we want, infinitely more interested in publishing your work which people need to know when they come into contact than in fiddling with TEX. But TEX wasn’t built in a day, and with TEX. The actual questions which are answered in perhaps these Snippets give a flavour of some of the evolu- this FAQ are those which have appeared most often in the tionary forces which have made TEX and friends what they comp.text.tex discussion group, plus others which surface are today. repeatedly in various fora. Although Robin is the current

❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧

Stop Press : UK TEX Users’ Group Tenth Anniversary Meeting: Knuth to host &A session

The Chairman and Committee of UK-TUG request the Banquet, at which Professor and his wife Jill pleasure of your company at the Tenth Anniversary Meeting will be our guests of honour. After the meal, Don has kindly oftheUKTEXUsers’Group,tobeheldatStAnne’sCol- agreed to give a spontaneous question-and-answer session, 1 lege, Oxford, on Sunday 12th and Monday 13th September and members of UK-TUG will be most welcome to ask Don 1999. questions on any topic which is of mutual interest. The meeting will commence at 11:30 on Sunday 12th Monday 13th will continue the theme of “TEXanditsre- September with the first of a series of talks on the theme lationship to the {SG/HT/}ML family of languages” and “TEX and its relationship to the {SG/HT/X}ML family of may include a tutorial on XSL. languages”. After lunch on Sunday there will be further talks Accommodation in St Anne’s will be available for those on this topic, following which there will be the 1999 Annual not wishing to return home between sessions. General Meeting of the UK TEXUsers’Group. A more detailed announcement and booking form accom- On Sunday evening, there will be a special Anniversary pany this issue of Baskerville.

❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧

1The continuation to Monday is dependent on a sufficient number of knowledgeable speakers being found; final details should be known by the time this issue of Baskerville is distributed.

–1– The New TEX FAQ: Your 126 Questions Answered

Contents 44 DVI previewers...... 16

The New TEXFAQ 3 Support packages for TEX16 45 Fig, a TEX-friendly drawing package . . . . . 16 A Introduction 3 46 TEXCAD, a drawing package for LATEX...16 47 Spelling checkers for work with TEX ..... 16 The background 4 48 The VORTEXpackage...... 17 1WhatisTEX?...... 4

2 How should I pronounce “TEX”?...... 4 I Literate programming 17

AFÇÆÌ 3WhatisÅEÌ ?...... 4 49 WhatisLiterateProgramming?...... 17 4 WhatisMetaPost?...... 4 50 WEB for , FORTRAN, and other languages 17 5 How can I be sure it’s really TEX?...... 4 6AreTEX and friends Y2K compliant? . . . . 5 Format conversions 17 7WhatisLATEX?...... 5 51 Conversion between (LA)TEX and others . . . 17 8 How should I pronounce “LATEX(2ε)”? . . . . 5 52 Conversion from (LA)TEX to plain ASCII ... 18 9 Should I use plain TEXorLATEX?..... 5 53 Conversion from SGML or HTML to TEX..18 10 What are the AMS packages (AMS-TEX, etc.)? 5 54 (LA)TEX conversion to HTML ...... 18 11 WhatisEplain?...... 6 55 Making hypertext documents from TEX...19 12 WhatisLollipop?...... 6 56 Making Acrobat documents from LATEX... 19

13 WhatisTexinfo?...... 6

AFÇÆÌ

14 If TEX is so good, how come it’s free? . . . . . 6 ÅEÌ 19

AFÇÆÌ 15 What is the future of TEX?...... 6 57 Getting ÅEÌ to do what you want . . 19 16 What are TUG and TUGboat?...... 6 58 Whichfontfilesshouldbekept...... 20 17 Are there nationally-based user groups, too? . 7 59 Getting bitmaps from the archives ...... 20 18 TUG TechnicalWorkingGroups...... 7 PostScript and TEX21 C Documentation and help 7 60 Using PostScript with TEX ...... 21 19 Books on TEXanditsrelations...... 7 61 Previewing files using PostScript fonts . . . . 21 20 Wheretofindthisarticle...... 8 62 TEX metric files for PostScript fonts . . . 21 21 Mailing lists about TEX and its friends . . . . 8 63 Problems using PostScript fonts ...... 22 22 (LA)TEXTutorials...... 9 64 Choice of scalable outline fonts ...... 22 A 23 BTEXDocumentation...... 9 65 Including a PostScript figure in LTEX....23 24 The PICTEXmanual...... 9 Special sorts of typesetting 23 25 Finding (LA)TEX macro packages ...... 9 66 Drawing with T X ...... 23 26 Finding files in the CTAN archives...... 9 67 Double-spaced documents in LATEX ..... 24 A Bits and pieces of TEX1068 Formatting a thesis in LTEX ...... 24 27 What is a DVI file?...... 10 69 Flowing text around figures in LATEX..... 24 28 Whatisadriver?...... 10 70 Alternative head- and footlines in LATEX... 25 29 What are PK files?...... 10 71 Including a file in verbatim in LATEX..... 25 30 What are TFM files?...... 10 72 Including line numbers in typeset output . . . 25 31 Virtualfonts...... 10 73 Generating an index in (LA)TEX...... 25 32 \special commands...... 11 74 Typesetting URLs...... 25  33 Documented LAT X sources (.dtx files) . . . 11 75 Citing URLswithB TEX ...... 26 E  34 What are the EC fonts?...... 11 76 Using B TEXwithplain TEX ...... 26 77 Typesetting music in TEX...... 26 E Acquiring the software 11 78 Drawing Feynman diagrams in LATEX....26 35 Repositories of TEXmaterial...... 11 36 Contributing a file to the archives ...... 12 NHowdoIdoX in TEXorLATEX? 26 37 Findingnewfonts...... 12 79 Proofenvironment...... 26 80 Symbolsforthenumbersets...... 27 38 TEX CD-ROMs ...... 12 81 Romantheorems...... 27 FTEX systems 12 82 Fancyenumerationlists...... 27 39 (LA)TEXfordifferentmachines...... 12 83 Unnumbered sections in the Table of Contents 27 40 TEX-friendly editors and shells ...... 13 84 Footnotesintables...... 27 41 Commercial TEX implementations ...... 14 85 Styleofsectionheadings...... 28 86 Indentaftersectionheadings...... 28 DVI drivers and previewers 16 87 Footnotes in LATEXsectionheadings..... 28 42 DVI to PostScript conversion programs . . . . 16 88 Changing the margins in LATEX ...... 28 43 DVI drivers for HP LaserJet...... 16 89 Finding the width of a letter, word, or phrase . 29

–2– The New TEX FAQ: Your 126 Questions Answered

90 Changing the between letters ...... 29 112 ‘String too long’ in BTEX...... 33 91 Excluding blocks of text from the DVI file . . 29 do 92 Setting bold Greek letters in LATEX...... 29 Q Why does it that? 33 93 Defining a new log-like function in LATEX..30 113 What’s going on in my \include commands? 33 94 Typesetting all those TEX-related logos . . . . 30 114 Why does it ignore paragraph parameters? . . 34 115 What’s the reason for ‘protection’? ...... 34 Macros for particular types of documents 30 116 Why doesn’t \verb workwithin...? . . . . . 34 95 Settingpapersforjournals...... 30 117 Case-changing oddities ...... 35 96 A‘report’fromlotsof‘article’s...... 30 118 Why are # signs doubled in macros? . . . . . 35 97 Curriculum Vitae (Resumé)...... 30 119 Why does LATEX split footnotes across pages? 35

P Things are going wrong. . . 30 “Recent” developments 35 98 Weird hyphenation of words ...... 30 120 The New Font Selection Scheme (NFSS)... 35 99 (Merely) peculiar hyphenation ...... 31 121 LATEX2ε (the ‘new’ standard LATEX)..... 36 100 Accented words aren’t hyphenated ...... 31 122 The LATEX3project...... 36 101 Enlarging TEX ...... 31 123TheOmegaproject...... 36 102 Moving tables and figures in LATEX...... 31 124 The NT S project...... 36 A 103 \pagestyle{empty} on first page in LTEX. 32 125 The PdfTEXproject...... 37 104Underlinedtextwon’tbreak...... 32 105 Odd behaviour of \rm, \bf, etc...... 32 S Perhaps there isn’t an answer? 37 106 Old LATEX font references such as \tenrm .. 32 126Whattodoifyoufindabug...... 37 107Missingsymbols...... 32 ❧❧❧❧❧❧❧❧❧❧❧ 108 LATEX gets cross-references wrong ...... 32 109 \@ and @ inmacronames...... 32 Software Review: Scientific WorkPlace 37 110 Where are the msx and msy fonts?...... 33 111 Where are the am fonts?...... 33 Historical snippets 38

The New TEX FAQ: Your 126 Questions Answered

A Introduction the content of this article to feed back to the world-wide TEX community via regular posting to Usenet, but since Bobby was forced to abandon his work in the area, no-one has been This article was prepared by Robin Fairbairns, assisted in able to take his place. very small part by the Committee of the UK T XUsers’ E Therefore, a translation of the article has been made avail- Group (UK-T G)2 as a development of a regular posting U able on the World-Wide Web, via URL http://www.tex. to the Usenet newsgroup comp.text.tex that was main- ac.uk/cgi-bin/texfaq2html?introduction=yes tained for some time by Bobby Bodenheimer (bobby@hot. caltech.edu). A hypertext version is also to be found on the TEXLive CD-ROM (see question 38). Usenet is a mechanism for exchanging articles between people who share interests or needs3; a newsgroup is an area When we started, we rearranged Bobby’s original, and we within Usenet carrying a particular class of articles. Since a have since added new questions and answers on the basis of common sort of article asks for help, advice or information, our experience of answering questions about TEX, writing and since certain of these questions are regularly repeated (of- documents in TEX, and developing macros for TEX, over the ten with monotonous regularity), some public-spirited souls years. took to writing articles which listed “Frequently Asked Ques- The committee is grateful for help and advice, from tions” and answers to them. Some members of UK-TUG may the following outside its number: Donald Arseneau, Bar- not have access to Usenet, but could be expected to value the bara Beeton, Karl Berry, Damian Cugley, Michael Downes, answers about TEX that have accumulated over the years; so John Hobby, Berthold Horn, Werner Icking, David Kastrup, we decided to update the list and publish it in Baskerville;we Ted Nieland, Pat Rau, Piet van Oostrum, Oren Patashnik, are grateful to Bobby for his permission to use his article in Joachim Schrod, Philip Taylor, Ulrik Vieth, Rick Zaccone this way. As a quid pro quo, we are making the source of the and Reinhard Zierke. article freely available (usergrps/uktug/faq), and it can be Further, former UK-TUG committee members Rosemary compiled by anyone who runs reasonably current LATEX2ε Bailey, Chris Rowley, Alan Jeffrey, Carol Hewlett, David (see question 121), and has the required fonts. It was the com- Carlisle, Robin Fairbairns, Jonathan Fine, and Sebastian mittee’s original intention that it would also be possible for Rahtz all made significant contributions to the conception,

2For 1998–99: Peter Abbott, Kaveh Bazargan, Malcolm Clark, Roy Everett, James Foster, David Hardy, Hong Ji, Phil Molyneux, John Palmer, Kim Roberts, Philip Taylor and Dominik Wujastyk. 3Usenet, as its name implies, is a means of using some sort of network; in the earliest days the network was made by stringing together a series of telephone lines, but nowadays Usenet is most often carried over the Internet

–3–

The New TEX FAQ: Your 126 Questions Answered

AFÇÆÌ development and subsequent revision of this FAQ during 3WhatisÅEÌ ?

their terms of office, and we are grateful to them for their

AFÇÆÌ

contributions. ÅEÌ was written by Knuth as a companion to TEX; A

whereas TEX defines the layout of on a page, ÅEÌ - ÇÆÌ

F defines the shapes of the glyphs and the relations

AFÇÆÌ Finding the Files between them. ÅEÌ details the sizes of glyphs, for Unless otherwise specified, all files mentioned in this article TEX’s benefit, and details the rasters used to represent the glyphs, for the benefit of programs that will produce printed are available from a CTAN archive, or from one of their mir- output as post processes after a run of T X.

rors. Question 35 gives details of the CTAN archives, and how E

AFÇÆÌ to retrieve files from them. If you don’t have access to the In- ÅEÌ ’s language for defining fonts permits the ex- pression of several classes of things: first (of course), the ternet, question 38 tells you of sources of CD-ROMsthatoffer snapshots of the archives. simple geometry of the glyphs; second, the properties of the The reader should also note that the first directory name print engine for which the output is intended; and third, ‘meta’-information which can distinguish different design ofthepathnameofeveryfileonCTAN has been elided from ff what follows, for the simple reason that it’s always the same sizes of the same font, or the di erence between two fonts (tex-archive/). that belong to the same (or related) families.

To avoid confusion, we’ve also elided the full stop4 from Knuth (and others) have designed a fair range of fonts us-

AFÇÆÌ ÅEÌAFÇÆÌ the end of any sentence whose last item is a path name (note ing ÅEÌ , but font design using is much

that such sentences occur only at the end of paragraphs). more of a minority skill than is TEX macro-writing. The A

Though the path names are set in a different font from run- complete TEX-user nevertheless needs to be aware of ÅEÌ -

ÇÆÌ ÅEÌAFÇÆÌ ning text, it’s not easy to distinguish the font of a single ! , and to be able to run to generate per- sonal copies of new fonts.

B The background 4 What is MetaPost?

1WhatisTEX? The MetaPost system (by John Hobby) implements a picture-

AFÇÆÌ drawing language very much like that of ÅEÌ except TEX is a typesetting system written by Donald E. Knuth, who that it outputs PostScript commands instead of run-length- says in the Preface to his book on TEX (see question 19) that it is “intended for the creation of beautiful books —and especially for encoded bitmaps. MetaPost is a powerful language for pro- books that contain a lot of mathematics”. ducing figures for documents to be printed on PostScript Knuth developed a system of ‘literate programming’ to printers. It provides access to all the features of PostScript and it includes facilities for integrating text and graphics. write TEX, and he provides the literate (WEB)sourceofTEX free of charge, together with tools for processing the web (Knuth tells us that he uses nothing else for diagrams in text

source into something that can be compiled and something that he is writing.) A

that can be printed; there’s never any mystery about what Much of MetaPost’s source code was copied from ÅEÌ - ÇÆÌ F ’s sources with Knuth’s permission. TEX does. Furthermore, the WEB system provides mechan- isms to port TEX to new operating systems and computers; in order that one may have some confidence in the ports, Knuth 5 How can I be sure it’s really T X?

supplied a test by means of which one may judge the fidelity E

AFÇÆÌ of a TEX system. TEX and its documents are therefore highly TEX (and ÅEÌ and MetaPost) are written in a ‘lit- portable. erate’ programming language called Web (see question 49) TEX is a macro processor, and offers its users a powerful which is designed to be portable across a wide range of com- programming capability. For this reason, TEXonitsownisa puter systems. How, then, is a new version of TEXchecked? pretty difficult beast to deal with, so Knuth provided a pack- Of course, any sensible software implementor will have his age of macros for use with TEX called plain TEX; plain own suite of tests to check that his software runs: those who TEXiseffectively the minimum set of macros one can use- port TEX and its friends to other platforms do indeed per- fully employ with TEX, together with some demonstration form such tests.

versions of higher-level commands (the latter are better re- Knuth, however, provides a ‘conformance test’ for both

AFÇÆÌ garded as models than used as-is). When people say they’re TEX(trip)andÅEÌ (trap). He characterises these “programming in TEX”, they usually mean they’re program- as ‘torture tests’: they are designed not to check the obvious ming in plain TEX. things that ordinary typeset documents, or font designs, will exercise, but rather to explore small alleyways off the main 2 How should I pronounce “T X”? path through the code of TEX. They are, to the casual reader, E pretty incomprehensible!

The ‘X’ stands for the Greek letter Chi (χ), and is pro- Once an implementation of TEX has passed its trip test,

AFÇÆÌ nounced by English-speakers either a bit like the ‘ch’ in ‘loch’ or an implementation of ÅEÌ has passed its trap ([x] in the IPA) or like ‘k’. It definitely is not pronounced ‘’. test, it may reasonably be distributed as a working version.

4‘’ (British English)==‘period’ (American English)

–4– The New TEX FAQ: Your 126 Questions Answered

6AreTEX and friends Y2K compliant? using document classes and add-on packages, the same doc-

ument can be produced in a variety of different layouts.

AFÇÆÌ Crashing: None of T X, ÅEÌ or MetaPost can E Lamport says that LAT X“represents a balance between func- themselves crash due to any change whatever in the E tionality and ease of use”. This shows itself as a continual conflict date of any sort. that leads to the need for such as the present article: LATEX Timestamps: As Knuth delivers the sources, a 2-digit year can meet most user requirements, but finding out how is often is stored as the creation time for format files and that tricky. value is printed in logfiles. These items should not be of general concern, since the only use of the date format 8 How should I pronounce “LAT X(2ε)”? file is to produce the log output, and the log file is de- E signed for human readers only. Lamport never recommended how one should pronounce A Knuth’s distributed source does not designate the code LTEX, but a lot of people pronounce it ‘Lay TEX’ or perhaps which generates this 2-digit date as a valid area where ‘Lah TEX’ (with TEX pronounced as the program itself; see implementations may differ. However, he announced question 2). in 1998 that implementors can alter this code without The ‘epsilon’ in ‘LATEX2ε’ is supposed to be suggestive of fear of being accused of non-compliance. Nearly all a small improvement over the old LATEX 2.09. Nevertheless, implementations that are being actively maintained most people pronounce the name as ‘LATEX-two-ee’. had been modified to generate 4-digit years in the format file and the log, by the end of 1998. 9 Should I use plain TEXorLATEX? The \year primitive: Certification of a TEX implement- There’s no straightforward answer to this question. Many \year ation (see question 5) does not require that re- people swear by plain TEX, and produce highly respectable turn a meaningful value (which means that TEX can, documents using it (Knuth is an example of this, of course). in principle, be implemented on platforms that don’t But equally, many people are happy to let someone else take make the value of the clock available to user programs). the design decisions for them, accepting a small loss of flexib- The TEXbook (see question 19) defines \year as “the ility in exchange for a saving of brain power. current year of our Lord”, which is the only correct The arguments around this topic can provoke huge meaning for \year for those implementations which amounts of noise and heat, without offering much by way of can supply a meaningful value, which is to say nearly light; your best bet is to find out what those around you are all of them. using, and to go with the crowd. Later on, you can always In short, TEX implementations should provide a value switch your allegiance; don’t bother about it. in \year giving the 4-digit year Anno Domini, or the If you are preparing a manuscript for a publisher or value 1776 if the platform does not support a date func- journal, ask them what markup they want before you de- tion. velop your own; many big publishers have developed their own LAT X styles for journals and books, and insist that au- Note that if the system itself fails to deliver a correct E thors stick closely to their markup. date to TEX, then \year will of course return an in- correct value. TEX cannot be considered Y2K com- pliant, in this sense, on a system that is not itself Y2K 10 What are the AMS packages (AMS-TEX, compliant. etc.)?

Macros: TEX macros can in principle perform calculations AMS-TEXisaTEX macro package, originally written on the basis of the value of \year.TheLATEX suite by Michael Spivak for the American Mathematical Society (see question 7) performs such calculations in a small (AMS) during 1983–1985. It is described in “The Joy of TEX” number of places; the calculations performed in the by Michael D. Spivak (second edition, AMS, 1990, ISBN 0- current (supported) version of LATEXareknowntobe 821-82997-1). It is based on plain TEX, but provides many Y2K compliant. features for producing more professional-looking maths for- Other macros and macro packages should be individu- mulas with less burden on authors. It pays attention to the ally checked. finer details of sizing and positioning that mathematical pub- lishers care about. The aspects covered include multi-line dis- External software: Software such as DVI translators played equations, equation numbering, ellipsis dots, matrices, needs to be individually checked. double accents, multi-line subscripts, and syntax checking (faster processing on initial error-checking TEXruns),and other things. 7WhatisLATEX? As LATEX increased in popularity, authors asked to sub- LATEXisaTEX macro package, originally written by Leslie mit papers to the AMS in LATEX, and so the AMS developed Lamport, that provides a document processing system. AMS-LATEX, which is a collection of LATEX packages and LATEX allows markup to describe the structure of a docu- classes that offer authors most of the functionality of AMS- ment, so that the user need not think about presentation. By TEX.

–5– The New TEX FAQ: Your 126 Questions Answered

11 What is Eplain? format files into Info files within GNU emacs,andread them using the emacs Info reader. If you do not have emacs, The Eplain macro package expands on and extends the you can format Texinfo files into Info files using makeinfo and definitions in plain T X. Eplain is not intended to provide E read them using info. “generic typesetting capabilities”, as do LAT X or Texinfo (see E The Texinfo distribution, including a set of T X mac- question 13). Instead, it provides definitions that are intended E ros for formatting Texinfo files, is available as macros/ to be useful regardless of the high-level commands that you texinfo/texinfo.tar.gz use when you actually prepare your manuscript. For example, Eplain does not have a command \sec- tion, which would format section headings in an “appro- 14 If TEX is so good, how come it’s free? priate” way, as LATEX’s \section. The philosophy of Eplain It’s free because Knuth chose to make it so. He is never- is that some people will always need or want to go beyond the theless apparently happy that others should earn money by macro designer’s idea of “appropriate”. Such canned macros selling TEX-based services and products. While several valu- are fine — as long as you are willing to accept the resulting able TEX-related tools and packages are offered subject to re- output. If you don’t like the results, or if you are trying to strictions imposed by the GNU General Public Licence (‘Co- ff match a di erent format, you are out of luck. pyleft’), TEX itself is not subject to Copyleft. On the other hand, almost everyone would like capabilit- TherearecommercialversionsofTEX available; for some ies such as cross-referencing by labels, so that you don’t have users, it’s reassuring to have paid support. What is more, to put actual page numbers in the manuscript. Karl Berry, some of the commercial implementations have features that the author of Eplain, says he is not aware of any generally are not available in free versions. (The reverse is also true: available macro packages that do not force their typographic some free implementations have features not available com- style on an author, and yet provide such capabilities. mercially.) Usually, this article does not describe commercial versions; 12 What is Lollipop? Question 41 lists the major vendors. Lollipop is a macro package written by Victor Eijkhout; it 15 WhatisthefutureofTX? was used in the production of his book “TEXbyTopic”(see E question 19). The manual says of it: Knuth has declared that he will do no further development of TEX; he will continue to fix any bugs that are reported to Lollipop is ‘TEX made easy’. Lollipop is a macro him (though bugs are rare). This decision was made soon package that functions as a toolbox for writing after TEX version 3.0 was released; at each bug-fix release TEX macros. It was my intention to make macro the version number acquires one more digit, so that it tends writing so easy that implementing a fully new to the limit π (at the time of writing, Knuth’s latest release is layout in T X would become a matter of less E version 3.14159). Knuth wants TEXtobefrozenatversionπ than an hour for an average document, and that when he dies; thereafter, no further changes may be made to

it would be a task that could be accomplished by

AFÇÆÌ Knuth’s source. (A similar rule is applied to ÅEÌ ;its someone with only a very basic training in TEX version number tends to the limit e, and currently stands at programming. 2.718.) Lollipop is an attempt to make structured text There are projects (some of them long-term projects: see, formatting available for environments where for example, question 122) to build substantial new macro previously only  packages could be packages based on TEX. For the even longer term, there are used because adapting the layout is so much various projects to build a successor to TEX; see questions 123 more easy with them than with traditional TEX and 124. macro packages. 16 What are TUG and TUGboat? The manual goes on to talk of ambitions to “capture some

of the LATEX market share”; it’s a very witty package, but little TUG is the TEX Users Group. TUGboat is TUG’s main A

sign of it taking over from LATEX is detectable. . . An article journal, containing useful articles about TEXandÅEÌ - ÇÆÌ about Lollipop appeared in TUGboat 13(3). F . TUG also organises a yearly conference, runs train- ing courses, sells almost all TEX-related books, and distrib- 13 What is Texinfo? utes TEX-related microcomputer software on disk. TUG has a Technical Council to coordinate TEX-related developments Texinfo is a documentation system that uses one source file to (see question 18). Enquiries should be directed to: produce both on-line information and printed output. So in- stead of writing two different documents, one for the on-line TEX Users Group help and the other for a typeset manual, you need write only PO Box 2311 one document source file. When the work is revised, you need Portland, OR 97208-2311 only revise one document. You can read the on-line inform- USA ation, known as an “Info file”, with an Info documentation- fax: +1-503-223-3960 reading program. By convention, Texinfo source file names voice: +1-503-223-9994 end with a .texi or .texinfo extension. You can write and Email: [email protected]

–6– The New TEX FAQ: Your 126 Questions Answered

Web: http://www.tug.org/ WG-92-01 TEX Extended Mathematics Font Encoding. CTAN details: usergrps/tug To create font encoding standards for Mathematical fonts used in TEX systems. 17 Are there nationally-based user groups, Contact: Barbara Beeton ([email protected]) too? WG-92-05 T X Archive Guidelines. The following groups publish their membership (etc.) inform- E To develop guidelines for the effective management ation electronically on CTAN archives: and utilisation of major TEXarchives,andtoinitiate DANTE, Deutschsprachige Anwendervereini- communication among the maintainers of the existing gung archives for the purpose of coordination and synchron- TEXe.. isation. Postfach 10 18 40 Contact: Sebastian Rahtz ([email protected]. D-69008 Heidelberg uk) Germany Tel: (+49) 06221 2 97 66 WG-94-07 TEX Directory Structure. Fax: (+49) 06221 16 79 06 To identify a universal directory structure for macros, Email: [email protected] fonts and other related TEX software so that recom- Web: http://www.dante.de/ mendations can be made to all suppliers of TEX soft- CTAN details: usergrps/dante ware. Association GUTenberg, The group’s current set of proposals are to be found on BP 10, CTAN at tds/draft-standard 93220 Gagny principal, Contact: Karl Berry (kb@.umb.edu) France WG-94-08 DVI Driver Implementation and Standardisation Issues. Email: [email protected] To study the issues in the requirements of DVI Drivers Web: http://www.ens.fr/gut/ imposed by changing needs and technologies, and CTAN details: usergrps/gut to make recommendations for implementation and NTG standardisation of such drivers to enhance the uni- Postbus 394, 1740AJ Schagen, formity of their use. Work will include, but not be The Netherlands limited to, the examination of the use, syntax, and se- Email: [email protected] mantics of \special{..} commands. Web: http://www.ntg.nl/ Contact: Michael Sofka ([email protected]) CTAN details: usergrps/ntg WG-94-10 TEX and Linguistics. UK T XUsers’Group, E To study and discuss the requirements for typesetting c/ Peter Abbott, o linguistics in T X and as a means of identifying, ex- 1 Eymore Close, E amining, testing, and comparing macros, fonts, style Selly Oak, files and other aids for typesetting linguistics. Birmingham B29 4LB UK Contact: Christina Thiele (cthiele@ccs. carleton.ca) Tel: (+44) 0121 476 2159 Email: [email protected] Web: http://uk.tug.org/ C Documentation and help CTAN details: usergrps/uktug 19 Books on TEX and its relations A listing of all known groups is available as usergrps/ info/usergrps.tex While Knuth’s book is the definitive reference for TEX, there are other books covering TEX: 18 TUG Technical Working Groups The TEXbook by Donald Knuth (Addison-Wesley, 1984, TUG (see question 16) has an autonomous Technical Council ISBN 0-201-13447-0, paperback ISBN 0-201-13448-9) which can appoint Technical Working Groups related to the A Beginner’s Book of TEX by Raymond Seroul and Silvio Levy, specific areas of interest within the TEX community. Each ISBN 0-387-97562-4) group has a chair/contact person and establishes its own (Springer Verlag, 1992, working methods and membership; anyone interested in tak- Introduction to TEX by Norbert Schwarz (Addison-Wesley, ing part should contact the group’s chair person. Suggestions 1989, ISBN 0-201-51141-X) for new groups should be addressed to tech-council@tug. org; a list of members of the Technical Council can be found A Plain TEX Primer by Malcolm Clark (Oxford University at http://tug.org/committees.html Press, 1993, ISBNs 0-198-53724-7 (hardback) and 0- Below is a brief list of currently active groups: 198-53784-0 (paperback))

–7– The New TEX FAQ: Your 126 Questions Answered

TEXbyTopic by Victor Eijkhout (Addison-Wesley, 1992, First Steps in LATEX by George Grätzer (Birkhäuser, 1999 [to ISBN 0-201-56882-9) appear in July 1999], ISBN 0-8176-4132-7 T X for the Beginner by Wynter Snow (Addison-Wesley, 1992, E LAT X: Line by Line: Tips and Techniques for Document Processing ISBN 0-201-54799-6) E by Antoni Diller (second edition, John Wiley & Sons, TEX for the Impatient by Paul . Abrahams, Karl Berry 1999, ISBN 0-471-97918-X) and Kathryn A. Hargreaves (Addison-Wesley, 1990, ISBN 0-201-51375-7) A sample of George Grätzer’s book, in Adobe Acrobat format, is also available (info/mil/mil.pdf). TEX in Practice by Stephan von Bechtolsheim (Springer Ver- Example files for the LATEX Graphics and Web Compan- lag, 1993, 4 volumes, ISBN 3-540-97296-X for the ions are available in info/lgc (Graphics) and info/lwc set, or Vol. 1: ISBN 0-387-97595-0, Vol. 2: ISBN 0- (Web). Example files for George Grätzer’s ‘First Steps’ are

387-97596-9, Vol. 3: ISBN 0-387-97597-7, and Vol. 4: available in info/FirstSteps

AFÇÆÌ ISBN 0-387-97598-5) The list for ÅEÌ is rather short:

T X: Starting from 1 5 by Michael Doob (Springer Verlag,

AFÇÆÌ E The ÅEÌ book by Donald Knuth (Addison Wesley, 1993, ISBN 3-540-56441-1) 1986, ISBN 0-201-13445-4, ISBN 0-201-52983-1 pa- perback) The Advanced TEXbook by David Salomon (Springer Verlag, 1995, ISBN 0-387-94556-3) This list only covers books in English: UK-TUG cannot A collection of Knuth’s publications about typography has hope to maintain a list of books in languages other than our recently been published: own. Digital Typography by Donald Knuth (CSLI and Cambridge University Press, 1999, ISBN 1-57586-011-2, paper- 20 Where to find this article back ISBN 1-57586-010-4). Bobby Bodenheimer’s article, from which the present one For LATEX, see: was developed, used to be posted (nominally monthly) to newsgroup comp.text.tex and cross-posted to newsgroups LATEX, a Document Preparation System by Leslie Lamport news.answers and comp.answers. The most recently (second edition, Addison Wesley, 1994, ISBN 0-201- posted copy of that article is kept on CTAN in directory 15790-X) obsolete/help;itisnolongerkeptinthenews.answers archives. A guide to LATEX2ε Helmut Kopka and Patrick W. Daly (third edition, Addison-Wesley, 1998, ISBN 0-201-39825-7) A version of the present article may be browsed via the World-Wide Web, at URL http://www.tex.ac.uk/ The LATEX Companion by Michel Goossens, Frank Mittel- cgi-bin/texfaq2html?introduction=yes;thesources bach, and Alexander Samarin (Addison-Wesley, 1993, of the article are available from usergrps/uktug/faq ISBN 0-201-54199-8) Both the Francophone TEX usergroup Gutenberg and the Czech/Slovak usergroup CS-TUG have published transla- A The LTEX Graphics Companion: Illustrating documents with TEX tions of this FAQ, with extensions appropriate to their lan- and PostScript by Michel Goossens, Sebastian Rahtz and guages. Frank Mittelbach (Addison-Wesley, 1997, ISBN 0-201- In addition, the German usergroup Dante e.V. posts 85469-4) a FAQ in German to de.comp.tex, which is archived as usergrps/dante/de-tex-faq, and Marie-Paule Kluth The LATEX Web Companion Integrating TEX, HTML and XML by Michel Goossens and Sebastian Rahtz (Addison- posts a FAQ in French to fr.comp.text.tex,whichis Wesley, 1999, ISBN 0-201-43311-7) archived as help/LaTeX-FAQ-francaise

TEX Unbound: LATEXandTEX strategies for fonts, graphics, and more by Alan Hoenig (Oxford University Press, 1998, 21 Mailing lists about TEX and its friends ISBN 0-19-509685-1 hardback, ISBN 0-19-509686-X There are (still) people who can use networks but can’t read paperback) Usenet news; for them, not all is lost if they can send and receive email. Math into TEX: A Simplified Introduction using AMS-LATEX by George Grätzer (Birkhäuser, 1993, ISBN 0-817-63637- The TEXhax digest is operated as a mailing list. Send a subscribe texhax texhax-request@tex. 4, or, in Germany, ISBN 3-764-33637-4) message ‘ ’to ac.uk to join it. Its turn-around is not rapid, but questions Math into LATEX: An Introduction to LATEXandAMS-LATEX by submitted to it do eventually get answered. George Grätzer (Birkhäuser, 1996, ISBN 0-817-63805- Announcements of TEX-related installations on the CTAN 9) archives are sent to the mailing list -ann. Subscribe to

5That’s ‘Starting from Square One’

–8– The New TEX FAQ: Your 126 Questions Answered the list by sending a message ‘subscribe ctan-ann

name >’[email protected] texts.

AFÇÆÌ Issues related to ÅEÌ (and, increasingly, Meta- Having learnt of a file that seems interesting, search a Post) are discussed on the mailing list; subscribe by CTAN archive for it (see question 26). For packages lis- sending a message ‘subscribe metafont ’ ted in The LATEX Companion (see question 19), the file info/ to [email protected] companion.ctan may be consulted as an alternative to Several other TEX-related lists may be accessed via searching the archive’s index. It lists the current location in [email protected]. Send a message the archive of such files. containing the line ‘help’ to this address. An alternative procedure is to use http://ctan.tug. org/ctan/, which permits limited ‘keyword’ searching for 22 (LA)TEX Tutorials files on the CTAN sites. Some very fine tutorials have been written, over the years. 26 Finding files in the CTAN archives Michael Doob’s splendid ‘Gentle Introduction’ to plain TEX has been stable for a very long time. See info/gentle/ To find software at a CTAN site, you can use anonymous gentle.pdf ftp to the host with the command ‘quote site index More dynamic is Tobias Oetiker’s ‘(Not so) Short Intro- ’, or the searching script at http://www.dante.de/ duction to LATEX2ε’, which is regularly updated, as people cgi-bin/ctan-index suggest better ways of explaining things, etc. See info/ To get the best use out of the ftp facility you should re- lshort/english/lshort.pdf member that is a Regular Expression and not a fixed string, and also that many files are distributed in source form ff 23 BIBTEX Documentation with an extension di erent to the final file. (For example LAT X packages are often distributed sources with extension  E B TEX, a program originally designed to produce biblio- dtx rather than as package files with extension sty.) A graphies in conjunction with LTEX, is explained in Section One should make the regular expresion general enough A 4.3 and Appendix B of Leslie Lamport’s LTEXmanual(see to find the file you are looking for, but not too general, as  question 19). The document “B TEXing”, contained in the the ftp interface will return only the first 20 lines that match file btxdoc.tex, gives a more complete description. The your request. A LTEX Companion (see question 19) also has information on The following examples illustrate these points. To search   B TEX and writing B TEX style files. for the LAT X package ‘caption’, you might use the com-  E The document “Designing B TEX Styles”, contained in mand: the file btxhak.tex, explains the postfix stack-based lan- guage used to write BTEXstyles(.bst files). The file quote site index caption.sty btxbst.doc is the template for the four standard styles (plain, abbrv, alpha, unsrt). It also contains their doc- but it will fail to find the desired package (which is distributed as caption.dtx) and does return unwanted ‘hits’ (such as umentation. The complete BTEX documentation set (in- cluding the files above) is in biblio/bibtex/distribs/ hangcaption.sty). Also, although this example does not doc show it the ‘.’in‘caption.sty’ is used as the regular ex- pression that matches any character. So There is a Unix BTEX man page in the web2c package (see question 39). Any copy you may find of a man page writ- quote site index doc.sty ten in 1985 (before “BTEXing” and “Designing BTEX Styles” appeared) is obsolete, and should be thrown away. matches such unwanted files as language/swedish/ slatex/doc2sty/makefile 24 The PICTEXmanual Of course if you know the package is stored as .dtx you can search for that name, but in general you may not know PICTEX is a set of macros by Michael Wichura for draw- the extension used on the archive. The solution is to add ‘/’ ing diagrams and pictures. The macros are freely available to the front of the package name and ‘\\. to the end. This in graphics/pictex;however,thePICTEXmanualitself will then search for a file name that consists solely of the pack- is not free. Unfortunately, TUG is no longer able to supply age name between the directory separator and the extension. copies of the manual (as it once did), and it is now avail- The two commands: able only through Personal TEX Inc, the vendors of PCTEX (http://www.pctex.com/). The manual is not available quote site index /caption\\. electronically. quote site index /doc\\. do narrow the search down sufficiently. (In the case of doc, 25 Finding (LA)T X macro packages E a few extra files are found, but the list returned is sufficiently Before you ask for a TEXmacroorLATEX class or package file small to be easily inspected.) to do something, try searching Graham Williams’ catalogue, If the search string is too wide and too many files would available as help/Catalogue/catalogue.html, or for ef- match, the list will be truncated to the first 20 items found. ficient interactive searching via http://www.tex.ac.uk/ Using some knowledge of the CTAN directory tree you can tex-archive/help/Catalogue/catalogue.html;this usually narrow the search sufficiently. As an example suppose

–9– The New TEX FAQ: Your 126 Questions Answered youwantedtofindacopyofthedvips driver for MS-DOS. 28 What is a driver? You might use the command: A driver is a program that takes as input a dvi file (see ques- tion 27) and (usually) produces a file that can be sent to a quote site index dvips typographic output device, called a printer for short. A driver will usually be specific to a particular printer, al- but the result would be a truncated list, not including the file though any PostScript printer ought to be able to print the you want. (If this list were not truncated 412 items would be output from a PostScript driver. returned!) However we can restrict the search to MS-DOS As well as the DVI file, the driver needs font information. related drivers as follows. Font information may be held as bitmaps or as outlines, or simply as a set of pointers into the fonts that the printer itself quote site index msdos.*dvips ‘has’. Each driver will expect the font information in a par- ticular form. For more information on the forms of fonts, see Which just returns relevant lines such as systems/msdos/ questions 29, 30, 31 and 60. dviware/dvips/dvips5528.zip A basic introduction to searching with regular expressions is: 29 What are PK files? PK files (packed raster) contain font bitmaps. The output

• "a" "a"

AFÇÆÌ Most charcters match themselves, so matches from ÅEÌ (see question 57) includes a generic font etc.; (GF) file and the utility gftopk produces the PK file from that. • "." matches any character; TherearealotofPK files, as one is needed for each font, that • "[abcD-F]" matches any single character from the set is each magnification (size) of each design (point) size for each {"a","b","c","D","E","F"}; weight for each shape for each family. Further, since the PK • "*" placed after an expression matches zero or more files for one printer do not necessarily work well for another, occurrences so "a*" matches "a" and "aaaa",and the whole set needs to be duplicated for each printer type at a "[a-zA-]*" matches a ‘word’; site. As a result, they are often held in an elaborate directory • "\" ‘quotes’ a special character such as "." so "\." structure, or in ‘font library files’, to regularise access. just matches "."; • "^" matches the beginning of a line; 30 What are TFM files? • "$" matches the end of a line. TFM stands for TEX font metrics, and TFM files hold inform- For technical reasons in the quote site index command, ation about the sizes of the characters of the font in question, you need to ‘double’ any \ whence the string /caption\\. and about ligatures and kerns within that font. One TFM file in the above example. The quote site command ignores the is needed for each font used by TEX, that is for each design case of letters. Searching for caption or CAPTION would (point) size for each weight for each shape for each family; produce the same result. one TFM file serves for all magnifications, so that there are (typically) fewer TFM files than there are PK files. The im- portant point is that TFM files are used by TEX(LATEX, etc.), D Bits and pieces of TEX but are not, in general, needed by the printer driver.

27 What is a DVI file? 31 Virtual fonts A DVI file (that is, a file with the type or extension .dvi)is Virtual fonts for TEX were first implemented by David Fuchs TEX’s main output file, using TEX in its broadest sense to in the early days of TEX, but for most people they started include LATEX, etc. ‘DVI’ is supposed to be an acronym for when Knuth redefined the format, and wrote some support DeVice-Independent, meaning that the file can be printed on software, in 1989. Virtual fonts provide a way of telling TEX almost any kind of typographic output device. The DVI file is about something more complicated than just a one-to-one designed to be read by a driver (see question 28) to produce character mapping. The entities you define in a virtual font further output designed specifically for a particular printer look like characters to TEX (they appear with their sizes in (e.g., a LaserJet) or to be used as input to a previewer for a font metric file), but the DVI processor may expand them display on a computer screen. DVI files use TEX’s internal to something quite different. You can use this facility just coding; a TEX input file should produce the same DVI file re- to remap characters, to make a composite font with glyphs gardless of which implementation of TEXisusedtoproduce drawn from several sources, or to build up an effect in arbit- it. rarily complicated ways — a virtual font may contain any- A DVI file contains all the information that is needed thing which is legal in a DVI file. In practice, the most com- for printing or previewing except for the actual bitmaps or mon use of virtual fonts is to remap PostScript fonts (see ques- outlines of fonts, and possibly material to be introduced by tion 62) or to build ‘fake’ maths fonts. means of \special commands (see question 32). It is important to realise that TEXitselfdoesnot see vir- The canonical reference for the structure of a DVI file is tual fonts; for every virtual font read by the DVI driver there the source of dvitype (systems/knuth/texware/dvitype. is a corresponding TFM file read by TEX. Virtual fonts are web). normally created in a single ASCII vpl (Virtual Property List)

–10– The New TEX FAQ: Your 126 Questions Answered

file, which includes both sets of information. The vptovf pro- 34 What are the EC fonts? gram is then used to the create the binary TFM and VF files. The commonest way (nowadays) of generating vpl files is to A font consists of a number of glyphs. In order that the glyphs use the fontinst package, which is described in detail in ques- may be printed, there has to be some way of accessing them; tion 62. fonts/utilities/qdtexvpl is another utility for in TEX they’re arranged in a numerical order called an en- creating ad-hoc virtual fonts. coding, and their number in the encoding is used. For various reasons, Knuth chose rather eccentric encodings; in particu- lar, he chose different encodings for different fonts. When TEX version 3 arrived, some at least of the reasons 32 \special commands for the eccentricity of Knuth’s encodings went away, and at TUG’s Cork meeting, an encoding for a set of 256 glyphs, for T X provides the means to express things that device drivers E use in T X text, was defined. The intention was that these can do, but about which T X itself knows nothing. For ex- E E glyphs should cover ‘most’ European languages, in the sense ample, T X itself knows nothing about how to include Post- E of including all accented letters needed. (Knuth’s CMR fonts Script figures into documents, or how to set the colour of missed things necessary for Icelandic, Polish and Sami, for printed text; but some device drivers do. example, but the Cork fonts have them.) LAT X2ε (see ques- Such things are introduced to your document by means E tion 121) refers to the Cork encoding as T1, and provides the of \special commands; all that T X does with these com- E means to use fonts thus encoded to avoid problems with the mands is to expand their arguments and then pass the com- interaction of accents and hyphenation (see question 100).

mand to the DVI file. In most cases, there are macro pack-

AFÇÆÌ The only ÅEÌ -fonts that conform to the Cork en- ages provided (often with the driver) that provide a compre- coding are the EC fonts (available as fonts/ec). They look hensible interface to the \special; for example, there’s little CM-like, and are now regarded as ‘stable’ (in the same sense point including a figure if you leave no gap for it in your text, that the CM fonts are stable: their metrics are unlikely ever and changing colour proves to be a particularly fraught op- to change). Their serious disadvantage for the casual user is eration that requires real wizardry. LAT X2ε has standard E that they are large — each EC font is roughly twice the size graphics and colour packages that make file inclusion, rota- of the corresponding CM font; what’s more, until correspond- tion, scaling and colour via \specials all easy. ing fonts for mathematics are produced, the CM fonts must The allowable arguments of \special depend on the be retained. device driver you’re using. Apart from the examples above, The EC fonts supersede the experimental DC fonts, which there are \special commands in the emT X drivers (e.g., E have now been removed from the archives. They are distrib- dvihplj, dviscr, etc.) that will draw lines at arbitrary orientations, uted with a set of ‘Text Companion’ (TC) fonts that provide and commands in dvitoln03 that permit the page to be set in glyphs for symbols commonly used in text. The TC fonts are landscape orientation. encoded according to the LATEX TS1 encoding, and are not viewed as ‘stable’ in the same way as are the EC fonts are. The Cork encoding is also implemented by the PSNFSS 33 Documented LATEX sources (.dtx files) system (see question 60), for PostScript fonts.

LATEX2ε, and many support macro packages, are now writ- ten in a literate programming style (see question 49), with E Acquiring the software source and documentation in the same file. This format, known as ‘doc’, was originated by Frank Mittelbach. The 35 Repositories of TEX material documented sources conventionally have the suffix .dtx,and should normally be stripped of documentation before use To aid the archiving and retrieval of of TEX-related files, with LATEX. Alternatively you can run LATEXona.dtx a TUG working group developed the Comprehensive TEX file to produce a nicely formatted version of the documented Archive Network (CTAN). Each CTAN site has identical code. An installation script (with suffix .ins) is usually material, and maintains authoritative versions of its mater- provided, which needs the standard LATEX2ε docstrip pack- ial. These collections are extensive; in particular, almost age (among other things, the installation process strips all the everything mentioned in this article is archived at the CTAN comments that make up the documentation for speed when sites, even if its location isn’t explicitly stated. loading the file into a running LATEX system). Several pack- The CTAN sites are currently ftp.dante.de (129.206. ages can be included in one .dtx file, with conditional sec- 100.192), ftp.tex.ac.uk (128.232.1.87)andctan. tions, and there facilities for indices of macros etc. Anyone tug.org (158.121.106.16). The organisation of TEXfiles can write .dtx files; the format is explained in The LATEX on all these sites is identical and starts at tex-archive/. Companion (see question 19). There are no programs yet to To reduce network load, please use the CTAN site or mir- assist in composition. ror closest to you. A complete and current list of CTAN sites .dtx files are not used by LATEX after they have been pro- and known mirrors can be obtained by using the finger util- cessed to produce .sty or .cls (or whatever) files. They ity on ‘user’ [email protected], [email protected] need not be kept with the working system; however, for many or [email protected]; it is also available as file CTAN. packages the .dtx file is the primary source of documenta- sites tion,soyoumaywanttokeep.dtx files elsewhere. To find software at a CTAN site, use anonymous ftp to

–11– The New TEX FAQ: Your 126 Questions Answered the host, and then execute the command ‘quote site in- and GUTenberg) distribute the TEXLiveCD-ROM, dex ’ (see question 26 for details). now in its fourth edition. Members of many User The email server [email protected] provides an Groups are receiving copies, so if you want a copy you ftp-like interface through mail. Send a message containing would be well advised to join your local user group. just the line ‘help’ to your nearest server for details of use. On-line details of TEX Live are available at http: There is also the DECUS TEX collection of mater- //www.tug.org/texlive.html ial for VMS, Unix, MS-DOS, and the Macintosh. It is • The Dutch TEX Users Group (NTG) publish the whole available via anonymous ftp from wuarchive.wustl.edu 4AllTEX workbench on a 2-CD-ROM set packed with (128.252.135.4) in decus/tex/. It can also be obtained from all the Win-32 TEX software, macros and fonts you can the DECUS Library (reference number VS0058) in the US, or want. It is available from NTG direct (see question 17). through your DECUS office outside of the US. To contact the It is a useful resource for anyone to browse, not just for DECUS Library, send mail or telephone: Win-32 users.

DECUS An alternative to the ready-to-run system is the CTAN LIBRARY ORDER PROCESSING archive snapshot; in general one would expect that such sys- 334 South Street, SHR3-1/T25 tems would be harder to use, but that the volume of resources Shrewsbury, MA 01545-4195 offered would balance this extra inconvenience. USA Walnut Creek CDROM provide a two-disc CD-ROM set, Tel: 800-DECUS55 (within the USA, for in- holding 1000Mb of TEX-related material. Information formation) about the CD-ROM is available at http://www.cdrom. Fax: (+1) 508-841-3373 (for inquiries) com/titles/prog/tex.html, which also has a link to an ordering page. Walnut Creek’s address, etc., are: or send electronic mail for information to the DECUS TEX Collection Editor, Ted Nieland ([email protected]). Walnut Creek CDROM 4041 Pike Lane, Ste D-www Finally, of course, the TEX user who has no access to any Concord, CA 94520 sort of network may buy a copy of the archive on CD-ROM (see question 38). USA Tel: (+1) 510 674-0783 or 800 786-9907 (within the USA and Canada) 36 Contributing a file to the archives Fax: (+1) 510 674-0821 Use anonymous ftp to any CTAN archive (see question 35) Email: [email protected] (for questions) and and retrieve the file README.uploads in the root directory. [email protected] (for orders) It contains instructions for uploading files and notifying the Prime Time Freeware produced T Xcetera 1.1 in July 1994, appropriate people for that site. E which was a snapshot of CTAN taken in June 1994. Regular If you cannot use ftp, mail your contribution to ctan@ updates were planned (but have not apparently been forth- ctan.org and it will be passed along. You will make every- coming). The material is all compressed in ZIP format to fit one’s life easier if you choose a descriptive and unique name it all on one CD, and to avoid the limitations of the ISO 9660 for your submission, so it’s probably a good idea to check file system directory. You could buy the CD from: that your style file’s name is not already in use by means of the ‘site index’ command (see question 26). Prime Time Freeware 370 Altair Way, Suite 150 37 Finding new fonts Sunnyvale CA 94086

USA

AFÇÆÌ A comprehensive list of ÅEÌ fonts is posted to comp. Tel: (+1) 408 433 9662 fonts and to comp.text.tex, roughly every six weeks, Fax: (+1) 408 433 0727 by Lee Quin ([email protected]); it is available as info/ Email: [email protected] metafont-list The list contains details both of commercial fonts and of or from many CD-ROM resellers, or the TUG office (see ques- fonts available via anonymous ftp. Most of the fonts are tion 16). Price was around $60. Please note that PTF is not available via anonymous ftp from the CTAN archives (see a big commercial firm, and is a good friend of the TEX com- question 35). munity.

38 TEX CD-ROMs FTEX systems If you don’t have access to the Internet, there are obvious 39 (LA)T X for different machines attractions to TEX collections on a CD-ROM.Eventhose E with net access may find it a great convenience to have large We list here the free or shareware packages; see question 41 quantities of TEX-related files to hand. for commercial packages. Ready-to-run TEX systems on CD-ROM are available: Unix Instructions for retrieving the Unix TEX distribution • A consortium of User Groups (notably TUG, UK-TUG via anonymous ftp are available in the document

–12– The New TEX FAQ: Your 126 Questions Answered

systems/unix/unixtex.ftp, though nowadays the Windows NT, other platforms APowerPC port sensible installer will take (and possibly customise) one of MikTEX is available from systems/win32/ of the packaged distributions such as teTEX (browse miktexppc,andanAXP port is available from systems/unix/teTeX/1.0/distrib/sources for systems/win32/-AXP relevant files: you need at most one each of the .tar.gz files for teTeX-src, teTeX-texmf and Mac OzTEX is a shareware version of TEX for the Macin- tosh. A DVI previewer and PostScript driver are also teTeX-texmfsrc), or the TEXLiveCD-ROM (see question 38). included. It should run on any Macintosh Plus, SE, II, or newer model, but will not work on a 128K or A useful set of binaries for various common Unix sys- 512K Mac. It was written by Andrew Trevorrow, and tems is to be found as part of the teTEX distribution is available in nonfree/systems/mac/oztex (browse the teTEX installation directory systems/ unix/teTeX-beta/unix-install-1.0beta for UK-TUG prepays the shareware fee, so that its mem- details — you’ll need the version for your architec- bers may acquire the software without further pay- ture in the binaries/ subdirectory). In default of ment. Questions about OzTEX may be directed to a precompiled version, teTEX will compile on most [email protected] Unix systems, though it was originally developed for Another partly shareware program is CMacTEX (avail- use under Linux (see below). able as systems/mac/cmactex), put together by Tom Kiffe. This is much closer to the Unix T Xsetup(it Linux There are at least two respectable implementations of E uses dvips, for instance). CMacT X includes a port of T X to run on Linux, NT X (available as systems/ E E E the latest version of Omega (see question 123). unix/linux/ntex)andteTEX (browse systems/ unix/teTeX/1.0/distrib/sources). OpenVMS TEX for OpenVMS is available as systems/ Beware the Slackware ’96 CD-ROM distribution of OpenVMS/TEX97_CTAN.ZIP NTEX: it includes a version of the CM fonts that has Standard tape distribution is through DECUS (see ff deeply o ended Don Knuth (since it contravenes his question 35). distribution conditions). The Slackware updates now offer teTEX, as do most Linux distributions. Atari TEX is available for the Atari ST in systems/atari If anonymous ftp is not available to you, send a PC The emTEX package for PCs running /2, MS-DOS message containing the line ‘help’toatari@atari. or Windows includes LATEX, BTEX, previewers, and drivers, and is available in systems/msdos/emtex as archive.umich.edu a series of zip archives. The package was written by Amiga Full implementations of T X 3.1 (PasT X) and

Eberhard Mattes, and documentation is available in E E

AFÇÆÌ ÅEÌ 2.7 are available in systems/amiga both German and English. Appropriate memory man- agers for using emTEX with 386 (and better) processors You can also order a CD-ROM containing this and and under Windows, are included in the distribution. other Amiga software from Walnut Creek CDROM, telephone (+1) 510-947-5997. A second package, gTEX, runs under MS-DOS or Win- dows (and its users speak well of it). It is available from TOPS-20 TEX was originally written on a DEC-10 under systems/msdos/gtex WAITS, and so was easily ported to TOPS-20. A distri- The most recent offering is an MS-DOS port of the bution that runs on TOPS-20 is available via anonym- Web2C 7.0 implementation, using the GNU djgpp com- ous ftp from ftp.math.utah.edu (128.110.198.34) piler. It is available from systems/msdos/djgpp in pub/tex/pub/web

PC: Win32 fpT X, by Fabrice Popineau, is a version of E 40 TEX-friendly editors and shells teTEX for Windows systems. As such, it is particu- larly attractive to those who need to switch back and There are good TEX-writing environments and editors for forth between Windows and Unix environments, and most operating systems; some are described below, but this is to administrators who need to maintain both (fpTEX only a personal selection: can use the same texmf tree as a teTEX installation). Unix Try GNU emacs,andtheAUCT Xmode(support/ fpTEX’s previewer (Windvi)isbasedonxdvi, and takes E advantage of extra facilities in the Win32 environment. auctex). This provides menu items and control se- quences for common constructs, checks syntax, lays Printing is available via dvips only. fpTEXis available from systems/win32/fptex out markup nicely, lets you call TEX and drivers from within the editor, and everything else like this that you MikTEX, by Christian Schenk, is also a comprehens- can think of. Complex, but very powerful. ive distribution, developed separately from the teTEX work. It has its own previewer, YAP, which is it- VMS An lsedit mode for editing TEX source is avail- self capable of printing, though the distribution also able from TUG (see question 16) as TEXniques 1, includes a port of dvips. The current version is in VAX Language-Sensitive Editor, by Kent MacPherson systems/win32/miktex (1985).

–13– The New TEX FAQ: Your 126 Questions Answered

MS-DOS There are several choices: OS/2 Eddi4TEX works under OS/2; look also at systems/ os2/epmtex for a specific OS/2 shell. • The earlier (shareware) 4AllTEX workbench (systems/msdos/4alltex) provided a very Macintosh The commercial Textures provides an excellent comprehensive environment written in 4DOS integrated Macintosh environment with its own editor. which lets you access most TEX-related software More powerful still (as an editor) is the shareware Alpha in a friendly way. You can choose your own ed- (systems/mac/support/alpha) which is extensible itor; something such as QEdit or Brief is suitable. enough to let you perform almost any TEX-related job. This whole package was available in easy-to-use It works well with OzTEX. form on CD-ROM from various TEX user groups, but the most recent version is now Win-32 spe- Atari, Amiga and NeXT users also have nice environments. A cific rather than running under MS/DOS. LTEXuserswholikemake should try support/latexmk • There is another set of shell programs to help you manip- TEXshell (systems/msdos/texshell)isasim-  pler, easily-customisable environment, which can ulate B TEX databases. be used with the editor of your choice. 41 Commercial T X implementations • Eddi4TEX(systems/msdos/e4t; also share- E ware) is a specially-written TEX editor which fea- There are many commercial implementations of TEX. The tures intelligent colouring, matching, syn- first appeared not long after TEX itself appeared. Of the tax checking, online help and the ability to call vendors, ArborText (formerly Textset) and Personal TEXare TEX programs from within the editor. It is highly those who have survived longest (since the mid or early ’80s). customisable, and features a powerful macro lan- What follows is probably an incomplete list. Naturally, no guage. warranty or fitness for purpose is implied by the inclusion of any vendor in this list. The source of the information is given You can also use GNU emacs and AUCT XunderMS- E to provide some clues to its currency. DOS. In general, a commercial implementation will come ‘com- Windows 3.1 Your best public domain bet is probably to plete’, that is, with suitable previewers and printer drivers. use MicroEmacs as an editor and control centre for They normally also have extensive documentation (i.e., not just the T Xbook!) and some sort of support service. In TEXprograms.ThegTEX package (systems/msdos/ E gtex) comes with MicroEmacs ready to go, integrated some cases this is a toll free number (probably applicable only within the USA and/or Canada), but others also have email, with TEX, previewer, dvips and GhostScript. and normal telephone and fax support. TEXtelmExtel (systems/msdos/emtex-contrib/ TeXtelmExtel) is a Shell for emTEXorWTEXand Unix; TEX Silicon Graphics Iris/Indigo, Solaris 2.1, IBM related tools under Windows. It includes a simple RS/6000, DEC/RISC-Ultrix, HP 9000. “Complete multiple-document editor, a built-in spelling checker, TEX packages. Ready to use, fully documented and automatic OEM/ANSI character conversion, user- supported.” definable point-and-click Templates, support for the forward and inverse search mechanism of the DVI ArborText Inc driver for Windows and for automatic font generation. 1000 Victors Way Besides the predefined tools, up to 10 user-defined Suite 400 tools can be set up. Ann Arbor MI 48108 USA On a PC with large enough memory, a version of Tel: (+1) 313-996-3566 GNU emacs, that will run under Windows, is available; Fax: (+1) 313-996-3573 thus you can also use AUCTEX under Windows. &Y’s commercial (and high-quality) Windows pre- Source: TUGboat 15(1) (1994) viewer, dviwindo, can be used as a good T X shell, E VAX/VMS;ConvergentTX Complete system for calling programs such as T X, drivers, and editors E E VAX/VMS machines (a version for Alphas was in pre- (Y&Y supply the public domain PE, and recommend paration); includes LAT X, multinational typesetting

the commercial Epsilon) from customisable menus (see E

AFÇÆÌ support, ÅEÌ and Web. question 41 for details of Y&Y). Scientific Word is a  editing program, strong Northlake Software, Inc. on maths, which uses LATEX for output (see question 41 812 SW Washington, Ste 1100 for contact address). Portland, OR 97201 USA Windows ’9x, NT Winedt, a shareware package Tel: (+1) 503-228-3383 (systems/win32/winedt/winedt32.exe), is highly Fax: (+1) 503-228-5662 spoken of. It provides a shell for the use of TEX Email: [email protected] and related programs, as well as a powerful and well- configured editor. Source: Email from Pat Rau, November 1994

–14– The New TEX FAQ: Your 126 Questions Answered

PC;TrueTEX Runs on Windows 3.1, Window NT and USA Windows 95. Tel: (+1) 516-921-1351 RichardJ.Kinch Email: [email protected] 6994 Pebble Beach Court Source: AMS listing, November 1994 Lake Worth FL 33467 USA PC; Scientific Word Scientific Word and Scientific Work- Tel: (+1) 561-966-8400 Fax: (+1) 561-966- place offer a mechanism for near- input 0962 Email: [email protected] of LATEX documents; they ship with TrueTEXfrom Web: http://idt.net/~truetex Kinch (see above). Queries within the UK and Ire- land should be addressed to Scientific Word Ltd., Source: News posting from Richard Kinch, October others should be addressed directly to the publisher, 1997 MacKichan Software Inc. PC;TEX “Bitmap free TEX for Windows.” Dr Christopher Mabb Y&Y, Inc. Scientific Word Ltd. 45 Walden Street 49 Queen Street Concord MA 01742 Peterhead USA Aberdeenshire, AB42 1TU Tel: 800-742-4059 (within the USA) UK Tel: (+1) 508-371-3286 Tel: 0845 766 0340 (within the UK) Fax: (+1) 508-371-2004 Tel: +44 1779 490500 Email: [email protected] and Fax: 01779 490600 (within the UK) [email protected] Email: [email protected]. Web: http://www.YandY.com/ co.uk Web: http://www.sciword. demon.co.uk Source: Y&Y announcement, February 1995 pcTEX Long-established: pcTEX32 is a Windows imple- MacKichan Software Inc. mentation. 600 Ericksen Ave. NE, Suite 300 Bainbridge Island WA 98110 Personal TEXInc USA 12 Madrona Street Tel: (+1) 206 780 2799 Mill Valley, CA 94941 Fax: (+1) 206 780 2857 USA Email: [email protected] Tel: 800-808-7906 (within the USA) Web: http://www.mackichan.com Fax: (+1) 415-388-8865 Email: [email protected] and Source: Mail from Christopher Mabb, May 1999 [email protected]

Web: http://www.pctex.com/ Macintosh; Textures “A TEX system ‘for the rest of us’ ”;

AFÇÆÌ also gives away a ÅEÌ implementation and Source: Mail from Personal T X Inc, September 1997 E some font manipulation tools. PC;VTEX Also “Bitmap-free”. Blue Sky Research MicroPress Inc 534 SW Third Avenue 68-30 Harrow Street Portland, OR 97204 Forest Hills, NY 11375 USA USA Tel: 800-622-8398 (within the USA) Tel: (+1) 718-575-1816 Tel: (+1) 503-222-9571 Fax: (+1) 718-575-8038 Fax: (+1) 503-222-1643 Email: [email protected] Email: [email protected] Web: http://www.micropress-inc. Web: http://www.bluesky.com/ com/ Source: TUGboat 15(1) (1994) Source: MicroPress home page, April 1996 AmigaT X A full implementation for the Commodore PC; microTEX MicroTEXandTEX tools. E Amiga, including full, on-screen and printing support Micro Programs, Inc. for all PostScript graphics and fonts, IFF raster graph- 251 Jackson Ave. ics, automatic font generation, and all of the standard Syosset, NY 11791 macros and utilities.

–15– The New TEX FAQ: Your 126 Questions Answered

Radical Eye Software dvipage For SunView on (old enough) Sun workstations. This PO Box 2081 was published in volume 15 of comp.sources.unix Stanford, CA 94309 and is archived in dviware/dvipage USA xtex An older previewer for the X Window System; available Source: Mail from Tom Rokicki, November 1994 in dviware/seetex dviapollo For Apollo Domain workstations; available in G DVI drivers and previewers dviware/dviapollo

42 DVI to PostScript conversion programs dvidis For (old enough, VMS) VAXstations running VWS; available in dviware/dvidis The best public domain DVI to PostScript conversion pro- gram which runs under many operating systems is Tom dvitovdu for Tektronix 4010-compatible and other termin- Rokicki’s dvips. dvips is written in C and ports easily to other als under Unix and VMS; available as dviware/ operating systems; it is available as dviware/dvips dvitovdu VMS versions are available through the DECUS library dvi2tty A DVI to ASCII conversion program, for normal ter- (see question 35), and also as part of the distribution of T X E minals; available as dviware/dvi2tty for VMS (systems/OpenVMS/TEX97_CTAN.ZIP). A precompiled version for MS-DOS is available from texsgi For SGI under Irix; both a binary and source are avail- systems/msdos/dviware/dvips able, but be sure to get the fonts as well. Available as Karl Berry’s version of dvips (called dvipsk) has a config- dviware/texsgi ure script and path searching code similar to that in his other programs (e.g., web2c); it is available from dviware/dvipsk H Support packages for T X Another good portable program is dvitops by James Clark, E which is also written in C and will compile under Unix, MS- 45 Fig, a TEX-friendly drawing package DOS, VMS, and Primos; however, it does not support virtual fonts. It is available from dviware/dvitops (X)Fig is a menu driven tool that allows you to draw ob- Macintosh users can use either the excellent drivers built jects on the screen of an X workstation. transfig is a set of into OzT X or Textures, or a port of dvips in the CMacT X tools which translate the code fig produces to other graph- E E A package. ics languages including PostScript and the LTEX picture environment. They are available in graphics/xfig and graphics/transfig 43 DVI drivers for HP LaserJet Fig is supported by Micah Beck ([email protected]) The emTEX package (see question 39) contains a driver for and transfig is maintained by Brian Smith (bvsmith@lbl.

the LaserJet, dvihplj. gov). Another tool for fig conversion is fig2mf which gen-

AFÇÆÌ Version 2.10 of the Beebe drivers supports the LaserJet. erates ÅEÌ code from fig input. It is available in These drivers will compile under Unix, VMS, and on the graphics/fig2mf Atari ST and DEC-20’s, and are available from dviware/ beebe 46 TEXCAD, a drawing package for LATEX Karl Berry’s dviljk, which has the same path-searching TEXCAD is a program for the PC which enables the user to code as his dvipsk (see question 42), is available in dviware/ draw diagrams on screen using a mouse or arrow keys, with dviljk an on-screen menu of available picture-elements. Its output is code for the LATEX picture environment. Optionally, it can 44 DVI previewers be set to include lines at all angles using the emTEXdriver- family \specials (see question 32). T XCAD is part of the EmTEXandgTEX for the PC,andOzTEX for the Macin- E tosh, all come with previewers that can be used on those emTEX distribution. A Unix port of the program exists, graphics/xtexcad/ platforms. There is a good OS/2 Presentation Manager xtexcad-2.4.tar.gz previewer in emTEX, and a public domain Windows pre- viewer (dviware/dviwin). Commercial PC TEX packages (see question 41) have good MS-DOS and Windows preview- 47 Spelling checkers for work with TEX ers. For Unix, ispell is probably the program of choice. It is avail- Previewers available for other operating systems include: able in support/ispell; beware of any version with a num- ber 4.x — such versions represent a divergent version of the xdvi The most widely used previewer for the X Window source which lacks many useful facilities of the 3.x series. System (and hence almost any Unix or modern VMS For MS-DOS, there are several programs. amspell can dviware/xdvi workstation); available in be called from within an editor (available as support/ Karl Berry’s version of xdvi, called xdvik,hasfeatures amspell). jspell is an extended version of ispell (available as analogous to his dvipsk (see question 42); it is available support/jspell). in dviware/xdvik For the Macintosh, Excalibur is the program of choice.

–16– The New TEX FAQ: Your 126 Questions Answered

It will run in native mode on both sorts of Macintosh, FunnelWeb is a version of WEB that is language independ- and is available as systems/mac/support/excalibur/ ent. It is available in web/funnelweb Excalibur-2.5-sit.hqx (there are other dictionaries in Other language independent versions of WEB are nuweb the same directory). (which is written in ANSI C), available in web/nuweb,and For VMS, a spell checker can be found in support/ noweb, available in web/noweb vmspell A WEB for plain TEX macro files, using noweb, has recently been made available in web/tweb 48 The VORTEXpackage J Format conversions VORTEX (available in support/vortex) is a package of pro- grams written at the University of California at Berkeley, 51 Conversion between (LA)T X and others and was described by Michael A. Harrison in “News from the E ff ff VORTEX project”inTUGboat 10(1), pp. 11–14, 1989. It in- tro tro -to- (available as support/troff-to-latex), cludes several nice previewers and some emacs modes for TEX written by Kamal Al-Yahya at Stanford University ff and BTEX. The VORTEX distribution is not maintained, (California, USA), assists in the translation of a tro and now looks distinctly long in the tooth (it was never up- document into LATEX format. It recognises most -ms graded to TEX version 3). and -man macros, plus most eqn and some tbl prepro- VORTEX needed a separate workstation to run TEXinthe cessor commands. Anything fancier needs to be done background; modern PCs for the home can provide more by hand. Two style files are provided. There is also processor power (than was available to VORTEX) in a single a man page (which converts very well to LATEX...). box. This fact has been recognised by Blue Sky Research The program is copyright but free. An enhanced ver- in their ‘Lightning Textures’ (which runs on a Macintosh in sion of this program, tr2latex, is available in support/ a somewhat similar way) and by TCI Software Research in tr2latex ‘Scientific Word’ (see question 41), and is also the basis of The DECUS TEX distribution (see question 35) also many of the other environments mentioned in question 40. contains a program which converts troff to TEX.

I Literate programming WordPerfect wp2latex (available as support/wp2latex) has recently been much improved, and is now avail- 49 What is Literate Programming? able both for MS-DOS and for Unix systems, thanks to its current maintainer Jaroslav Fojtik. Literate programming is the combination of documentation and source together in a fashion suited for reading by human PC-Write pcwritex.arc,fromsupport/pcwritex,isa beings. In general, literate programs combine source and print driver for PC-Write that “prints” a PC-Write documentation in a single file. Literate programming tools V2.71 document to a TEX-compatible disk file. It was then parse the file to produce either readable documentation written by Peter Flynn at University College, Cork, Re- or compilable source. The WEB style of literate program- public of Ireland. ming was created by D. E. Knuth during the development of runoff Peter Vanroose’s ([email protected]. his TEX typesetting software. Discussion of literate programming is conducted in be) conversion program is written in VMS Pascal. the newsgroup comp.programming.literate The literate The sources and a VAX executable are available from support/rnototex programming FAQ is stored as help/LitProg-FAQ refer/tib There are a few programs for converting bibli- 50 WEB for C, FORTRAN, and other ographic data between BTEXandrefer/tib formats. languages They are in biblio/bibtex/utils/refer-tools TEX is written in the programming language WEB; WEB is a In spite of the directory name, it also contains a shell tool to implement the concept of “literate programming”. script to convert BTEXtorefer as well. The collection CWEB,aWEB for C programs, written by Silvio Levy, is is not maintained. available as web/c_cpp/ Spidery WEB supports many languages including Ada, RTF A program for converting Microsoft’s Rich Text Format awk, and C. It was written by Norman Ramsey and, while to TEX is available in support/rtf2tex,whichwas not in the public domain, is usable free. It is available in written and is maintained by Robert Lupton (rhl@ web/spiderweb astro.princeton.edu). There is also a convertor to A FWEB is a version for Fortran, Ratfor, and C written by LTEXbyErwinWechtl,insupport/rtf2latex John Krommes. It is available in web/fweb Translation to RTF may be done (for a somewhat con- SchemeWEB is a Unix filter that translates SchemeWEB strained set of LATEXdocuments)byTEX2RTF,which into LATEX source or Scheme source. It was written by John can produce ordinary RTF, Windows Help RTF (as well Ramsdell and is available in web/schemeweb as HTML, see question 54). TEX2RTF is supported on APLWEB is a version of WEB for APL and is available in various Unix platforms and under Windows 3.1; it is web/apl/aplweb available from support/tex2rtf

–17– The New TEX FAQ: Your 126 Questions Answered

Microsoft Word A rudimentary program for convert- Balise. They are expensive, but powerful, incorporat- ing MS-Word to LATEX is wd2latex, for MS-DOS ing SGML query and transformation abilities as well as (dviware/wd2latex); a better idea, however, is to simple translation. convert the document to RTF format and use one of the RTF converters mentioned above. 3. Build a translator on top of an existing SGML parser. By far the best-known (and free!) parser is James A FAQ that deals specifically with conversions between Clark’s nsgmls, and this produces a much simpler out- TEX-based formats and word processor formats is regularly put format, called ESIS, which can be parsed quite posted to comp.text.tex, is available via http://www. straightforwardly (one also has the benefit of an SGML kfa-juelich.de/isr/1/texconv/texcnv.html and is parse against the DTD). Two good public domain archived as help/wp-conv/wp-conv.zip packages use this method: A group at Ohio State University (USA) is working on a • common document format based on SGML, with the ambi- David Megginson’s sgmlspm, written in Perl 5. tion that any format could be translated to or from this one. Available from http://www.perl.com/CPAN/ FrameMaker provides “import filters” to aid translation from modules/by-module/SGMLS • alien formats (possibly including TEX) to Framemaker’s own. Joachim Schrod and Christine Detig’s stil, written in Common Lisp. Available from ftp://ftp. th-darmstadt.de/pub/text/sgml/stil 52 Conversion from (LA)TEX to plain ASCII The aim here is to emulate the Unix nroff , which formats text Both of these allow the user to write ‘handlers’ for as best it can for the screen, from the same input as the Unix every SGML element, with plenty of access to attrib- typesetting program troff . utes, entities, and information about the within Ralph Droms ([email protected])hasastylefile the document tree. and a program that provide the LATEX equivalent of nroff , If these packages don’t meet your needs for an average though it doesn’t do a good job with tables and mathem- SGML typesetting job, you need the big commercial atics. The software is available in support/txt;theori- stuff. ginal dvi2tty often does an acceptable job and is available in dviware/dvi2tty Since HTML is simply an example of SGML,wedo Another possibility is to use screen.sty (available as not need a specific system for HTML.However,Nathan macros/latex209/contrib/misc/screen.sty). Use a Torkington ([email protected]) developed dvi2tty program of some kind; you might try dviware/ html2latex from the HTML parser in NCSA’s Xmosaic pack- crudetype as well. Another possibility is to use the LATEX- age. The program takes an HTML file and generates a to-ASCII conversion program, l2a (support/l2a), although LATEX file from it. The conversion code is subject to NCSA this is really more of a de-TEXing program. restrictions, but the whole source is available as support/ The canonical de-TEXing program is detex (support/ html2latex detex), which removes all comments and control sequences Michel Goossens and Janne Saarela published a very use- from its input before writing it to its output. Its original pur- ful summary of SGML, and of public domain tools for writing pose was to prepare input for a dumb spelling checker. and manipulating it, in TUGboat 16(2).

A 53 Conversion from SGML or HTML to TEX 54 (L)TEXconversiontoHTML SGML is a very important system for document storage and TEX is a typesetting language, not a markup system. With interchange, but it has no formatting features; its companion properly-used LATEX, you may be luckier, but don’t expect ISO standard DSSSL (http://www.jclark.com/dsssl/) a free lunch. Remember that a) if you want a really good is designed for writing transformations and formatting, but Web document, you had better redesign it from scratch, and this has not yet been widely implemented. Some SGML au- b) HTML (even HTML3) has pretty poor ‘typesetting’ facilit- thoring systems (e.g., SoftQuad Author/Editor)haveformat- ies, and anything beyond the trivial will probably need to end ting abilities, and there are high-end specialist SGML type- up a graphic. HTML 4 plus CSS is much better from this setting systems (e.g., Miles33’s Genera). However, the majority perspective. A of SGML users probably transform the source to an existing LTEX2HTML (support/latex2html) is a package by Nikos Drakos (mostly of perl scripts) that breaks up a LAT X typesetting system when they want to print. TEX is a good E candidate for this. There are three approaches to writing a document into one or more components, and links them to- translator: gether so that they can be read over the World-Wide Web as an hypertext document. It defines a mapping between LATEX 1. Write a free-standing translator in the traditional way, intra-document references and hyperlinks, and extends the with tools like yacc and lex; this is hard, in practice, be- mechanisms to permit reference to other (possibly remote) cause of the complexity of SGML. documents and other Internet resources. It translates LATEX accented and other characters (as best it can) to things that 2. Use a specialist language designed for SGML trans- World-Wide Web browsers can display, and translates math- formations; the best known are probably Omnimark and ematics (and other things that browsers can’t deal with) to

–18– The New TEX FAQ: Your 126 Questions Answered images that can be loaded in-line into the hypertext docu- 56 Making Acrobat documents from LATEX ment. There are now two general routes to Acrobat output: Adobe’s LATEX2HTML needs Perl,thePBM utilities, dvips, GhostScript, and other sundries; it assumes it is running on a original ‘distillation’ route, and the use of PdfTEX (see ques- Unix system. Michel Goossens and Janne Saarela published tion 125). For simple documents (with no hyper-references), you can a detailed discussion of LATEX2HTML, and how to tailor it, in TUGboat 16(2). either There are two possible strategies: • distill ‘ordinary’ PostScript output of your docu- 1. Free-standing LAT XtoHTML translations. Hard, but E ment, or (on a Windows or Macintosh machine with not impossible. Julian Smart’s latex2rtf (available from AcrobatExchange installed) pass it through the PDFwriter support/latex2rtf) does a plausible job on a subset or Distiller Assistant in place of a printer, or of LATEX; • process with PdfTEX, enabling Acrobat output. 2. Writing an HTML-output backend in LATEX itself. See Sebastian Rahtz’ paper in TUGboat 16(3)foradis- (Note that the PDFwriter route is a dead end: it can only be cussion of how to go about this for the general case of used in this simple mode, as it cannot create hyperlinks.) SGML. To translate all the LATEX cross-referencing into Ac- robat links, you need a LATEX package to suitably re- 55 Making hypertext documents from TEX define the internal commands. There are two of these for LAT X2ε, both based on the HyperT X specification If you want on-line hypertext with a (LA)TEX source, probably E E on the World Wide Web, consider four technologies (which (see question 55): Sebastian Rahtz’s hyperref (available from overlap): macros/latex/contrib/supported/hyperref), and Michael Mehlich’s hyper (available from macros/latex/ 1. Try direct LATEX conversion to HTML; see ques- contrib/supported/hyper). Hyperref can operate using tion 54; PdfTEX primitives rather than the hyperTEX conventions. 2. Rewrite your document using Texinfo (see ques- You can use dvips or Y&Y’s DVIPSONE to translate the DVI tion 13), and convert that to HTML; into PostScript acceptable to Distiller. Sadly, there is no free implementation of all of Distiller’s 3. Look at Adobe Acrobat, an electronic delivery system functionality, but GhostScript (version 4.00 onwards) provides guaranteed to preserve your typesetting perfectly. See some restricted distilling capability, and Distiller itself is now question 56; remarkably cheap (for academics at least). 4. Invest in the hyperTEX conventions (standardised Adobe’s AcrobatReader is available for a very wide range of \special commands); there are supporting macro platforms. For those still omitted, GhostScript (versions 3.51 packages for plain TEXandLATEX). onwards) can display and print PDF files. Work on a DVI to PDF translator is in progress, but shows The HyperT X project aims to extend the functionality E no sign of immediate release (Sergey Lesenko spoke about the of all the LAT X cross-referencing commands (including the E work at TUG’96 and again at TUG’97). table of contents) to produce \special commands which are parsed by DVI processors conforming to the HyperTEX

guidelines; it provides general hypertext links, including those

AFÇÆÌ to external documents. K ÅEÌ

The HyperTEX specification says that conformant view-

AFÇÆÌ ers/translators must recognize the following set of \special 57 Getting ÅEÌ to do what you want

commands:

AFÇÆÌ

ÅEÌ allows you to create your own fonts, yet most

AFÇÆÌ href: html: TEX users will never need to use it explicitly. ÅEÌ , unlike T X, requires some customisation: each output device name: html: E for which you will be generating fonts needs a mode associ-

end: html: ated with it. Modes are defined using the mode_def con-

AFÇÆÌ vention described on page 94 of The ÅEÌ book (see image: html: question 19). You will need a file, conventionally called base_name: html: local.mf, containing all the mode_defs you will be using. The href, name and end commands are used to do the basic If local.mf doesn’t already exist, Karl Berry’s collection hypertext operations of establishing links between sections of of modes, available as fonts/modes/modes.mf, is a good

documents. starting point (it can be used as a ‘local.mf’ without modi-

AFÇÆÌ Further details are available on http://xxx.lanl.gov/ fication in a ‘big enough’ implementation of ÅEÌ ). hypertex/; there are two commonly-used implementations Lists of settings for various output devices are also published of the specification, a modified xdvi and (recent releases of) periodically in TUGboat (see question 16). Now create a dvips. Output from the latter may be used in recent releases plain base file using inimf , plain.mf,andlocal.mf: of GhostScript or Acrobat Distiller.

–19– The New TEX FAQ: Your 126 Questions Answered

% inimf (note the absence of the mode_def and enddef commands), This is METAFONT.. . you would type **plain you type ‘plain’ (output) mf \smode="ln03"; input cmr10 *input local you type this (output) This technique isn’t one you should regularly use, but it may *dump you type this prove useful if you acquire a new printer and want to experi- Beginning to dump on file plain. . . ment with parameters, or for some other reason are regularly (output) editing the parameters you’re using. Once you’ve settled on an appropriate set of parameters, you should use them to re- This will create a base file named plain.base (or some- build the base file that you use. thing similar; for example, it will be PLAIN.BAS on MS-DOS A summary of the above written by Geoffrey Tobin, and

systems) which should be moved to the directory containing

AFÇÆÌ tips about common pitfalls in using ÅEÌ , is available the base files on your system (note that some systems have two

as info/metafont-for-beginners.tex

AFÇÆÌ or more such directories, one for each ‘size’ of ÅEÌ

used).

AFÇÆÌ

Now you need to make sure ÅEÌ loads this new 58 Which font files should be kept

AFÇÆÌ

base when it starts up. If ÅEÌ loads the plain base

AFÇÆÌ by default on your system, then you’re ready to go. Under ÅEÌ produces from its run three files, a metrics Unix (using the default web2c distribution6) this does indeed (TFM) file, a generic font (GF) file, and a log file; all of these happen, but we could for instance define a command mf fileshavethesamebasenameasdoestheinput(e.g.,ifthe which executes virmf &plain loading the plain base file. input file was cmr10.mf, the outputs will be cmr10.tfm,

cmr10.nnngf7 and cmr10.log).

AFÇÆÌ The usual way to create a font with plain ÅEÌ is tostartitwiththeline For TEX to use the font, you need a TFM file, so you need to keep that. However, you are likely to generate the same \mode=; mag=; font at more than one magnification, and each time you do

input so you’ll (incidentally) generate another TFM file; these files

AFÇÆÌ in response to the ‘**’ prompt or on the ÅEÌ are all the same, so you need only keep one of them.

command line. (If is unknown or omitted, To preview or to produce printed output, the DVI pro-

AFÇÆÌ the mode defaults to ‘proof ’ and ÅEÌ will pro- cessor will need a font raster file; this is what the GF file duce an output file called .2602gf)The provides. However, while there used (once upon a time) to

is a floating point number or ‘mag- be DVI processors that could use GF files, modern processors

AFÇÆÌ step’ (magsteps are defined in The ÅEÌ book and The use packed raster (PK) files. Therefore, you need to generate TEXbook). If mag= is omitted, then the de- a PK file from the GF file; the program gftopk does this for you, fault is 1 (magstep 0). For example, to generate cmr10 at 12pt and once you’ve done that you may throw the GF file away.

for an epson printer you would type The log file should never need to be used, unless there was

AFÇÆÌ some sort of problem in the ÅEÌ run, and need not mf \mode=epson; mag=magstep 1; input cmr10 be ordinarily kept. Note that under Unix the \ and ; characters must usually be quoted or escaped, so this would typically look something like 59 Getting bitmaps from the archives mf ’\mode=epson; mag=magstep 1; input cmr10’ Most people these days start using TEX with a 300 dots- per-inch (dpi) laser printer, and Computer Modern bitmap If you don’t have inimf or need a special mode that isn’t in fonts for this resolution are supplied with most T X pack- the base, you can put its commands in a file (e.g., ln03.mf) E ages. There are also two such sets available on CTAN: and invoke it on the fly with the \smode command. For ex- fonts/cm/pk/pk300.zip (for write-black printer engines) ample, to create cmr10.300gf for an LN03 printer, using the and fonts/cm/pk/pk300w.zip (for write-white engines). file However, some users want to send their work to high quality % This is ln03.mf as of 1990/02/27 typesetting machines (typically with a resolution of 1270 dpi % mode_def courtesy of John Sauter or greater); it is also becoming more common to use a 600 dpi proofing:=0; laser printer. Why don’t the archives or suppliers provide bit- fontmaking:=1; map fonts at these sizes? There are two reasons:

tracingtitles:=0;

AFÇÆÌ pixels_per_inch:=300; 1. When a bitmap font is created with ÅEÌ ,it blacker:=0.65; needs to know the characteristics of the device; who fillin:=-0.1; knows what 600 or 1270 dpi device you have? (Of o_correction:=.5; course, this objection applies equally well to 300 dpi

6The command_name is symbolically linked to virmf ,andvirmf loads command_name.base 7Note that the file name may be transmuted by such operating systems as MS-DOS, which don’t permit long file names

–20– The New TEX FAQ: Your 126 Questions Answered

printers, but at this resolution the greatest difference or you can use the font re-encoding mechanisms available in lies between the write-black and write-white devices; many drivers and in ps2pk and afm2tfm. these differences tend to mask all lesser components Victor Eijkhout’s sophisticated Lollipop package such as over-shoot or fill-in.) (macros/lollipop) supports declaration of font families and styles in a similar way to LATEX’s NFSS, and so is easy to 2. Bitmap fonts get big at high resolutions. Who knows use with PostScript fonts. what fonts at what sizes you need? Some common problems encountered are discussed else- where (see question 63). It would be possible to provide some set of 1270 dpi bitmap fonts in the archives, but it would take a lot of space, and 61 Previewing files using PostScript fonts might not be right for you.

So what to do? You can build the fonts you need yourself Most TEX previewers display only bitmap PK fonts. If you

AFÇÆÌ

with ÅEÌ : this isn’t at all hard, and some drivers help want to preview documents using PostScript fonts, you have

AFÇÆÌ you (dvips, and the emTEX drivers construct the ÅEÌ three choices:

commands). You might need to look at Karl Berry’s col- 1. Convert the DVI file to PostScript and use a PostScript

AFÇÆÌ lection of ÅEÌ modes (fonts/modes/modes.mf). previewer. Some modern Unix X implementations Alternatively, if it is a PostScript device you have, consider have this built in (as does NeXT-step); (X11) Unix, using the fonts in Type 1 font format. You can buy all Windows, OS/2, and MS-DOS users can use the free the Computer Modern fonts in outline form from Blue Sky GhostScript (support/ghostscript), a complete level Research, Kinch or Y&Y (see question 41 for addresses), 2 implementation. or you can use Basil Malyshev’s public domain versions in fonts/cm/-type1 (the Paradissa collection is complete, 2. Under Windows on a PC, or on a Macintosh, let Adobe but has largely been replaced by the better BaKoMa collec- Type Manager display the fonts. Textures (Macintosh) tion).The Blue Sky fonts, too, may now be found on CTAN. works like this, and under Windows you can use Y&Y’s dviwindo for bitmap-free previewing. (See question 41 for details of these suppliers.) L PostScript and TEX 3. If you have the PostScript fonts in Type 1 format, use 60 Using PostScript fonts with TEX ps2pk (fonts/utilities/ps2pk)orgsftopk (designed for use with the GhostScript fonts; fonts/utilities/ In order to use PostScript fonts, T X needs metric (called TFM) E gsftopk)tomakePK bitmap fonts which your pre- files. Several sets of metrics are available from the archives; viewer will understand. This can produce excellent for mechanisms for generating new ones, see question 62. results, also suitable for printing with non-PostScript You also need the fonts themselves; PostScript printers come devices. Check the legalities of this if you have pur- with a set of fonts built in, but to extend your repertoire you chased the fonts. The very commonest PostScript fonts almost invariably need to buy from one of the many commer- such as Times and Courier come in Type 1 format on cial font vendors (see, for example, question 64). disk with Adobe Type Manager (often bundled with If you use LAT X2ε, the best way to get PostScript fonts E Windows, and part of OS/2). into your document is to use the PSNFSS package main- tained by Sebastian Rahtz and Alan Jeffrey (available in 62 T X font metric files for PostScript fonts macros/latex/required/psnfss); it’s supported by the E LATEX3 project team, so bug reports can and should be Font vendors such as Adobe supply metric files for each font, submitted. PSNFSS gives you a set of packages for chan- in AFM (Adobe Font Metric) form; these can be converted ging the default roman, sans-serif and typewriter fonts; e.g., to TFM (TEX Font Metric) form. The CTAN archives have times.sty will set up Times Roman, Helvetica and Cour- prebuilt metrics which will be more than enough for many ier in place of Computer Modern, while avant.sty just people (fonts/psfonts; beware — this directory is at the changes the sans-serif family to AvantGarde. To go with root of a huge tree), but you may need to do the conversion these packages, you will need the font metric files (watch yourself if you have special needs or acquire a new font. One out for encoding problems! see question 62) and font de- important question is the encoding of (Latin character) fonts; scription (.fd) files for each font family you want to use. while we all more or less agree about the position of about 96 These can be obtained from fonts/psfonts, arranged by characters in fonts (the basic ASCII set), the rest of the (typ- vendor (e.g., Adobe, Monotype, etc.). For convenience, metrics ically) 256 vary. The most obvious problems are with float- for the common ‘35’ PostScript fonts found in most print- ing accents and special characters such as the ‘pounds ster- ers are provided with PSNFSS, packaged as macros/latex/ ling’ sign. There are three ways of dealing with this: either packages/psnfss/lw35nfss.zip you change the TEX macros which reference the characters For older versions of LATEX there are various schemes, of (not much fun, and error-prone); or you change the encoding which the simplest to use is probably the PSLATEX macros of the font (easier than you might think); or you use virtual distributed with dvips. fonts (see question 31) to pretend to TEX that the encoding For plain TEX, you load whatever fonts you like; if the is the same as it expects. If you use LATEX2ε, it allows for encoding of the fonts is not the same as Computer Modern changing the encoding in TEX; read the LATEX Companion (see it will be up to you to redefine various macros and accents, question 19) for more details. In practice, if you do much

–21– The New TEX FAQ: Your 126 Questions Answered non-English (but Latin script) typesetting, you are strongly 64 Choice of scalable outline fonts recommended to use the fontenc package with option ‘T1’ If you are interested in text alone, you can use any of over to select T1 (‘Cork’: see question 34) encoding. 20,000 fonts(!) in Adobe Type 1 format (called ‘PostScript Alan Jeffrey’s fontinst package (fonts/utilities/ fonts’ in the T X world and ‘ATM fonts’ in the DTP world), fontinst)isanAFM to TFM converter written in T X; it E E or any of several hundred fonts in TrueType format. That is used to generate the files used by LAT X2ε’s PSNFSS pack- E is, provided of course, that your previewer and printer driver age to support use of PostScript fonts. It is a sophisticated support scalable outline fonts. package, not for the faint-hearted, but is powerful enough to T X itself cares only about metrics, not the actual charac- cope with most needs. Much of its power relies on the use of E ter programs. You just need to create a T X metric file TFM virtual fonts (see question 31). E using some tool such as afm2tfm, afmtotfm (from Y&Y,see ques- For slightly simpler problems, Rokicki’s afm2tfm, distrib- tion 41) or fontinst. For the previewer or printer driver you uted with dvips (dviware/dvips), is fast and efficient; note need the actual outline font files themselves (pfa for Display that the metrics and styles that come with dvips are not cur- PostScript, pfb for ATM on IBM PC, Mac outline font files rently LAT X2ε compatible, but Karl Berry plans to distrib- E on Macintosh). ute metrics directly compatible with PSNFSS in his dvipsk If you also need mathematics, then you are severely lim- package. ited by the demands that TEX makes of maths fonts (for de- For the Macintosh, there is a program called EdMetrics tails, see the paper by B.K.P. Horn in TUGboat 14(3)). For which does the job (and more). It comes with maths, then, there are relatively few choices: the Textures distribution, but is in fact free soft- ware, available as systems/mac/textures/utilities/ Computer Modern (75 fonts — optical scaling) Donald E. EdMetrics.sea.hqx Knuth MS-DOS users can buy (see question 41) Y&Y’s Font Ma- Note that CM is available in scalable outline form. nipulation Tools package which includes a powerful afmtotfm There are commercial as well as public domain ver- program among many other goodies. sions, and there are both Adobe Type 1 and TrueType versions. Some of these are ‘commercial grade,’ with full hand-tuned hinting, some render very poorly, 63 Problems using PostScript fonts while others are merely incompatible with Adobe Type Manager (ATM). A For the typical LTEXusertryingtousethePSNFSS (see ques- Lucida Bright with Lucida New Math (25 fonts) Chuck Bigelow tion 60) package, three questions often arise. First, you have and Kris Holmes to declare to the DVI driver that you are using PostScript Lucida is a family of related fonts including serif, sans dvips fonts; in the case of , this means adding lines to the serif, sans serif fixed width, calligraphic, blackletter, psfonts.map file. Otherwise, dvips will try to find PK files. fax, Kris Holmes’ connected handwriting font, etc; If the font isn’t built into the printer, you have to acquire it they’re not as ‘spindly’ as Computer Modern, with (in many cases this means buying it from a commercial sup- a large x-height, and include a larger set of maths plier!). You then have to instruct the driver to download it symbols, operators, relations and delimiters than CM with each job (the mechanism depends on your driver). So (over 800 instead of 384: among others, it also in- it’s no good just installing the metrics for Optima and expect- cludes the AMS msam and msbm sets). The ing it to work. You have to pay hard cash for the font itself, planned ‘Lucida Bright Expert’ (14 fonts) adds seriffed MS-DOS pfb which will come (for Unix and users) in (Printer fixed width, another handwriting font, smallcaps, bold Font Binary) form. maths, upright ‘maths italic’, etc., to the set The distri- Second, you cannot expect your previewer to suddenly bution includes support for use with plain TEXand start displaying PostScript fonts; most of them know only LATEX 2.09. Support under LATEX2ε is provided in PK ps2pk about bitmap fonts such as Computer Modern. PSNFSS (see question 60) thanks to Sebastian Rahtz. (fonts/utilities/ps2pk) can create these from the pfb file you have bought; this would also let you use the fonts MathTime 1.1 (3 fonts) TEXplorators (Michael Spivak) with non-PostScript device drivers such as the emTEXones. The set contains maths italic, symbol, and exten- You are responsible for making sure you are not breaking the sion fonts, designed to work well with Times-Roman. licence restrictions on fonts that you have bought. These are typically used with Times, Helvetica and Third, the stretch and shrink between words is a function Courier (which are resident on many printers, and of the font metric; it is not specified in AFM files, so different which are supplied with some PC versions). In addi- converters choose different values. The PostScript metrics tion you may want to complement this basic set with that come with PSNFSS used to produce quite tight setting, Adobe’s Times Smallcap, and perhaps the set of Adobe but they were revised in mid 1995 to produce a compromise ‘Math Pi’ fonts, which include blackboard bold, black- between American and European practice. Really sophistic- letter, and script faces. The distribution includes sup- ated users may not find even the new the values to their taste, port for use with plain TEXandLATEX 2.09 (includ- and want to override them. Even the casual user may find ing code to link in Adobe Math Pi 2 and Math Pi 6). more hyphenation or overfull boxes than CMR produces; but Support under LATEX2ε is provided in PSNFSS (see CMR is extremely generous. question 60) thanks to Sebastian Rahtz.

–22– The New TEX FAQ: Your 126 Questions Answered

Adobe Lucida, LucidaSans and LucidaMath (12 fonts) the ‘standard’ complement of 228 glyphs, or may not include Lucida and LucidaMath are generally considered to metric files (needed to make TFM files). Also, avoid TrueType be a bit heavy. The three maths fonts contain only the fonts from all but the major vendors. TrueType fonts are glyphs in the CM maths italic, symbol, and extension an order of magnitude harder to ‘hint’ properly than Type 1 fonts. Support for using LucidaMath with TEXisnot fonts and hence TrueType fonts from places other than Mi- very good; you will need to do some work reencoding crosoft and Apple may be suspect. In any case you may find fonts etc. (In some sense this set is the ancestor of the other problems with TrueType fonts such as service bureaux LucidaBright plus LucidaNewMath font set.) not accepting jobs calling for them.

Concrete, the AMS maths fonts etc. Donald E. Knuth and the 65 Including a PostScript figure in LATEX AMS. These are sometimes mentioned as alternatives to CM, LATEX2ε (see question 121) has a standard package for but they are really adjuncts, in that you need to use at graphics inclusion, rotation, colour, and other driver-related least the basic CM maths fonts with them. features. The package is documented in the second edition of Leslie Lamport’s LATEX book (see question 19), and is avail- Proprietary fonts Various sources. able in macros/latex/required/graphics Since having a high quality font set in scalable outline If you don’t use LATEX2ε, perhaps the best method is to form that works with TEX can give a publisher a real use the psfig macros written by Trevor Darrell, available in competitive advantage, there are some publishers that graphics/psfig have paid (a lot) to have such font sets made for them. You will also need a DVI to PostScript conversion pro- Unfortunately, these sets are not available on the open gram that supports the \specials. The drivers mentioned market, despite the likelihood that they’re more com- in question 42 do, and come with a version of psfig ready plete than those that are. to use with them. The psfig macros work best with Encap- sulated PostScript Files (EPS). In particular, psfig will need Mathptm (4 fonts) Alan Jeffrey. the file to have a BoundingBox (see Appendix H of the Post- This set contains maths italic, symbol, extension, and Script Language Reference Manual). If you don’t have an EPS file, roman virtual fonts, built from Adobe Times, Symbol, life can be difficult. Zapf Chancery, and the Computer Modern fonts. The One point to note about including PostScript figures is Mathptm fonts are free, and the resulting PostScript that they are not part of the DVI file, but are included only files can be freely exchanged. Contains most of the when you use a DVI to PostScript conversion program. As a CM math symbols. Support under LAT X2ε in PSNFSS E result, most DVI previewers will simply show the blank space (see question 60) thanks to Alan Jeffrey and Sebastian T X has reserved for your figure, not the figure itself. Rahtz. E There are two rather good documents on CTAN ad- (A similar development by Thomas Esser, using the dressing figure production with rather different emphasis. Adobe Palatino fonts, is available from systems/ Anil K. Goel’s info/figsinltx.ps covers the differ- unix/teTeX/updates/texmf/mathppl.sh) ent ways in which you might generate figures, and also the old (LAT X 2.09) ways of including them into doc- All of the first three font sets are available in formats suit- E uments. Keith Reckdahl’s info/epslatex.pdf cov- able for IBM PC/Windows, Macintosh and Unix/NeXT from ers the standard LAT X2ε facilities, as well as some of Y&Y and from Blue Sky Research (see question 41 for de- E the supporting packages, notably subfigure (macros/latex/ tails). The MathTime fonts are also available from: contrib/supported/subfigure)andpsfrag (macros/ latex/contrib/supported/psfrag TEXplorators ). 1572 West Gray #377 Houston TX 77019 M Special sorts of typesetting USA 66 Drawing with TEX The very limited selection of maths font sets is a direct res- A ult of the fact that a maths font has to be explicitly designed There are many packages to do pictures in (L)TEXitself (rather than importing graphics created externally), ranging for use with TEX and as a result it is likely to lose some of from simple use of the LAT X picture environment, through its appeal in other markets. Furthermore, the TEX market E for commercial fonts is minute (in comparison, for example, enhancements such as epic, to sophisticated (but slow) draw- to Microsoft TrueType font pack #1, which sold something ing with PICTEX. Depending on your type of drawing, and like 10 million copies in a few weeks after release of Win- setup, four systems should be at the top of your list to look at: dows 3.1!). 1. graphics/; this gives you access to all the Text fonts in Type 1 format are available from many power of PostScript from TEX itself, by sophisticated vendors including Adobe, Monotype, Bitstream. Avoid use of \specials. You need a decent DVI to Post- cheap rip-offs: not only are you rewarding unethical be- Script driver (like dvips), but the results are worth haviour, destroying the cottage industry of innovative type it. The well-documented package gives you not only design, but you are also very likely to get junk. The fonts low-level drawing commands (and full colour) such as may not render well (or at all under ATM), may not have lines, circles, shapes at arbitrary coordinates, but also

–23– The New TEX FAQ: Your 126 Questions Answered

high-level macros for framing text, drawing trees and 69 Flowing text around figures in LATEX matrices, 3D effects, and more.

There are several LATEX packages that purport to do this,

AFÇÆÌ 2. MetaPost; you liked ÅEÌ ,butnevergotto but they all have their limitations because the TEX machine

grips with font files? Try MetaPost (see question 4) — isn’t really designed to solve this sort of problem. Piet van

AFÇÆÌ all the power of ÅEÌ , but it generates Post- Oostrum has conducted a survey of the available packages;

Script figures. Knuth uses it for all his work. . . he recommends:

AFÇÆÌ 3. Mfpic; you liked ÅEÌ , but can’t understand the picins picins.sty is part of a large package (systems/

language? The package (graphics/mfpic)makesup msdos/picins/picins.zip) that allows inclusion of

AFÇÆÌ

ÅEÌ code for you while using familiar-looking pictures (e.g., with shadow boxes, various MS-DOS

AFÇÆÌ TEX macros. Not quite the full power of ÅEÌ , formats, etc.). The command is: but a friendlier interface. \parpic(width,height)(x-off ,y-off )[Options][Position] {Picture} 4. You liked P CT X but don’t have enough memory I E Paragraph text or time? Look at Eitan Gurari’s macros/generic/ dratex, which is as powerful as most other TEXdraw- All parameters except the Picture are optional. The pic- ing packages, but is an entirely new implementation, ture can be positioned left or right, boxed with a rect- which is not as hard on memory, is much more read- angle, oval, shadowbox, dashed box, and a caption can able (and is fully documented). be given which will be included in the list of figures. Unfortunately (for those of us whose understanding of 67 Double-spaced documents in LATEX German is not good), the documentation is in German. Are you producing a thesis, and trying to obey regulations Piet van Oostrum has written an English summary that were drafted in the typewriter era? Or are you produ- macros/latex209/contrib/picins/picins.txt cing copy for a journal that insists on double spacing for the floatflt macros/latex/contrib/other/floatflt is submitted articles? an improved version (for LATEX2ε)offloatfig.sty, LATEX is a typesetting system, so the appropriate design and its syntax is: conventions are for “real books”. If your requirement is from \begin{floatingfigure}[options]{width of figure} thesis regulations, find whoever is responsible for the regula- figure contents tions, and try to get the wording changed to cater for typeset \end{floatingfigure} theses (e.g., to say “if using a typesetting system, aim to make your thesis look like a well-designed book”). (If your require- There is a (more or less similar) floatingtable en- ment is from a journal, you’re probably even less likely to be vironment. able to get the rules changed, of course.) Bear in mind that The tables or figures can be set left or right, or alternat- thesis regulations are drafted to allow the examiner to add ing on verso/recto pages in a double-sided document. inter-linear and marginal notes; you may be able to com- The package works with the multicol package, but 1 1/2 promise with − line spacing. . . doesn’t work well in the neighbourhood of list environ- If you fail to convince your officials, or want some inter- ments (unless you change your LATEX document). line space for copy-editing: wrapfig macros/latex/contrib/other/misc/ • Try changing \baselinestretch: \renewcommand wrapfig.sty has syntax: {\baselinestretch}{1.2} may be enough to give officials the impression you’ve kept to their regulations. \begin{wrapfigure}[height of figure in lines]{l,r,etc} Don’t try changing \baselineskip: its value is reset [overhang]{width} at any size-changing command. figure, caption, etc. • Alternatively, use a line-spacing package. The best \end{wrapfigure} for current is macros/latex/contrib/supported/ The syntax of the wraptable environment is similar. setspace/setspace.sty Height can be omitted, in which case it will be calcu- lated by the package; the package will use the greater 68 Formatting a thesis in LATEX of the specified and the actual width. The {l,r,etc.} Thesis styles are usually very specific to your University, so parameter can also be specified as i(nside) or o(utside) it’s usually not profitable to ask around for a package out- for two-sided documents, and uppercase can be used side your own University. Since many Universities (in their to indicate that the picture should float. The overhang eccentric way) still require double-spacing, you may care to allows the figure to be moved into the margin. The fig- refer to question 67. If you want to write your own, a good ure or table will entered into the list of figures or tables place to start is the University of California style (available as if you use the \caption command. macros/latex/contrib/supported/ucthesis), but it’s The environments do not work within list environ- not worth going to a lot of trouble. (If officials won’t allow ments that end before the figure or table has finished, standard typographic conventions, you won’t be able to pro- but can be used in a parbox or minipage, and in two- duce an æsthetically pleasing document anyway!) column format.

–24– The New TEX FAQ: Your 126 Questions Answered

70 Alternative head- and footlines in LATEX One common use of line numbers is in critical editions of texts, and for this the edmac package (macros/plain/ The standard LAT X document classes define a small set of E contrib/edmac)offers comprehensive support. ‘page styles’ which (in effect) specify head- and footlines for your document. The set defined is very restricted, but LATEX is capable of much more; people occasionally set about em- 73 Generating an index in (LA)TEX ploying LATEX facilities to do the job, but that’s quite unne- Making an index is not trivial; what to index, and how to cessary — Piet van Oostrum has already done the work. index it, is difficult to decide, and uniform implementation The package is found in directory macros/latex/ is difficult to achieve. You will need to mark all items to be contrib/supported/fancyhdr and provides simple indexed in your text (typically with \index commands). mechanisms for defining pretty much every head- or foot- It is not practical to sort a large index within TEX, so a line variant you could want; the directory also contains some post-processing program is used to sort the output of one TEX (rather good) documentation and one or two smaller pack- run, to be included into the document at the next run. ages. Fancyhdr also deals with the tedious behaviour of the The following programs are available: standard styles with initial pages (see question 103), by en- abling you to define different page styles for initial and for makeindex for LATEX under Unix (but runs under other body pages. OSs without changes). Available in indexing/ makeindex; a version for the Macintosh is available 71 Including a file in verbatim in LATEX as systems/mac/macmakeindex.sit, and ones for MS-DOS are part of the emTEXandgTEX distribu- A good way is to use Rainer Schöpf ’s verbatim.sty,which tions (the emTEX version also runs under OS/2). provides a command \verbatiminput that takes a file name as argument. This package is available as part of macros/ The Makeindex documentation is a good source of in- latex/required/tools formation on how to create your own index. Makein- Another way is to use the alltt environment, which re- dex can be used with TEX macro packages other than LAT X, such as Eplain (see question 11), and T Xsis, quires alltt.sty (which is now part of LATEX). alltt in- E E nonfree/macros/texsis (whose macros, nonfree/ terprets its contents ‘mostly’ verbatim, but executes any TEX commands it finds: so one can say: macros/texsis/index/index.tex, can be used in- dependently with plain). \begin{alltt} \input{verb.txt} idxtex for LATEXunderVMS. Available (together with \end{alltt} a glossary-maker called glotex)inindexing/glo+ idxtex of course, this is little use for inputting (LA)TEX source code. . . The moreverb package (macros/latex/contrib/ texindex A witty little shell/sed-script-based utility for supported/moreverb) extends the facilities of verbatim LATEX under Unix. Available from support/ package), providing a listing environment and a texindex \listinginput command, which line-number the text of There are other programs called texindex, notably one the file. that comes with the Texinfo distribution (see ques- The fancyvrb package (macros/latex/contrib/ tion 13). supported/fancyvrb)offers configurable implementations of everything verbatim and moreverb have, and more be- xindy a recent development, designed for wide-ranging sides. It is nowadays the package of choice for the discerning flexibility (including support for multilingual indexes), typesetter of verbatim text, but its wealth of facilities makes it basedonCommonLisp.Thesystemisavailable a complex beast and study of the documentation is strongly on CTAN (support/xindy), but is more easily ac- advised. cessed from a web browser via http://www.iti. informatik.th-darmstadt.de/xindy/ since the 72 Including line numbers in typeset output distribution contains several different implementa- tions. For general numbering of lines, there are two packages for use with LATEX, macros/latex/contrib/supported/ lineno (which permits labels attached to individual lines of 74 Typesetting URLs typeset output) and macros/latex/contrib/supported/ URLs tend to be very long, and contain characters that would numline/numline.sty naturally prevent them being hyphenated even if they weren’t Both of these packages play fast and loose with the LATEX typically set in \ttfamily, verbatim. Therefore, without output routine, which can cause problems: the user should special treatment, they often produce wildly overfull \hboxes, beware... and their typeset representation is awful. If the requirement is for numbering verbatim text, There are two approaches to this problem: the macros/latex/contrib/supported/moreverb or macros/latex/contrib/supported/fancyvrb pack- • macros/latex/contrib/other/misc/path.sty, ages (see question 71) may be used. which defines a \path command. The command

–25– The New TEX FAQ: Your 126 Questions Answered

defines each potential break character as a \discre- 76 Using BIBTEXwithplain TEX tionary,andoffers the user the opportunity of spe- cifying a personal list of potential break characters. Its The file macros/eplain/btxmac.tex contains macros and documentation for using BT Xwithplain T X, either chief disadvantage is fragility in the LATEX context. E E • macros/latex/contrib/other/misc/url.sty directly or with Eplain (see question 11). See question 23 ,  which defines an \url command (among others, in- for more information about B TEXitself. cluding its own \path command). The command gives each potential break character a maths-mode 77 Typesetting music in TEX ‘personality’, and then sets the URL itself in the user’s choice of font, in maths mode. It can produce (LATEX- A powerful package which allows the typesetting of poly- style) ‘robust’ commands (see question 115) for use phonic and other multiple-stave music is MusicTEX, written within moving arguments. Note that, because the op- by Daniel Taupin ([email protected]). It is eration is conducted in maths mode, spaces within available in macros/musictex the URL argument are ignored unless special steps are In the recent past, Daniel (as well as with various other taken. people, notably Ross Mitchell and Andreas Egler) have been working on a development of MusicT X, known as Mu- The author of this answer prefers the (rather newer) url. E siXT X. MusiXT X is a three-pass system (with a processor sty; both packages work equally well with plain T X(though E E E program that computes values for the element spacing in the of course, the fancy LAT X facilities of url.sty don’t have E music), and achieves finer control than is possible in the un- much place there). modified TEX-based mechanism that MusicTEX uses. Daniel Taupin and Andreas Egler are pursuing distinct versions of 75 Citing URLswithBIBT X E MusiXTEX; they are available, respectively, from macros/ There is no citation type for URLs, per se,inthestand- /taupin and macros/musixtex/egler ff ard BTEX styles, though Oren Patashnik (the author of Digital music fans can typeset notation for their e orts BTEX) is considering developing one such for use with the by using midi2tex, which translates MIDI data files into Mu- long-awaited BTEX version 1.0. sicTEX source code. It is available from support/midi2tex The actual information that need be available in a citation A rather simpler notation than MusicTEX is supported by of an URL is discussed at some length in the publicly available abc2mtex; this is a package designed to notate tunes stored in on-line extracts of ISO 690–2, available via http://www. an ASCII format (abc notation). It was designed primarily for nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm;the folk and traditional tunes of Western European origin (such techniques below do not satisfy all the requirements of as Irish, English and Scottish) which can be written on one ISO 690–2, but they offer a solution that is at least available stave in standard classical notation. However, it should be to users of today’s tools. extensible to many other types of music. It is available from Until the new version arrives, the simplest technique is to support/abc2mtex use the howpublished field of the standard styles’ @misc There is a mailing list for discussion of typesetting music in function. Of course, the strictures about typesetting URLs TEX. To subscribe, send mail to mutex-request@stolaf. (see question 74) still apply, so the entry will look like: edu containing the word ‘subscribe’inthebody. @misc{..., ..., 78 Drawing Feynman diagrams in LATEX howpublished = "\url{http://...}" } Michael Levine’s macro package for drawing Feynman diagrams in LATEX is available in macros/latex209/ Another possibility is that some conventionally-published contrib/feynman paper, technical report (or even book) is also available on the Another possibility is Thorsten Ohl’s macros/latex/ Web. In such cases, a useful technique is something like:

contrib/supported/feynmf, that works in combination

AFÇÆÌ @techreport{..., with ÅEÌ (or MetaPost). The feynmf or feynmp pack-

..., age reads a description of the diagram written in TEX, and

AFÇÆÌ note = "Also available as \url{http://...}" writes out code. ÅEÌ (or MetaPost) can then produce } a font (or PostScript file) for use in a subsequent LATEXrun. There is good reason to use macros/latex/contrib/ For new users who have access to MetaPost, the PostScript other/misc/url.sty in this context, since (by default) it ig- version is probably the better route, for document portability and other reasons. nores spaces in its argument. BTEX has a habit of splitting lines it considers excessively long, and if there are no space  characters for it to use as ‘natural’ breakpoints, B TEXwill How do I do X in T XorLAT X? insert a comment (‘%’) character . . . which is an acceptable E E character in an URL,sothat\url will typeset it. The way 79 Proof environment around the problem is to insert odd spaces inside the URL itself in the .bib file, to enable BTEXtomakereasonable It is not possible to make a proof environment which auto- decisions about breaking the line. matically includes an ‘end-of-proof ’ symbol. Some proofs

–26– The New TEX FAQ: Your 126 Questions Answered end in displayed maths; others do not. If the input file con- This will not work if you are using NFSS (see question 120) tains ...\] \end{proof} then LATEXfinishesoff the dis- outside of LATEX2ε (see question 121), because the command played maths and gets ready for a new line before it reads \rm behaves differently there. any instructions connected with ending the proof. But tra- ditionally the end-of-proof sign goes in the display, not on a 82 Fancy enumeration lists new line. So you just have to put it in by hand in every proof. Suppose you want your top-level enumerates to be labelled ‘I/’,‘II/’,...,thengivethesecommands: 80 Symbols for the number sets \renewcommand{\theenumi}{\Roman{enumi}} It is a good idea to have commands such as \R for the real \renewcommand{\labelenumi}{\theenumi/} numbers and other standard number sets. Traditionally these were typeset in bold. Because mathematicians usually do not The possible styles of numbering are given in Section 6.3 have access to bold chalk, they invented the special symbols of Lamport’s book (see question 19). Both \theenumi and that are now often used for \R, \C, etc. These symbols are \labelenumi must be changed, since \theenumi is used in known as “blackboard bold”. Before insisting on using them, cross-references to the list. consider whether going back to the old system of ordinary For lower level enumerates, replace enumi by enumii, bold might not be acceptable (it is certainly simpler). enumiii or enumiv, according to the level. If your label is A set of blackboard bold capitals is available in the AMS much larger than the default, you should also change \left- fonts “msam” (e.g., “msam10” for 10pt) and “msbm”. The margini, \leftmarginii, etc. fonts have a large number of mathematical symbols to sup- If you’re running LATEX2ε, the package enumerate. plement the ones in the standard TEX distribution. The fonts sty (part of macros/latex/required/tools)offers sim- are available in fonts/ams/amsfonts/sources/symbols ilar facilities. With enumerate.sty, the example above Two files which load the fonts and define the symbols are would be achieved simply by starting the enumeration \be- provided, and both work with either TEXorLATEX. Ques- gin{enumerate}[I/]. tions or suggestions regarding these fonts should be directed to [email protected]. 83 Unnumbered sections in the Table of

Another complete set of blackboard bold fonts, the bbold Contents

AFÇÆÌ family, is available in ÅEÌ (in fonts/bbold). This set has the interesting property of offering blackboard bold The easiest way to get headings of funny ‘sections’ such forms of lower-case letters, something rather rarely seen on as prefaces in the table of contents is to use the counter A actual blackboards. secnumdepth described in Appendix C of the LTEX The “lazy person’s” blackboard bold macros: manual. For example: \setcounter{secnumdepth}{-1} \newcommand{\R}{{\sf R\hspace*{-0.9ex}% \chapter{Preface} \rule{0.15ex}{1.5ex}\hspace*{0.9ex}}} \newcommand{\N}{{\sf N\hspace*{-1.0ex}% Of course, you have to set secnumdepth back to its usual \rule{0.15ex}{1.3ex}\hspace*{1.0ex}}} value (which is 2 in the standard styles) before you do any \newcommand{\Q}{{\sf Q\hspace*{-1.1ex}% ‘section’ which you want to be numbered. \rule{0.15ex}{1.5ex}\hspace*{1.1ex}}} Similar settings are made automatically in the LATEX book \newcommand{\C}{{\sf C\hspace*{-0.9ex}% class by the \frontmatter and \backmatter commands. \rule{0.15ex}{1.3ex}\hspace*{0.9ex}}} This is why it works. \chapter without the star does work well at normal size if the surrounding text is cmr10. 1. put something in the .toc file; However, they are not part of a proper maths font, and so secnumdepth ≥ 0 do not work in sub- and superscripts. Moreover, the size and 2. if , increase the counter for the position of the is affected by the font of the sur- chapterandwriteitout. rounding text. 3.writethechaptertitle.

81 Roman theorems Other sectioning commands are similar, but with other values used in the test. If you want to take advantage of the powerful \newtheorem command without the constraint that the contents of the the- 84 Footnotes in tables orem is in a sloped font (for example, to use it to create re- marks, examples, proofs, ...) thenyoucanusethestylefile The standard LATEX \footnote command doesn’t work in theorem.sty (part of macros/latex/required/tools). tables; the table traps the footnotes and they can’t escape to Alternatively, the following creates an environment remark the bottom of the page. whose content is in roman. If your table is floating, your best bet is (unfortunately) to put the table in a minipage environment and to put \newtheorem{preremark}{Remark} the notes underneath the table, or to use Donald Ar- \newenvironment{remark}% seneau’s package macros/latex/contrib/other/misc/ {\begin{preremark}\rm}{\end{preremark}} threeparttable.sty

–27– The New TEX FAQ: Your 126 Questions Answered

Otherwise, if your table is not floating (it’s just a ‘tabular’ 86 Indent after section headings in the middle of some text), there are several things you can LAT X implements a style that doesn’t indent the first para- do to fix the problem. E graph after a section heading. There are coherent reasons for 1. Use \footnotemark to position the little marker ap- this, but not everyone likes it. The package indentfirst. propriately, and then put in \footnotetext com- sty (part of macros/latex/required/tools) suppresses mands to fill in the text once you’ve closed the tabular the mechanism, so that the first paragraph is indented. environment. This is described in Lamport’s book, but it gets messy if there’s more than one footnote. 87 Footnotes in LATEX section headings 2. Stick the table in a minipage anyway. This provides The \footnote command is fragile, so that simply placing all the ugliness of footnotes in a minipage with no extra the command in \section’s arguments isn’t satisfactory. Us- effort. ing \protect\footnote isn’t a good idea either: the argu- ments of a section command are used in the table of con- 3. Use macros/latex/contrib/other/misc/ tents and (more dangerously) potentially also in page head- threeparttable.sty anyway; the package is in- ings. Unfortunately, there’s no mechanism to suppress the tended for floating tables, and the result might look footnote in the heading while allowing it in the table of con- odd if the table is not floating, but it will be reasonable. tents, though having footnotes in the table of contents is prob- ably unsatisfactory anyway. 4. Use tabularx or longtable from the LAT X tools E To suppress the footnote in headings and table of contents: distribution (macros/latex/required/tools); ffi they’re noticeably less e cient than the standard • Take advantage of the fact that the mandatory ar- tabular environment, but they do allow footnotes. gument doesn’t ‘move’ if the optional argument is 5. Grab hold of footnote.sty from CTAN, lurking in present: \section[title]{title\footnote{title foot- macros/latex/contrib/supported/mdwtools note}} • Use the macros/latex/contrib/supported/ Then put your tabular environment inside a footmisc package, with package option stable — savenotes environment. Alternatively, say this modifies footnotes so that they softly and silently \makesavenoteenv{tabular} in the preamble of vanish away if used in a moving argument. your document, and tables will all handle footnotes correctly. 88 Changing the margins in LATEX 6. Use mdwtab.sty from the same directory (macros/ Don’t do it. Learn some LAT X, produce some documents, latex/contrib/supported/mdwtools). E and then ask again. This will handle footnotes properly, and has other fa- You can never change the margins of a document by soft- cilities to increase the beauty of your tables. It may ware, because they depend on the actual size of the paper. also cause other table-related packages (not the stand- What you can change are the distances from the apparent ard ‘tools’ ones, though) to become very unhappy and top and left edges of the paper, and the width and height of stop working. the text. Changing the last two requires more skill than you might expect. The height should bear a certain relationship 85 Style of section headings to \baselineskip. And the width should not be more than 75 characters. Lamport’s warning in his section on ‘Custom- Suppose that the editor of your favourite journal has specified izing the Style’ really must be taken seriously. One-inch mar- that section headings must be centred, in small capitals, and gins on A4 paper are fine for 10- or 12-pitch typewriters, but subsection headings ragged right in italic, but that you don’t not for 10pt type (or even 11pt or 12pt) because so many want to get involved in the sort of programming described characters per line will irritate the reader. However.. . in The LAT X Companion (see question 19; the programming E Perhaps the easiest way to get more out of a page in LAT X itself is discussed in question 109). The following hack will E is to get macros/latex209/contrib/misc/fullpage. probably satisfy your editor. Define yourself new commands sty, which sets the margins of the page identical to those of \newcommand{\ssection}[1]{% plain TEX, i.e., 1-inch margins at all four sides of the paper. \section[#1]{\centering\sc #1}} It also contains an adjustment for A4 paper. \newcommand{\ssubsection}[1]{% Somewhat more flexible is macros/latex/contrib/ \subsection[#1]{\raggedright\it #1}} other/misc/vmargin.sty, which has a canned set of pa- per sizes (a superset of that provided in LATEX2ε), provision and then use \ssection and \ssubsection in place of for custom paper, margin adjustments and provision for two- \section and \subsection. This isn’t perfect: section sided printing. numbers remain in bold, and starred forms need a separate For details of LATEX’s page parameters, see section C.5.3 redefinition. Also, this will not work if you are using NFSS (see of the LATEX manual (pp. 181–182). The origin in DVI co- question 120) outside of LATEX2ε (see question 121), because ordinates is one inch from the top of the paper and one inch the font-changing commands behave differently there. from the left side; positive horizontal measurements extend

–28– The New TEX FAQ: Your 126 Questions Answered right across the page, and positive vertical measurements ex- lower-case text, would steal sheep” (stealing sheep was, be- tend down the page. Thus, for margins closer to the left and fore Gill’s time, a capital offence in Britain). As the remark top edges of the page than 1 inch, the corresponding para- suggests, though, letterspacing of upper-case text is less awful meters, i.e., \evensidemargin, \oddsidemargin, \top- a crime; the technique used also to be used for emphasis of margin, can be set to negative values. text set in gothic (or similar) fonts and is still used in German You cannot simply change the margins of part of a doc- where it is referred to as sperrsatz. ument within the document by modifying the parameters Straightforward macros (usable, in principle, with any shown in Lamport’s figure C.3. They should be changed TEX macro package) may be found in macros/generic/ only in the preamble of the document, i.e., before the \be- letterspacing.tex gin{document} statement. To adjust the margins within a A more comprehensive package is macros/latex/ document we define an environment: contrib/supported/soul (which is optimised for use with LATEX, but also works with Plain TEX. Soul also permits hy- \newenvironment{changemargin}[2]{% phenation of letterspaced text; Gill’s view of such an activity \begin{list}{}{% is not (even apocryphally) recorded. \setlength{\topsep}{0pt}% \setlength{\leftmargin}{#1}% 91 Excluding blocks of text from the DVI file \setlength{\rightmargin}{#2}% \setlength{\listparindent}{\parindent}% Rainer Schöpf ’s verbatim.sty provides a com- \setlength{\itemindent}{\parindent}% ment environment which excludes everything between \setlength{\parsep}{\parskip}% \begin{comment} and \end{comment}. This package }% is available as part of macros/latex/required/tools \item[]}{\end{list}} A more general environment for doing the job is Vic- tor Eijkhout’s comment.sty, which lets you define envir- This environment takes two arguments, and will indent the onments for inclusion or exclusion in a document, thus left and right margins by their values, respectively. Neg- offering a primitive configuration structure. It is avail- ative values will cause the margins to be narrowed, so able from the CTAN sites in macros/latex209/contrib/ \begin{changemargin}{-1cm}{-1cm} narrows the left misc/comment.sty and right margins by 1cm. 92 Setting bold Greek letters in LATEX 89 Finding the width of a letter, word, or phrase The simple solution (\mathbf) doesn’t always work, because lower-case Greek letters behave differently from upper-case Put the word in a box, and measure the width of the box. For Greek letters (due to Knuth’s esoteric font encoding de- example, cisions). However, \mathbf can be used for upper-case Greek letters in ordinary circumstances, but the AMS-LAT X pack- \newdimen\stringwidth E age amsmath.sty disables this font-switching and you must \setbox0=\hbox{hi} use one of the techniques outlined below. \stringwidth=\wd0 The plain TEX solution does work, in a limited way: Note that if the quantity in the \hbox is a phrase, the actual {\boldmath$\theta$} measurement only approximates the width that the phrase will occupy in running text, since the inter-word glue can be but \boldmath may not be used in maths mode, so this ‘solu- adjusted in paragraph mode. tion’ requires arcana such as: The same sort of thing is expressed in LATEXby: $... \mbox{\boldmath$\theta$} ...$ \newlength{\gnat} \settowidth{\gnat}{\textbf{small}} which then causes problems in superscripts, etc. These problems may be addressed by using a bold math- This sets the value of the length command \gnat to the ematics package. width of “small” in bold-face text. • The package bm.sty, which is part of the LATEX tools 90 Changing the space between letters distribution (macros/latex/required/tools), defines a command \bm which may be used anywhere A common technique in advertising copy (and other text in maths mode. whose actual content need not actually be read) is to alter • The package amsbsy.sty, which is part of the space between the letters (otherwise known as the track- AMS-LATEX(macros/latex/required/amslatex) ing). As a general rule, this is a Very Bad Idea: it detracts defines a command \boldsymbol, which (though from legibility, which is contrary to the principles of typeset- slightly less comprehensive than \bm) covers almost ting (any respectable font you might be using should already all common cases. have optimum tracking built into it). The great type designer, Eric Gill, is (possibly apo- All these solutions cover all mathematical symbols, not cryphally) credited with saying “he who would letterspace merely Greek letters.

–29– The New TEX FAQ: Your 126 Questions Answered

93 Defining a new log-like function in LATEX Nevertheless, there are considerable numbers of mac- ros of one sort or another available on CTAN; searching Use the \mathop command, as in: for your journal name in the CTAN catalogue (http: \newcommand{\diag}{\mathop{\rm diag}} //www.tex.ac.uk/tex-archive/help/Catalogue/ catalogue.html) may well turn up what you’re seeking. Subscripts and superscripts on \diag will be placed ex- Failing that, you may be well advised to contact the pro- actly as they are on \lim. If you want your subscripts and spective publisher of your paper; many publishers have mac- superscripts always placed to the right, do: ros on their own web sites, or otherwise available only upon application. \newcommand{\diag}{\mathop{\rm diag}\nolimits} Check that the publisher is offering you macros suitable for an environment you can use: a few still have no macros ThisworksinLAT X 2.09 and in LAT X2ε, but not un- E E for current LATEX, for example, claiming that LATEX2.09is der NFSS alone (see question 105). However, the ca- good enough. . . nonical method for doing this in LAT X2ε is to use the E Some publishers re-key anything sent to them anyway, so the \DeclareMathOperator command of amsopn.sty that it doesn’t really matter which macros you use. Others (which is part of the AMS-LAT X package: macros/latex/ E merely encourage you to use as few extensions of a standard required/amslatex). package as possible, so that they will find it easy to transform (It should be noted that “log-like” was reportedly a joke on your paper to their own internal form. Lamport’s part; it is of course clear what was meant.) 96 A ‘report’ from lots of ‘article’s 94 Typesetting all those TEX-related logos This is a requirement, for example, if one is preparing the Knuth was making a particular point about the capabilities proceedings of a conference whose papers were submitted in of T X when he defined the logo. Unfortunately, many be- E LATEX. lieve, he thereby opened floodgates to give the world a whole There’s no canned solution, but Matt Swift’s includex range of rather silly ‘bumpy road’ logos such as AMS-TEX,  ff and moredefs packages (both part of the macros/latex/ PICTEX, B TEX, and so on, produced in a flurry of di erent contrib/supported/frankenstein bundle) offer a pos- fonts, sizes, and baselines — indeed, everything one might sible way forward. believe would cause them to obstruct the reading process. includex enables you to ‘\includedoc’ complete articles A In particular, Lamport invented LTEX (silly enough in itself) (in the way that you ‘\include’ chapter files in an ordinary and marketing input from Addison-Wesley led to the even report). It doesn’t do the whole job for you, though. You stranger current logo LATEX2ε. ff need to analyse the package use of the individual papers, and Sensible users don’t have to follow this stu wherever ensure that a consistent set is loaded in the preamble of the it goes, but, for those who insist, a large collection of lo- main report. gos is defined in macros/eplain/texnames.sty (but note Another tedious problem to address is that LAT X sup- A ε E

that this set of macros isn’t entirely reliable in LTEX2 ). presses all title-related commands after \maketitle has

AFÇÆÌ The ÅEÌ and MetaPost logos can be set in fonts been used once in a document: thus you need to define re- A ε that LTEX2 knows about (so that they scale with the sur- placements for all of them, for use in the papers. macros/latex/contrib/ rounding text) using the package More work is plainly needed in this area, but at least a supported/mflogo ; but be aware that booby-traps sur- start has been made.

round the use of the Knuthian font for MetaPost (you might

A Ç Ì get ÅEÌ ). You needn’t despair, however — the au- Curriculum Vitae thor himself uses just ‘MetaPost’. 97 (Resumé) For those who don’t wish to acquire the ‘proper’ logos, the A framework class for Curricula Vitae, provided by An- canonical thing to do is to say AMS-\TeX{} (AMS-TEX) for drej Brodnik, is available from macros/latex/contrib/ AMS-TEX, Pic\TeX{} (PicTEX) for PICTEX, Bib\TeX{} other/vita (BibTEX) for BTEX, and so on. The class can be customised both for subject (example While the author of this FAQ list can’t quite bring himself class option files are offered for both computer scientists and to do away with the bumpy-road logos herein, he regularly singers), and for language (both options provided are avail- advises everyone else to. . . able for both English and Slovene). Extensions may be writ- ten by creating new class option files, or by using macros O Macros for particular types of docu- defined in the class to define new entry types, etc. ments P Things are going wrong. . . 95 Setting papers for journals 98 Weird hyphenation of words Publishers of journals have a wide range of requirements for the presentation of papers, and while many publishers do ac- You may have a version mismatch problem. TEX’s hyphen- cept electronic submissions in (LA)TEX, they often don’t sub- ation system changed between version 2.9 and 3.0. If you mit their recommended macros to public archives. are using (plain)TEX version 3.0 or later (you should be us-

–30– The New TEX FAQ: Your 126 Questions Answered ing V3.14159!), make sure your plain.tex file has a version correctly between operating systems, and line-endings are not numberwhichisatleast3.0(itshould be V3.1415926!). If preserved properly (the tell-tale sign of an extra-long line er- you are using LATEX 2.09 you should upgrade to LATEX2ε; ror is the complaint that the ‘buf_size’ has overflowed). if for some reason you can’t, the last version of LATEX 2.09, If you really need to extend your TEX’s capacity, the released on 25 March 1992, is available (for the time being proper method depends on your installation. In the purest at least) from obsolete/macros/latex209/distribs/ form, you change the parameters in module 11 of the WEB latex209.tar and ought to solve this problem. source. In less pure forms, you might need to modify a If you’re using LATEX2ε, the problem probably arises from change file, or perhaps change some environment variables; your hyphen.cfg file, which has to be created if you’re using emTEX allows you to adjust the memory allocation criteria a multi-lingual version. on the command line. Consult the documentation that came For the curious, here’s what happened: before TEX3.0, with your implementation. the hyphenation algorithm would not break a word if the part before the break was not at least two characters long, and 102 Moving tables and figures in LATEX the part after the break at least three characters long. Start- ing with version 3.0, the parameters \lefthyphenmin and Tables and figures have a tendency to surprise, by floating \righthyphenmin control the length of these fragments. away from where they were specified to appear. This is in fact These are set to 2 and 3, respectively, in the new plain and perfectly ordinary document design; any professional type- lplain formats. They can be set to any value, of course, but setting package will float figures and tables to where they’ll if \lefthyphenmin+\righthyphenmin is greater than 62, fit without violating the designer’s typographic rules. Even all hyphenation is suppressed. if you use the placement specifier h for ‘here’, the figure or A further source of oddity can derive from the 1995 re- table will not be printed ‘here’ if so doing would break the lease of Cork-encoded fonts (see question 34), which intro- rules; the rules themselves are pretty simple, and are given on page 198, section C.9 of the LAT X manual. In the worst duced an alternative hyphen character. The LATEX2ε config- E uration files in the font release specified use of the alternative case, LATEX’s rules can cause the floating items to pile up to hyphen, and this could produce odd effects with words con- the extent that you get an error message saying “Too many taining an explicit hyphen. The font configuration files in the unprocessed floats”; this means that the limited set of registers in which LAT X stores floating items is full. What follows is December 1995 release of LATEX2ε do not use the alternative E hyphen character, thus removing this source of problems. a simple checklist of things to do to solve these problems (the checklist talks throughout about figures, but applies equally well to tables). 99 (Merely) peculiar hyphenation • Are the placement parameters on your figures right? YoumayhavefoundthatTEX’s famed automatic word- division does not produce the break-points recommended by The default (tbp) is reasonable; you should never simply say ‘h’, for example, since that says “if it can’t your dictionary. This may be because TEXissetupforAmer- ican English, whose rules for word division (as specified, for go here, it can’t go anywhere”, and as a result all sub- example, in Webster’s Dictionary) are completely different sequent floats pile up behind it. • from the British ones (as specified, for example, in the Oxford Can you perhaps prevent your figures from floating A Dictionaries). This problem is being addressed by the UK by adjusting LTEX’s placement parameters? Again, the defaults are reasonable, but can be overridden in TEXUsercommunity(seeBaskerville,issue4.4)butanentirely satisfactory solution will take time. An interim hyphenation case of problems. The parameters are described on A file is available in language/hyphenation/ukhyphen.tex pages 199–200, section C.9 of the LTEX manual. • Are there places in your document where you could ‘naturally’ put a \clearpage command? If so, do: 100 Accented words aren’t hyphenated the backlog of floats is cleared after a \clearpage. TEX’s algorithm for hyphenation gives up when it encounters (Note that the \chapter command implicitly executes an \accent command; there are good reasons for this, but it \clearpage, so you can’t float past the end of a means that quality typesetting in non-English languages can chapter.) be difficult. • Have a look at the LATEX2ε afterpage package For TEX itself, avoiding this effect means using Cork- (part of macros/latex/required/tools). Its doc- encoded fonts (see question 34) which contain accented let- umentation gives as an example the idea of putting ters as single glyphs. In the future, perhaps, Omega (see ques- \clearpage after the current page (where it will clear tion 123) will provide a rather different solution. the backlog, but not cause an ugly gap in your text), but also admits that the package is somewhat fragile 101 Enlarging T X (though it’s improving). E • As a last resort, try the package macros/latex209/ People sometimes get messages saying ‘memory capacity ex- contrib/misc/morefloats.sty; this ‘simply’ in- ceeded’. Most of the time this error can be fixed without creases the number of floating inserts that LATEX can enlarging TEX. The most common causes are unmatched handle at one time (from 18 to 36), but that may suit braces, extra-long lines, and poorly-written macros. Extra- your needs. long lines are often introduced when files are transferred in- • If you actually wanted all your figures to float to the

–31– The New TEX FAQ: Your 126 Questions Answered

end (e.g., for submitting a draft copy of a paper), ask your system administrator to replace this version with don’t rely on LATEX’s mechanism: get the package LATEX2ε (see question 121), in which commands such as \rm macros/latex/contrib/supported/endfloat to and \bf work just as before if you are using one of the stand- do the job for you. ard classes —article, report and book (among others). In the meantime, use the option oldlfont.sty,whichshould 103 \pagestyle{empty} on first page in LATEX have been installed at the same time as NFSS. If you use \pagestyle{empty}, but the first page is 106 Old LAT X font references such as \tenrm numbered anyway, you are probably using the \maketitle E command too. This is not a bug but a feature! The stand- LATEX 2.09 defined a large set of commands for access to the ard LATEX styles are written so that initial pages (pages con- fonts that it had built in to itself. For example, various flavours taining a \maketitle, \part,or\chapter)haveadiffer- of cmr could be found as \fivrm, \sixrm, \sevrm, \egtrm, ent page style from the rest of the document; Hence, the \ninrm, \tenrm, \elvrm, \twlrm, \frtnrm, \svtnrm, commands internally issue \thispagestyle{plain}.This \twtyrm and \twfvrm. These commands were never doc- is usually not acceptable behaviour if the surrounding page umented, but certain packages nevertheless used them to style is ‘empty’. achieve effects they needed. Possible workarounds include: Since the commands weren’t public, they weren’t in- cluded in LATEX2ε; to use the unconverted LATEX 2.09 pack- • Put \thispagestyle{empty} immediately after the ages under LATEX2ε, you need also to include the package \maketitle command, with no blank line between rawfonts.sty (which is part of the LATEX2ε distribution). them. • Use fancyhdr.sty, which allows you to customise the 107 Missing symbols style for initial pages independently of that for body pages. It is available in macros/latex/contrib/ If some symbols, such as \Box and \lhd,nolongerap- supported/fancyhdr pear to exist, then your system administrator has probably • Use nopageno.sty, which suppresses this beha- upgraded your version of LATEXtoeitherNFSS (see ques- viour. It is available in macros/latex/contrib/ tion 120) or LATEX2ε (see question 121). In the former case, supported/carlisle/nopageno.sty use oldlfont.sty, as in the question 105. In the latter, use the package latexsym, which is part of the LATEX2ε distri- 104 Underlined text won’t break bution, or the package amsfonts, if it is available. Knuth made no provision for underlining text: he took the 108 LAT X gets cross-references wrong view that underlining is not a typesetting operation, but E rather one that provides emphasis on typewriters, which typ- Sometimes, however many times you run LATEX, the cross- ically offer but one typeface. The corresponding technique references are just wrong. Remember that the \label com- in typeset text is to switch from upright to italic text (or vice- mand must come after the \caption command, or be part of versa): the LATEX command \emph does just that to its argu- it. For example, ment. \begin{figure} \begin{figure} Nevertheless, typographically illiterate people (such as \caption{A Figure} or \caption{A Figure% those that specify double-spaced thesis styles — see ques- \label{fig} \label{fig}} tion 67) or those those that choose to deliberately flout conven- \end{figure} \end{figure} tion (after very careful consideration, one hopes) continue to require underlining of us, so LATEX as distributed defines an 109 \@ and @ in macro names \underline command that applies the mathematical ‘un- A derbar’ operation to text. This technique is not entirely sat- A common source of problems in a L TEXdocumentisthe \@ isfactory, however: the text gets stuck into a box, and won’t diagnostic about the appearance of the command ,or @ break at line end. about other commands containing the character . The most \spacefactor The solution is the package macros/latex/contrib/ common complaint is “You can’t use ‘ ’inver- other/misc/ulem.sty, which redefines the \emph com- tical mode”, but others occur. A ε mand to underline its argument; the underlined text thus pro- Such problems are usually caused by including a LTEX2 A duced behaves as ordinary emphasised text, and will break class or package file into a LTEXdocumentbysomemeans \documentclass \usepackage A over the end of a line. (The package is capable of other pe- other than or .LTEX culiar effects, too: read its documentation, contained within defines internal commands whose names contain the char- @ the file itself.) acter ; this enables it to avoid clashes between its internal names and names that we would normally use in our docu- ments. In order that these commands may work at all, \doc- 105 Odd behaviour of \rm, \bf, etc. umentclass and \usepackage play around with the mean- If commands such as \rm and \bf have suddenly stopped ing of @. Solve this problem by using the correct command working in LATEX in the way that you expect, it is likely to include the file. that your system administrator has installed a version of But, you will say, “The LATEX Companion tells me to use com- LATEX 2.09 with NFSS (see question 120). Complain loudly; mands containing @!”

–32– The New TEX FAQ: Your 126 Questions Answered

Indeed; for example, there’s a lengthy section about from a very large abstract or annotation included in the data- \@startsection and how to use it to control the appear- base. The diagnostic usually arises because of an infelicity in ance of section titles. Page 15 of The Companion explains this; the coding of abstract.bst, or styles derived from it. (One and suggests that you make such changes in the document doesn’t ordinarily output annotations in other styles.) preamble, between \makeatletter and \makeatother. The solution is to make a copy of the style file (or get So the definition of \subsection on page 26 could be: a clean copy from CTAN — biblio/bibtex/contrib/ abstract.bst), and rename it (e.g., on a long file-name sys- \makeatletter tem to abstract-long.bst). Now edit it: find function \renewcommand{\subsection}{\@startsection output.nonnull and {subsection}% % name ... • change its first line (line 60 in the version on CTAN) {\normalfont\normalsize\itshape}}% style from "{ ’s :=" to "{ swap$",and \makeatother • delete its last line, which just says "s" (line 84 in the version on CTAN). 110 Where are the msx and msy fonts? Finally, change your \bibliographystyle command to The msx and msy fonts were designed by the American refer to the name of the new file. Mathematical Society in the very early days of TEX, for use This technique applies equally to any bibliography

in typesetting papers for mathematical journals. They were style: the same change can be made to any similar

AFÇÆÌ designed using the ‘old’ ÅEÌ , which wasn’t portable output.nonnull function. and which is no longer available; for a long time they were If you’re reluctant to make this sort of change, the only available only in 300dpi versions which imperfectly matched way forward is to take the entry out of the database, so that

many modern printers. The AMS has now redesigned the you don’t encounter BTEX’s limit, but you may need to re-

AFÇÆÌ fonts, using the current version of ÅEÌ ,andthenew tain the entry because it will be included in the typeset docu- versions are called the msa and msb families; they are avail- ment. In such cases, put the body of the entry in a separate able from fonts/ams/amsfonts/sources/symbols file: Nevertheless, msx and msy continue to turn up to plague us. There are, of course, still sites that haven’t got around to @article{long.boring, upgrading; but, even if everyone upgraded, there would still author = "Fred Verbose", be the problem of old documents that specify them. ... If you have a .tex source that requests msx and msy,the abstract = "{\input{abstracts/long.tex}}" best technique is to edit it so that it requests msa and msb (you } need only change the single letter in the font names). In this way, you arrange that all BT X has to deal with is If you have a DVI file that requests the fonts, there is a E the file name, though it will tell T X (when appropriate) to package of virtual fonts (see question 31) to map the old to E include all the long text. the new series; it’s available in fonts/vf-files/msx2msa

111 Where are the am fonts? Q Why does it do that? One still occasionally comes across a request for the am series 113 What’s going on in my \include of fonts. The initials stood for ‘Almost [Computer] Modern’, commands? and they were the predecessors of the Computer Modern A fonts that we all know and love (or hate)8. There’s not a lot TheoriginalLTEX provided the \include command to ad- one can do with these fonts; they are (as their name implies) dress the problem of long documents: with the relatively slow almost (but not quite) the same as the cm series; if you’re faced computers of the time, the companion \includeonly facil- with a document that requests them, all you can reasonably ity was a boon. With the vast increase in computer speed, \includeonly is less valuable (though it still has its place do is to edit the document. The appearance of DVI files that request them is sufficiently rare that no-one has undertaken in some very large projects). Nevertheless, the facility is re- A the mammoth task of creating a translation of them by means tained in current LTEX, and causes some confusion to those of virtual fonts; however, most drivers let you have a config- who misunderstand it. uration file in which you can specify font substitutions. If you In order for \includeonly to work, \include makes a specify that every am font should be replaced by its corres- separate .aux file for each included file, and makes a ‘check- ponding cm font, the output should be almost correct. point’ of important parameters (such as page, figure, table and footnote numbers); as a direct result, it must clear the current page both before and after the \include command. 112 ‘String too long’ in BIBT X E What’s more, this mechanism doesn’t work if a \include The BTEX diagnostic “Warning–you’ve exceeded 1000, command appears in a file that was \included itself: LATEX the global-string-size, for entry foo” usually arises diagnoses this as an error.

8

AFÇÆÌ The fonts acquired their label ‘Almost’ following the realisation that their first implementation in ÅEÌ 79 still wasn’t quite right; Knuth’s original intention had been that they were the final answer

–33– The New TEX FAQ: Your 126 Questions Answered

So, we can now answer the two commonest questions Other issues, too, can come into play here (TEX resets about \include: many of its paragraphing parameters at end-of-paragraph), but LAT X does its best to defend the naïve user against such • Why does LAT X throw a page before and after \in- E E problems; for real T X users, however, the only defense is clude commands? E theusualone:readtheTXbook, over and over and over Answer: because it has to. If you don’t like it, replace E again. . . the \include command with \input — you won’t be able to use \includeonly any more, but you probably don’t need it anyway, so don’t worry. 115 What’s the reason for ‘protection’? • Why can’t I nest \included files? — I always used to Sometimes LATEX saves data it will re-read later. These data be able to under LATEX 2.09. are often the argument of some command; they are the so- Answer: in fact, you couldn’t, even under LATEX 2.09, called moving arguments. (‘Moving’ because data are moved but the failure wasn’t diagnosed. However, since you around.) Places to look for are all arguments that may go were happy with the behaviour under LATEX 2.09, re- into the table of contents, list of figures, etc.; namely, data place the \include commands with \input com- that are written to an auxiliary file and read in later. Other mands (with \clearpage as appropriate). places are those data that might appear in head- or footlines. Section headers and figure captions are the most prominent 114 Why does it ignore paragraph examples; there’s a complete list in Lamport’s book (see ques- parameters? tion 19). What’s going on really, behind the scenes? The com- When TEX is laying out text, it doesn’t work from word to word, or from line to line; the smallest complete unit it mands in the moving arguments are already expanded to formats is the paragraph. The paragraph is laid down in their internal structure during the process of saving. Some- abuffer, as it appears, and isn’t touched further until the times this expansion results in invalid TEX code when pro- end-paragraph marker is processed. It’s at this point that the cessed again. “\protect\cmd” tells LATEXtosave\cmd as paragraph parameters have effect; and it’s because of this se- \cmd, without expansion. quence that one often makes mistakes that lead to the para- What is a ‘fragile command’? It’s a command that ex- graph parameters not doing what one would have hoped (or pands into illegal TEX code during the save process. expected). What is a ‘robust command’? It’s a command that ex- pands into legal T X code during the save process. Consider the following sequence of LATEX: E No-one (of course) likes this situation; the LATEX3 team {\raggedright % declaration for ragged text have removed the need for protection of some things in the Here’s text to be ranged left in our output, production of LATEX2ε, but the techniques available to them but it’s the only such paragraph, so we now within current LATEX mean that this is an expensive exercise. end the group.} It remains a long-term aim of the team to remove all need for these things. Here’s more that needn’t be ragged... TEX will open a group, and set the ragged-setting paramet- 116 Why doesn’t \verb workwithin...? ers within that group; it will then save a couple of sentences of The LAT X verbatim commands work by changing category text and close the group (thus restoring the previous value of E codes. Knuth says of this sort of thing “Some care is needed the ragged-setting parameters). Then it encounters a blank togetthetimingright...”,sinceoncethecategorycodehas line, which it knows to treat as a \par token, so it typesets been assigned to a character, it doesn’t change. So \verb has the two sentences; but because the enclosing group has now to assume that it is getting the first look at its parameter text; been closed, the parameter settings have been lost, and the if it isn’t, T X has already assigned category codes so that paragraph will be typeset normally. E \verb doesn’t have a chance. For example: The solution is simple: close the paragraph inside the group, so that the setting parameters remain in place. An \verb+\error+ appropriate way of doing that is to replace the last three lines above with: will work (typesetting ‘\error’), but

end the group.\par} \newcommand{\unbrace}[1]{#1} Here’s more that needn’t be ragged... \unbrace{\verb+\error+} In this way, the paragraph is completed while the setting will not (it will attempt to execute \error). Other errors one parameters are still in force within the enclosing group. may encounter are ‘\verb ended by end of line’, or even Another alternative is to define an environment that does ‘\verb illegal in command argument’. the appropriate job for you. For the above example, LAT X E This is why the LAT X book insists that verbatim com- already defines an appropriate one: E mands must not appear in the argument of any other com- \begin{flushleft} mand; they aren’t just fragile, they’re quite unusable in any Here’s text to be ranged left... command parameter, regardless of \protection (see ques- \end{flushleft} tion 115).

–34– The New TEX FAQ: Your 126 Questions Answered

117 Case-changing oddities and \a{b} will expand to ‘+++b+++\def\x #1{xxx#1}’, because #1 gets replaced by ‘b’ and ## gets replaced by #. T X provides two primitive commands \uppercase and E To nest a definition inside a definition inside a definition \lowercase to change the case of text; they’re not much then you need ####1, as at each stage ## is replaced by #.At used for this purpose (although they are used for an incred- the next level you need 8 #s each time, and so on. ible variety of apparently unrelated tasks!), but are capable of creating considerable confusion. The two commands do not expand the text that is their 119 Why does LATEX split footnotes across parameter — the result of \uppercase{abc} is ‘ABC’, but pages? \uppercase{\abc} is always ‘\abc’, whatever the meaning LATEX splits footnotes when it can think of nothing better to of \abc. The commands are simply interpreting a table of do. Typically, when this happens, the footnote mark is at the equivalences between upper- and lowercase characters. They bottom of the page, and the complete footnote would overfill have (for example) no mathematical sense, and the page. LATEX could try to salvage this problem by making \uppercase{About $y=f(x)$} the page short of both the footnote and the line with the foot- note mark, but its priorities told it that splitting the footnote will produce would be preferable. ABOUT $Y=F(X)$ As always, the best solution is to change your text so that the problem doesn’t occur in the first place. Consider which is probably not what is wanted. whether the text that bears the footnote could move earlier in In addition, \uppercase and \lowercase do not the current page, or on to the next page. deal very well with non-American characters, for example If this isn’t possible, you might want to change LATEX’s \uppercase{\ae} is the same as \ae. perception of its priorities: they’re controlled by \inter- LATEX provides commands \MakeUppercase and footnotelinepenalty — the larger it is, the less willing \MakeLowercase which fixes the latter problem. These LATEXistosplitfootnotes. commands are used in the standard classes to produce upper Setting case running heads for chapters and sections. Unfortunately \MakeUppercase and \MakeLowercase \interfootnotelinepenalty=10000 do not solve the other problems with \uppercase,so— for example — a section title containing \begin{tabular} inhibits split footnotes altogether, which will cause ... \end{tabular} will produce a running head containing ‘Underfull \vbox’ messages unless you also specify \begin{TABULAR}. The simplest solution to this problem to \raggedbottom. The default value of the penalty is 100, use a user-defined command, for example: which is rather mild. An alternative technique is to juggle with the actual size \newcommand{\mytable}{\begin{tabular}... of the pages. \enlargethispage changes the size of the \end{tabular}} current page by its argument (for example, you might say \section{A section title \protect\mytable{} \enlargethispage{\baselineskip} to add a single line with a table} to the page, but you can use any ordinary TEXlengthsuch as 15mm or -20pt as argument). Reducing the size of the Note that \mytable has to be protected, otherwise it will be current page could force the offending text to the next page; expanded and made upper case. increasing the size of the page may allow the footnote to be included in its entirety. It may be necessary to change the size 118 Why are # signs doubled in macros? of more than one page. The way to think of this is that ## gets replaced by # in just the same way that #1 gets replaced by ‘whatever is the first R “Recent” developments argument’. So if you define a macro and use it as: 120 The New Font Selection Scheme (NFSS) \def\a#1{+++#1+++#1+++#1+++} \a{b} NFSS was an extension to LATEX written by Frank Mittelbach the macro expansion produces ‘+++b+++b+++b+++’, and Rainer Schöpf. It is described in TUGboat 10(2). In tra- which people find normal. However, if we now replace part ditional typesetting, fonts are described by four parameters: of the macro: the family (e.g., computer modern), the series (i.e., the weight and width of the font, such as light or bold), the shape (e.g., \def\a#1{+++#1+++\def\x #1{xxx#1}} italic), and the size. NFSS is a mechanism allowing the user to change any of these independently. NFSS makes it rel- \a{b} will expand to ‘+++b+++\def\x b{xxxb}’. This atively easy to use nonstandard fonts such as the PostScript defines \x to be a macro delimited by b, and taking no argu- ones with LAT X, and makes it easy to change maths fonts as ments, which people may find strange, even though it is just a E well. It also allows dynamic loading of fonts at runtime (i.e., specialisation of the example above. If you want \a to define not when the format file is created). \x to be a macro with one argument, you need to write: With the demise of LATEX 2.09 as supported software, the \def\a#1{+++#1+++\def\x ##1{xxx##1}} label ‘NFSS’ has become somewhat misleading, as there’s no

–35– The New TEX FAQ: Your 126 Questions Answered

‘old’ scheme with which to contrast it — LATEX has incorpor- The base distribution of Ω was released in November ated the NFSS. 1996; it is available via systems/ Implementations of Omega are available as part of the teT X, mikT X, fpT XandCMacT X distributions 121 LAT X2ε (the ‘new’ standard LAT X) E E E E E E (QrefTeX-systems). LATEX2ε is the version of LATEX prepared and suppor- ted by the LAT X3 project team (see question 122). With the E 124 The NT S project advent of LATEX2ε, users gained a formal support structure, and the knowledge that bug fixes would be incorporated into The NT S project first saw the light of day at the Hamburg the distribution on a fairly regular basis (new releases appear meeting of DANTE during 1992, as a response to an aspira- at approximately 6-month intervals). tion to produce something even better than TEX. The project LATEX2ε is so structured that significant enhancements is not simply enhancing T X, for two reasons: first, that T X ff E E may be added using macro add-ons, rather than by the di er- itself has been frozen by Knuth (see question 15), and second, ent TEX formats that were the bane of the LATEX 2.09 world. even if they were allowed to develop the program, some mem- A ε A LTEX2 is upwardly compatible with LTEX 2.09, but has bers of the NT S team feel that TEX in its present form is new features. In the December 1998 release, these include: simply unsuitable for significant further development. While • NFSS (see question 120) is part of the distribution. all those involved in the project are involved with, and com- • i ff SLTEXisnowmerelyadi erent document class, so mitted to, TEX, they recognise that the end product may very that there is no longer a need for a separate format. well have little in common with T X other than its philo- • E Better control of floating environments, such as figures. sophy, although it is a major design goal that NT S will for at • There is a documented interface for package and class least the first five years of its life be able to process all extant writers (though not yet for designers). T X documents to produce typographically identical output. • E The box commands have been enhanced, with e.g.,op- Initially, and despite the reservations expressed at the in- tions to specify the height of a minipage. augural meeting, the group concentrated on extending T X • E Several standard commands are no longer fragile (see per se: members implemented extensions and enhancements question 115); they can therefore be included in the ar- to TEX through the standard medium of a change-file. These gument of commands such as \caption without being extensions and enhancements, together with TEXproper, protected. form a system called ε-T X, which is 100% compatible with • E \newcommand can define commands with one optional TEX; furthermore, it is possible during format creation to argument; such commands are automatically robust. construct a format that is T X: no extensions or enhance- • E There is now a standard package for colour and graph- ments are present. ics inclusion. The final aim of the project will be to produce an entirely • There is standard support for typesetting in cyrillic. new typesetting system, building on the experience gained in the earlier phases. This system is intended to provide a stable 122 The LATEX3 project basis for typesetting in the future, in the way that TEXhas since it was first offered to the world. The LATEX3 project team (see http://www. A distribution of ε-TEX was made available in November latex-project.org/latex3.html) is a small group of 1996. It is available via systems/e-tex; ε-TEX is also dis- volunteers whose aim is to produce a major new document tributed on the TEXLiveCD-ROM (see question 38). processing system based on the principles pioneered by Leslie In terms of NT S proper, work started in Q1 1998 by Lamport in the current LATEX. It will remain freely available Karel Skoupý, a gifted Czech programmer working un- and it will be fully documented at all levels. der the direct supervision of Prof. Jiríˇ Zlatuška (currently The LATEX3 team’s first product, LATEX2ε (see ques- Rector of Masaryk University, Brno, CZ). During mid-1999 tion 121), was delivered in 1994, and the team undertakes Prof. Zlatuska stood down as project leader and the group its maintenance. elected Hans Hagen of Pragma (NL) to replace him; Jiríˇ con- tinues as a member of the team and is now Managing Dir- 123 The Omega project ector, replacing Joachim Lammarsch (URZ, Heidelberg, DE) who had been M.D. since the project’s inception and who was Omega (Ω) is a program built as an extension of the TEX (and is) its fons et origo. Other members of the team include sources which works internally with 16-bit characters (Uni- Philip Taylor (RHBNC, UK) who is Technical Director, code); this allows it to work with most scripts in the world with Peter Breitenlohner (Max Planck, München, DE) who is the much reduced coding scheme complications. Omega also group’s resident “Wizard of TEX”, Taco Hoekwater (Kluwer, has a powerful concept of input and output filters to allow the NL), Jerzy Ludwichowki (MKU, Torun,´ PL)and Volker Schaa user to work with existing transliteration schemes, etc.Omega (GSI, DE) who acts as Dante e.V. liaison. Former members is an ongoing project by John Plaice ([email protected]. of the team, who have contributed greatly to its success, in- edu.au) and Yannis Haralambous (Yannis.Haralambous@ clude Friedhelm Sowa, Bernd Raichle, Rainer Schöpf and univ-lille1.fr). An email discussion list is available: Joachim Schrod. Marion Neubauer, too, has helped greatly subscribe by sending a message ‘subscribe omega [email protected] will demonstrate a pre-release of NT S at EuroTEX’99, and

–36– The New TEX FAQ: Your 126 Questions Answered the final version will be demonstrated and released at TUG once per year now, and even then only after they are agreed 2000. as bugs by a small vetting team. In the first instance, contact Barbara Beeton at the AMS ([email protected]), or con- 125 The PdfTEXproject tact TUG (see question 16). If you’ve found a bug in LAT X2ε, look in the bugs data- PdfT X (formerly known as T X2PDF) arose from Hàn Thê´ E E E base to see if it’s already been reported. If not, you should Thành’s post-graduate research at Masaryk University, Brno, submit details of the bug to the LAT X3 team. To do this, you Czech Republic. The basic idea is very simple: to provide a E should process the file latexbug.tex with LAT X(thefileis version of T X that can output PDF as an alternative format E E part of the LAT X2ε distribution. The process will give you to DVI.PdfTX implements a number of new primitives, to E E instructions about what to do with your bug report (it can, switch to PDF output, and to control various PDF features. for example, be sent to the team by email). Please be spar- Hàn Thê´ Thành is continuing work on the project; the latest ing of the team’s time; they’re doing work for the good of the version is available from systems/,andaversion whole LAT X community, and any time they spend tracking was distributed on the T XLiveCD-ROM (see question 38). E E down non-bugs is time not available to write or debug new isn’t code. Details of the whole process, and an interface to the S Perhaps there an answer? database, are available via http://www.latex-project. org/help.html 126 What to do if you find a bug If you’ve found a bug in LATEX 2.09, or some other such For a start, make entirely sure you have found a bug. Double- unsupported software, there’s not a lot you can do about it. check with books about TEX, LATEX, or whatever you’re us- Youmayfindhelporde facto support on a newsgroup such as ing; compare what you’re seeing against the other answers comp.tex.tex or on a mailing list such as texhax@tex. above; ask every possible person you know who has any TEX- ac.uk, but posting non-bugs to any of these fora can lay related expertise. The reasons for all this caution are various. you open to ridicule! Otherwise you need to go out and If you’ve found a bug in TEX itself, you’re a rare animal find yourself a willing TEX-consultant — TUG maintains indeed. Don Knuth is so confident of the quality of his code aregisterofTEX consultants (see http://www.tug.org/ that he offers real money prizes to finders of bugs; the cheques consultants.html). he writes are such rare items that they are seldom cashed.

If you think you have found a genuine fault in TEXitself(or The UK TEX Users Group Committee

AFÇÆÌ ÅEÌ ,ortheCM fonts, or the TEXbook), don’t imme- after the original maintained by diately write to Knuth, however. He looks at bugs less than Bobby Bodenheimer

❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧

Software Review: Scientific WorkPlace, Version 3.0 for Windows

Scientific WorkPlace, Version 3.0. MacKichan Software (UK Dis- easiest to use of any that I have encountered. This was my tributors: Scientific Word Ltd., 49 Queen Street, Peterhead, reaction when I first used it in Version 1.1 of Scientific Word Aberdeenshire, AB42 1TU. Tel: 0845 766 0340. Fax: 01779 (Scientific Word is the document preparation part of Sci- 490600. Email: [email protected] entific WorkPlace, i.e. without the ability to calculate) five Web: http://www.sciword.demon.co.uk/) years ago, and I was pleased to find on installing this latest Price: £520+VAT. version of the software that the same easiness of use is still there. One minor gripe is that the default set of toolbars gen- ❧❧❧❧❧❧❧❧❧❧❧ erated on installation did not include all the buttons familiar Once when lecturing to a class Lord Kelvin wrote on the from the earlier version, so there was a slight culture shock blackboard the formula while I wondered where to find the Greek letters. If you have Z ∞ √ been lucky enough to have used the Lotus Ami Pro word- −x2 e dx = π processor, you may already have encountered this equation −∞ editor, and I understand it is still used by Word Pro. Then putting his finger on what he had written he turned to Another impressive feature is that the on-screen display the class and said: “A mathematician is one to whom that is produces equations that are pleasurable to view. Such aes- as obvious as that twice two makes four is to you.” thetic considerations may not weigh highly with some, but What would Kelvin have made of Scientific WorkPlace, apro- for me mathematics is a beautiful subject and deserves to be gram in which the left-hand side of this equation can be ‘writ- presented in a way that respects its beauty. It is a welcome ten’ as easily as on a blackboard, and which knows the answer feature in version 3.0 that as an alternative to typesetting doc- justaswellasitknowstheanswerto2 × 2 (in either case one uments via LATEX one can print them using the same render- just needs to select Evaluate from the Maple menu)? It may ing of the mathematics that appears on screen. not be a mathematician, but it is a mathematician’s computer When I first used Scientific Word five years ago, colleagues program. more experienced in LATEXthanIthenwaswonderedwhy MacKichan Software’s graphical equation editor is the I should need software costing several hundred pounds to do

–37– The New TEX FAQ: Your 126 Questions Answered what they could achieve with a simple text editor and a LATEX ations for many well-known journals, such as Monthly Notices previewer. In terms of the abilities of Scientific Word,Ihave of the Royal Astronomical Society and IEEE Transactions.Withver- no answer to this. If you are comfortable composing LATEX sion 1.0 of Scientific Word, there was a very useful booklet with a text editor, then I would not try to persuade you oth- which consisted of print-outs of sample pages from all the erwise. Scientific Word is software for the occasional LATEX then-supported print styles. I would have liked to see some- user rather than the expert. Scientific WorkPlace,however, thing similar with the present version. It is also difficult to is a different matter. This is a working environment for any- know how one should proceed to set up Scientific WorkPlace one involved in the mathematical sciences, in which problems to work with styles for journals not included in the built-in can be written in as near to standard mathematical language shells. I have just downloaded chsm.cls from the Chicken as one is going to get, and solutions to those problems de- and Sheep Monthly website. How should I now proceed to be rived using the numerical and symbolic calculation facilities able to work with this style within Scientific WorkPlace? I of Maple. In this respect its nearest competitor is MathCad, suspect it involves something to do with a rather frightening which also uses Maple as its calculating engine, but Scientific button labelled ‘go native’, but I am not sure of this, and the WorkPlace has the one big advantage that it uses LATEXas program documentation needs to give much clearer instruc- its native file format. Also, as well as including Maple, Sci- tions in these circumstances. entific WorkPlace offers the ability to link to Mathematica, if It seems obligatory these days for any major piece of soft- this is already installed on your system. If, like me, you ad- ware to offer the ability to ‘publish documents onto the Web mire the Mathematica kernel, but find its notebook front-end and let others view, download and work with your docu- awkward and cumbersome to use then Scientific WorkPlace ments’. Scientific WorkPlace is no exception. I am uncon- will provide a welcome alternative. vinced that this is a great enhancement; LATEX, as a typeset- Do not expect to be able to view and edit absolutely ting medium, fits uncomfortably with the style of the Web, any LATEX file with Scientific WorkPlace. There are occa- which in this context is best regarded as a way of delivering sions when documents cannot be loaded because “SW can- documents that can be viewed and processed off-line. The not handle certain \newcommand or \def statements in the true future of mathematical documents on the Web must be LATEX preamble”. However, having said this, after choosing via MathML, and I very much hope that MacKichan are a couple of files at random from the Los Alamos preprint working on incorporating an ability to save as MathML into archive, I had no trouble loading them into Scientific Work- their equation editor. Place. As a final point, earlier versions of this software produced In the current version of the software, a distinction has aLATEX output that was not portable, in the sense that when been drawn between the style of the document, which con- sending the file to someone working with a standard LATEX trols the on-screen appearance and the non-typeset printing, installation they would complain that there was a missing and the LATEX typesetting specifications for the document. file. Now there is an option to save as portable LATEX, which Earlier versions of the product used the terminology ‘style’ does not insert the line \input{tcilatex} in the .tex file to refer to the typesetting specifications, a usage which has for the document or include additional LATEX macros in the confusingly remained in the title of the program that allows .tex file. I will be using this option to produce an output file new typesetting specifications to be created: the style editor. to send this review to the editor of Baskerville, so if there is no If like me, you have always been daunted by the prospect of Editor’s Note of complaint attached, you can assume that it creating your own .sty files, this style editor could be a use- worked!9 ful tool. The time available for completing this review was It is planned that there will be a brochure together with too short to be able to offer a fully considered opinion on its a 30-day demo CD going out with each copy of the issue abilities, but in a relatively short time I was able to create a of Baskerville in which this review appears. I strongly recom- reasonable .sty file, something I have never before attempted mend that you try it for yourself. in five years of LATEX use. For many purposes, however, there is no need to even attempt to create your own typesetting Gareth Suggett specifications. The built-in document shells include specific- Email: [email protected]

❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧

Historical snippets on TEX and friends

AFÇÆÌ FÇÆÌ During the early development of the TEXandÅEÌ programs and to the appearance of the fonts, and programs, Don Knuth distributed a set of outline fonts under they were finally released under the name ‘Computer Mod- the name ‘Almost Modern’ (amr10, etc.). These fonts were ern’. The old ‘Almost Modern’ continued to appear for some

soon considered to be a preliminary trial release.10 Knuth years in isolated sites, although their use was strongly discour- A later made extensive changes and refinements to the ÅEÌ - aged. They were easily recognised—in contrast to Computer

9The source was indeed reasonably portable. – Ed.

10

AFÇÆÌ With both TEXandÅEÌ , Knuth demonstrated the precept “plan to throw one away”, made famous by Frederick P. Brooks Jr. in his classic The Mythical Man-Month: Essays on Software Engineering (Reading, Mass.: Addison-Wesley, 1975), ch. 11.

–38–

The New TEX FAQ: Your 126 Questions Answered

AFÇÆÌ Modern—by their smaller counters and heavier, cramped format, which was the output format of ÅEÌ when appearance. Some releases of Almost Modern had a tell- version 1.0 was released in 1984.13 The GF format is more tale signature: a small horizontal stroke protruding from the compact than PXL was, can contain fonts of 256 characters, right notch of lower case ‘y’, a bit like this: ‘y’. The changes and has other advantages. made to Almost Modern to produce Computer Modern In 1985, however, Tom Rokicki devised the ‘packed’ or were largely the result of interaction between Knuth and PK format which produced even better compression than the the type designers Hermann Zapf, Matthew Carter, Richard GF format.14 The GFtoPK program reduced the font files Southall (who did the Computer Modern sans serif), Neenie by about as much as is possible by current file compression Billawalla (who did the CALLIGRAPHIC CAPS), Chuck techniques.15 Even dedicated Lempel-Ziv compression pro- Bigelow and Chris Holmes. grams such as ZIP, compress,andZOO cannot significantly There was another wrinkle, to do with PK files, and to un- improve the compression achieved by the PK format. Like the

derstand it we need to look back a little further into TEX’s GF format, it allows for fonts of up to 256 characters, and it is

AFÇÆÌ history. The very first versions of TEXandÅEÌ were also easier for DVI translators to process efficiently. The TEX rather more device-specific than today’s versions. For ex- community settled on the PK format as its standard, and use ample, TEX sometimes produced output files ready for dir- of the PXL format faded away. Programs were made available ect ingestion by particular printers, rather as PdfTEXtoday that converted to and from each of the different font formats:

16 A

produces an alternative output format to DVI. Early ÅEÌ - PXtoPK, PKtoPX, PKtoGF, and so on.

ÇÆÌ ÅEÌAFÇÆÌ

F too produced pixel files in the format of particular Why hasn’t been altered to write PK files in- A

devices. Some of these early font formats had intriguing stead of GF? At least two reasons: GF files can contain ÅEÌ - ÇÆÌ features. For example the VNT format fonts contained each F specialsandnumspecials, which may not appear character of the font twice: once in the normal orientation, in PK files.17 Such specialsareusedbyGFtoDVI, for ex- and once rotated by 90◦. This was very useful for jobs such ample, to print labels on proof sheets of fonts. as labelling the axes of graphs. (Remember that PostScript For a time, TEX users could still come across PXL format

was not yet invented, so there was no obvious way of rotating fonts. For example, there was a useful program by David

AFÇÆÌ text.) Later, the ‘pixel’ or PXL format became ÅEÌ ’s Strip and Dimitri Vulis, called HP2PXL, which read Hewlett- standard output. Rotated characters were abandoned, with Packard soft fonts and generated a TFM that TEX could use. It the proviso that ‘there is a separate utility that can read a also converted the soft font bitmaps into PXL format, so that PXL file and write a rotated version into a new PXL file’.11 DVI drivers could set type using them.18 The PXL raster description, containing uncompressed bit- An ingenious use of HP2PXL wasmadebyananonym- maps, was easy to read, but was also very verbose, and the ous person in early 1989. S/he used PC Paintbrush to size of the files grew with the square of the resolution.12 The write the letters of the alphabet, in handwriting, creat- Almost Modern fonts, for example, were normally distrib- ing the file HAND.PCX. Then s/he created an HP softfont, uted as PXL files. The PXL format had other drawbacks: one HAND.SFP, from these handwritten letters using a program was that it could only manage fonts with up to 128 characters, called PCX2FNT1. Finally, HP2PXL was used to convert which made it useless for some of the larger fonts created with HAND.SFP into HAND.PXL and HAND.TFM,whichcouldbe

19

AFÇÆÌ

ÅEÌ . It was fine for Computer Modern, of course. used directly in TEX and on a 300 dpi laser printer. How-

AFÇÆÌ Knuth’s decision to make ÅEÌ ’s output device- ever, the wide availability of PXtoPK meant that even these

independent led to the design of the Generic Font (GF)file PXL files were usually converted into PK format before use.

ÁØ ÑaÝ cÓÑe a× ÖaØheÖ a ×hÓck ØÓ ×ee Ì X ×eØØiÒg ØÝÔe iÒ

E

haÒdÛÖiØiÒg! BÙØ Øhe ÔÓ××ibiÐiØie× aÖe iÒØÖigÙiÒgº

Ìhe ÕÙick bÖÓÛÒ fÓÜ jÙÑÔed ÓÚeÖ Øhe ÐaÞÝ ×heeÔº ¼½¾¿456789

Dominik Wujastyk

❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧❧

11See David Fuchs, ‘The format of PXL files’ TUGboat 2(3) (1981), 10b. This utility seems to have sunk without trace. 12See David Fuchs, ibidem, 8–12, and idem, ‘News from the home front’, TUGboat 2(3) (1981), 22. There were actually two versions of the PXL file format, one (word-aligned) with ID byte 1001, the other (byte-aligned) with ID 1002, which was less verbose (ibidem, 10–11). ArborText, for example, distributed the latter type of file for some time. 13A program by Arthur Samuel called GFtoPXL converted fonts back to the older format, for people whose DVI translators couldn’t yet read the new format. 14See Tomas Rokicki,‘Packed (PK)fontfileformat’TUGboat 6(3) (1985), 115–120.

15

AFÇÆÌ The WEB listing for GFtoPK was published in Donald E. Knuth, Tomas G. Rokicki, and Arthur L. Samuel, ÅEÌ ware (Stanford, 1989), 201–42. 16There was an early release of the GFtoPK program which underwent improvement. Thus there were, for a short time, two kinds of PK file in circulation—one kind with ID byte 87 and another with ID 89. The latter format is the only one sanctioned today. See the GFtoPK WEB file for fuller information.

17

AFÇÆÌ \special ÅEÌAFÇÆÌ On ÅEÌ specials, which are not the same as TEX s, see The book, appendix G. 18See TUGboat 9(2), (1988), 149. 19All these files and programs were available from the Channel 1 bulletin board in Boston, Massachussetts, in mid-1989.

–39– The New TEX FAQ: Your 126 Questions Answered

ff The 1998–99 UK-TUG committee We are allowed to o er this service only to current mem- bers of UK-TUG and/or members of TUG. Please send your Chairman order and cheque (in UK £) to Peter Abbott. Cheques should Philip Taylor : [email protected] be made payable to ‘UKTUG’. All books will be routed Treasurer through UK-TUG. In all cases, please notify Peter Abbott Peter Abbott : [email protected] by e-mail, ’phone, fax or letter when books are delivered. Secretary Provided that the book(s) are in stock, it will normally take John Palmer : [email protected] about a week from receipt of order to delivery of the book(s). Membership Secretary Phil Molyneux : [email protected] Obtaining T XfromCTAN Kaveh Bazargan : [email protected] E Malcolm Clark : [email protected] The UK TEXArchiveatftp://ftp.tex.ac.uk/ is part of Roy Everett : [email protected] the CTAN (Comprehensive TEX Archive Network) collabor- James Foster : [email protected] ating network of archives on the Internet organised under the David Hardy : [email protected] ægis of the TEX Users Group. Hong Ji : [email protected] The CTAN archives run an enhanced ftp server which Kim Roberts : [email protected] supports dynamic compression, uncompression, and archive- Dominik Wujastyk : [email protected] creation options. Fetch the top-level file README. archive-features for information. The server also sup- ports site-defined commands to assist you. Please read Contacting UK-TUG README.site-commands for a brief overview. Orders for books or software should be addressed to the For interfaces to, and catalogues of, CTAN, you are re- Treasurer : Peter Abbott, 1 Eymore Close, Selly Oak, Birm- ferred to Graham Williams’ TEXandLATEX Catalogue which ingham B29 4LB. Fax/telephone : 0121-476 2159. is available from CTAN as help/Catalogue/catalogue. General enquiries should be sent to the Secretary : html ; other interfaces are listed in http://www.tug.org/ John Palmer, 69 St Cross Road, Winchester SO23 9RE. interest.html. Telephone : 01962 865261. Please report any problems with the CTAN archives to Please get in touch with the Membership Secretary [email protected]. [Phil Molyneux, Kingston Business School, Kingston Uni- versity, Kingston Hill, Kingston-upon-Thames KT2 7LB; Obtaining TEXonCD-ROM e-mail: [email protected]; tel (work) 0181-547 UK-T G, in collaboration with GUTenberg, TUG, NTG and 2000 ext 5233, (home) 0181-549 0045] regarding payment U DANTE e.V., have produced T X Live, a “plug-and-play” of UK-T G subscriptions, or changes to personal details held E U CD-ROM for Linux, Unix, and Windows 32, based on the on file. Web2c T X setup. As it is formatted according to ISO 9660, UK-T G maintains pages on the World Wide Web at E U with both Joliet and Rock Ridge extensions, the platform- http://uk.tug.org/ E-mail enquiries about UK-T G U independent files can, in principle, be read on all operating may be sent to [email protected]. systems which can deal with that format. The CD is supplied free of charge to all members of UK-TUG. Baskerville Complete DOS, Windows 32 and Macintosh implement- ations are available as packages on the CD ; floppy disk sets Articles should be submitted using electronic mail to will now be supplied only on special request. [email protected] ; contributors who cannot sub- mit using e-mail may seek advice from the Secretary. Any correspondence concerning Baskerville may also be addressed Future meetings of UK-TUG in this way. Earlier issues of Baskerville can be found on CTAN The committee planned to hold two meetings in 1999. One in usergrps/uktug/baskervi. has already taken place on May 28th, and was on “TEX for Windows 32”. The second meeting, which will include Book Discounts for UK-TUG members the AGM, will commence on Sunday 12th September, at St Anne’s College Oxford (http://www.stannes.ox.ac. We have arrangements with Addison-Wesley for their well- uk/). It will be on the relationships between TEXandLATEX known TEX-related publications, with International Thom- on the one hand, and SGML, HTML, XML and related son Publishing for the O’Reilly & Associates Inc. series, and notations on the other. with Oxford University Press, to supply books to members at For further information please contact one of the Commit- discounted prices. tee, or visit the UK-TUG Web site at http://uk.tug.org/. Please send details (including ISBN if possible) of books required to Peter Abbott. Peter will supply a quotation. The Committee of the UK TEXUsers’Group

–40–