The GELLMU Archiveusepackagelfaqtolerance=9999The UK <tex /> Users' Group FAQ<brk /> Your <ref >lastquestion</ref > Questions AnsweredGELLMU Editionversion 2.4.7a, date 20000707Maintained for the UK Users Group Committee by Robin FairbairnsNote small This document is an updated and extended version of the FAQ article that was published as the December 1994 and 1995, and March 1999 editions of the UKTUG magazine Baskerville (which weren't formatted like this) The article is also available via the World Wide Web Part AIntroductionSU-1Part BThe BackgroundSU-21What is ?SU-2.12How should I pronounce ?SU-2.23What is MF?SU-2.34What is MP?SU-2.45How can I be sure it's really ?SU-2.56Are and friends Y2K compliant?SU-2.67What is ?SU-2.78How should I pronounce (2)?SU-2.89Should I use plain or ?SU-2.910What is CONT?SU-2.1011What are the AMS packages (AMSTeX, etc.)?SU-2.1112What is Eplain?SU-2.1213What is Lollipop?SU-2.1314What is Texinfo?SU-2.1415If is so good, how come it's free?SU-2.1516What is the future of ?SU-2.1617What are TUG and TUGboat?SU-2.1718Are there nationallybased user groups, too?SU-2.1819TUG Technical Working GroupsSU-2.19Part CDocumentation and HelpSU-320Books on and its relationsSU-3.121Books on TypeSU-3.222Where to find this articleSU-3.323Where to get helpSU-3.424AllTeX TutorialsSU-3.525MF and MP TutorialsSU-3.626BibTeX DocumentationSU-3.727The PiCTeX manualSU-3.828Finding AllTeX macro packagesSU-3.929Finding files in the CTAN archivesSU-3.10Part DBits and pieces of SU-430What is a DVI file?SU-4.131What is a driver?SU-4.232What are PK files?SU-4.333What are TFM files?SU-4.434Virtual fontsSU-4.535special commandsSU-4.636Documented sources (.dtx files)SU-4.737What are the EC fonts?SU-4.838What is TDS?SU-4.9Part EAcquiring the SoftwareSU-539Repositories of materialSU-5.140What's the CTAN nonfree tree?SU-5.241Contributing a file to the archivesSU-5.342Finding new fontsSU-5.443 CDROMsSU-5.5Part F SystemsSU-644AllTeX for different machinesSU-6.145friendly editors and shellsSU-6.246Commercial implementationsSU-6.3Part GDVI Drivers and PreviewersSU-747DVI to PostScript conversion programsSU-7.148DVI drivers for HP LaserJetSU-7.249DVI previewersSU-7.3Part HSupport Packages for SU-850Fig, a friendly drawing packageSU-8.151CAD, a drawing package for SU-8.252Spelling checkers for work with SU-8.3Part ILiterate programmingSU-953What is Literate Programming?SU-9.154WEB for C, FORTRAN, and other languagesSU-9.2Part JFormat conversionsSU-1055Conversion between AllTeX and othersSU-10.156Conversion from AllTeX to plain ASCIISU-10.257Conversion from SGML or HTML to SU-10.358AllTeX conversion to HTMLSU-10.459Making hypertext documents from SU-10.560Making Acrobat documents from SU-10.661Using to read SGML or XML directlySU-10.7Part KMFSU-1162Getting MF to do what you wantSU-11.163Which font files should be keptSU-11.264Getting bitmaps from the archivesSU-11.3Part LPostScript and SU-1265Using PostScript fonts with SU-12.166Previewing files using PostScript fontsSU-12.267 font metric files for PostScript fontsSU-12.368Problems using PostScript fontsSU-12.469Choice of scalable outline fontsSU-12.570Including a PostScript figure in AllTeXSU-12.6Part MSpecial sorts of typesettingSU-1371Drawing with SU-13.172Doublespaced documents in SU-13.273Formatting a thesis in SU-13.374Flowing text around figures in SU-13.475Alternative head and footlines in SU-13.576Including a file in verbatim in SU-13.677Including line numbers in typeset outputSU-13.778Generating an index in AllTeXSU-13.879Typesetting URLsSU-13.980Citing URLs with BibTeXSU-13.1081Using BibTeX with plain SU-13.1182Typesetting music in SU-13.1283Drawing Feynman diagrams in SU-13.13Part NHow do I do X in or SU-1484Proof environmentSU-14.185Symbols for the number setsSU-14.286Roman theoremsSU-14.387Fancy enumeration listsSU-14.488Unnumbered sections in the Table of ContentsSU-14.589Footnotes in tablesSU-14.690Style of section headingsSU-14.791Indent after section headingsSU-14.892Footnotes in section headingsSU-14.993Changing the margins in SU-14.1094Finding the width of a letter, word, or phraseSU-14.1195Changing the space between lettersSU-14.1296Excluding blocks of text from the DVI fileSU-14.1397Setting bold Greek letters in SU-14.1498Defining a new loglike function in SU-14.1599Typesetting all those related logosSU-14.161001column abstract in 2column documentSU-14.17101Changing babel's ideas of words to useSU-14.18102Code listings in SU-14.19Part OMacros for Particular Types of DocumentsSU-15103Setting papers for journalsSU-15.1104A report from lots of articlesSU-15.2105Curriculum Vitae (Resume)SU-15.3Part PThings are Going WrongSU-16106Weird hyphenation of wordsSU-16.1107(Merely) peculiar hyphenationSU-16.2108Accented words aren't hyphenatedSU-16.3109Enlarging SU-16.4110Moving tables and figures in SU-16.5111pagestyleempty on first page in SU-16.6112Underlined text won't breakSU-16.7113Odd behaviour of rm, bf, etc.SU-16.8114Old font references such as tenrmSU-16.9115Missing symbolsSU-16.10116 gets crossreferences wrongSU-16.11117 and in macro namesSU-16.12118Where are the msx and msy fonts?SU-16.13119Where are the am fonts?SU-16.14120String too long in BibTeXSU-16.15Part QWhy does it do that?SU-17121What's going on in my include commands?SU-17.1122Why does it ignore paragraph parameters?SU-17.2123What's the reason for protection?SU-17.3124Why doesn't verb work within?SU-17.4125Casechanging odditiesSU-17.5126Why are signs doubled in macros?SU-17.6127Why does split footnotes across pages?SU-17.7128Getting marginpar on the right sideSU-17.8129Why does PiCTeX run out of dimens?SU-17.9130Why won't fixed names stay changed?SU-17.10Part RCurrent ProjectsSU-18131LaTeXe (the new standard )SU-18.1132The 3 projectSU-18.2133The Omega projectSU-18.3134The NTS projectSU-18.4135The PDF projectSU-18.5Part SPerhaps There isn't an AnswerSU-19136What to do if you find a bugSU-19.1
Part AIntroductionThis article was prepared by the Committee of the UK Users Group (UKTUG) For 199899: 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 as a development of a regular posting to the Usenet newsgroup comptexttex that was maintained for some time by Bobby Bodenheimer (bobbyhotcaltechedu)Usenet is a mechanism for exchanging articles between people who share interests or needs Usenet, 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 a newsgroup is an area within Usenet carrying a particular class of articles Since a common sort of article asks for help, advice or information, and since certain of these questions are regularly repeated (often with monotonous regularity), some publicspirited souls took to writing articles which listed Frequently Asked Questions and answers to them Many members of UKTUG do not have access to Usenet, but could be expected to value the answers about that have accumulated over the years; so we decided to update the list and publish it in Baskerville; we are grateful to Bobby for his permission to use his article in this way As a quid pro quo, we are making the source of the article freely available (Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/uktug-faq"usergrpsuktugfaq), and it can be compiled by anyone who runs reasonably current LaTeXe (iref="latex2e"questionlatex2e), and has the required fonts It was the committee's original intention that it would also be possible for the content of this article to feed back to the worldwide community via regular posting to Usenet, but since Bobby was forced to abandon his work in the area, noone has been able to take his place Therefore, a translation of the article has been made available on the WorldWide Web, via URL http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yesA hypertext version is also to be found on the Live CDROM (iref="Q-CD"questionQ-CD) When we started, we rearranged Bobby's original, and we have since added new questions and answers on the basis of our experience of answering questions about , writing documents in , and developing macros for , over the yearsThe committee is grateful for help and advice, from the following outside its number: Donald Arseneau, Barbara Beeton, Karl Berry, Damian Cugley, Michael Downes, John Hobby, Berthold Horn, Werner Icking, David Kastrup, Ted Nieland, Pat Rau, Peter R. Wilson, Piet van Oostrum, Oren Patashnik, Joachim Schrod, Ulrik Vieth, Rick Zaccone and Reinhard ZierkeFurther, Rosemary Bailey and Chris Rowley (who resigned from the committee in 1995), Alan Jeffrey and Carol Hewlett (who resigned from the committee in 1996), David Carlisle (who resigned from the committee in 1997), and Robin Fairbairns, Jonathan Fine and Sebastian Rahtz (who resigned from the committee in 1998) all made significant contributions to the conception, development and subsequent revision of this FAQ while they remained on the committee, and we are grateful to them for their contributions to it In particular, Alan Jeffrey developed the technique whereby the Web version of the FAQ is generatedAnd lastly, the editor has regularly used the work of other groups for inspiration, notably the excellent (Germanlanguage) FAQ published by Dantee.V. (see http://www.dante.de/faq/de-tex-faq/) Finding the FilesUnless otherwise specified, all files mentioned in this article are available from a CTAN archive, or from one of their mirrors iref="Q-archives"QuestionQ-archives gives details of the CTAN archives, and how to retrieve files from them If you don't have access to the Internet, iref="Q-CD"questionQ-CD tells you of sources of CDROMs that offer snapshots of the archivesThe reader should also note that the first directory name of the path name of every file on CTAN has been elided from what follows, for the simple reason that it's always the same (texarchive)To avoid confusion, we've also elided the full stopFull stop (British English)period (American English) from the end of any sentence whose last item is a path name (note that such sentences only occur at the end of paragraphs) Though the path names are set in a different font from running text, it's not easy to distinguish the font of a single dot
Part BThe Background1What is ? is a typesetting system written by Donald E.Knuth, who says in the Preface to his book on (see iref="Q-books"questionQ-books) that it is intended for the creation of beautiful booksand especially for books that contain a lot of mathematicsKnuth developed a system of literate programming to write , and he provides the literate (WEB) source of free of charge, together with tools for processing the web source into something that can be compiled and something that can be printed; there's never any mystery about what does Furthermore, the WEB system provides mechanisms to port to new operating systems and computers; in order that one may have some confidence in the ports, Knuth supplied a test by means of which one may judge the fidelity of a system and its documents are therefore highly portable is a macro processor, and offers its users a powerful programming capability For this reason, on its own is a pretty difficult beast to deal with, so Knuth provided a package of macros for use with called plain plain is effectively the minimum set of macros one can usefully employ with , together with some demonstration versions of higherlevel commands (the latter are better regarded as models than used asis) When people say they're programming in , they usually mean they're programming in plain 2How should I pronounce ?The X stands for the Greek letter Chi (), and is pronounced by Englishspeakers either a bit like the ch in loch ([x] in the IPA) or like k It definitely is not pronounced ks 3What is MF?MF was written by Knuth as a companion to whereas defines the layout of glyphs on a page, MF defines the shapes of the glyphs and the relations between them MF details the sizes of glyphs, for 's benefit, and details the rasters used to represent the glyphs, for the benefit of programs that will produce printed output as post processes after a run of MF's language for defining fonts permits the expression of several classes of things: first (of course), the simple geometry of the glyphs; second, the properties of the print engine for which the output is intended; and third, metainformation which can distinguish different design sizes of the same font, or the difference between two fonts that belong to the same (or related) familiesKnuth (and others) have designed a fair range of fonts using MF, but font design using MF is much more of a minority skill than is macrowriting The complete user nevertheless needs to be aware of MF, and to be able to run MF to generate personal copies of new fonts 4What is MP? The MP system (by John Hobby) implements a picturedrawing language very much like that of MF except that it outputs Encapsulated PostScript files instead of runlengthencoded bitmaps MP is a powerful language for producing figures for documents to be printed on PostScript printers, either directly or embedded in AllTeX documents. It includes facilities for directly integrating text and mathematics with the graphics. The PostScript output is of such a simple form that MP output files can be directly included in PDF PDF cannot normally handle PostScript inclusions documents (iref="Q-pdftex"questionQ-pdftex). (Knuth tells us that he uses nothing else but MP for diagrams in text that he is writing.)Much of MP's source code was copied from MF's sources with Knuth's permission 5How can I be sure it's really ? (and MF and MP) are written in a literate programming language called Web (iref="Q-lit"questionQ-lit) which is designed to be portable across a wide range of computer systems How, then, is a new version of checkedOf course, any sensible software implementor will have his own suite of tests to check that his software runs: those who port and its friends to other platforms do indeed perform such testsKnuth, however, provides a conformance test for both (trip) and MF (trap) He characterises these as torture tests: they are designed not to check the obvious things that ordinary typeset documents, or font designs, will exercise, but rather to explore small alleyways off the main path through the code of They are, to the casual reader, pretty incomprehensibleOnce an implementation of has passed its trip, or and implementation of MF has passed its trap, test it may reasonably be distributed as a working version 6Are and friends Y2K compliant?Crashing:None of , MF or MP can themselves crash due to any change whatever in the date of any sortTimestamps:As Knuth delivers the sources, a 2digit year is stored as the creation time for format files and that value is printed in logfiles These items should not be of general concern, since the only use of the date format file is to produce the log output, and the log file is designed for human readers only Knuth's distributed source does not designate the code, which generates this 2digit date, as a valid area where implementations may differ However, he announced in 1998 that implementators can alter this code without fear of being accused of noncompliance Nearly all implementations that are being actively maintained had been modified to generate 4digit years in the format file and the log, by the end of 1998The year primitive:Certification of a implementation (see iref="Q-triptrap"questionQ-triptrap) does not require that year return a meaningful value (which means that can, in principle, be implemented on platforms that don't make the value of the clock available to user programs) The book (see iref="Q-books"questionQ-books) defines year as the current year of our Lord, which is the only correct meaning for year for those implementations which can supply a meaningful value, which is to say nearly all of them In short, implementations should provide a value in year giving the 4digit year Anno Domini, or the value 1776 if the platform does not support a date function Note that if the system itself fails to deliver a correct date to , then year will of course return an incorrect value cannot be considered Y2K compliant, in this sense, on a system that is not itself Y2K compliantMacros: macros can in principle perform calculations on the basis of the value of year The suite (iref="Q-latex"questionQ-latex) performs such calculations in a small number of places; the calculations performed in the current (supported) version of are known to be Y2K compliant Other macros and macro packages should be individually checkedExternal software:Software such as DVI translators needs to be individually checked7What is ? is a macro package, originally written by Leslie Lamport, that provides a document processing system allows markup to describe the structure of a document, so that the user need not think about presentation. By using document classes and addon packages, the same document can be produced in a variety of different layoutsLamport says that represents a balance between functionality and ease of use This shows itself as a continual conflict that leads to the need for such as the present article: can meet most user requirements, but finding out how is often tricky 8How should I pronounce (2)?Lamport never recommended how one should pronounce , but a lot of people pronounce it Lay or perhaps Lah (with pronounced as the program itself; see iref="tex-pronounce"questiontex-pronounce)The epsilon in LaTeXe is supposed to be suggestive of a small improvement over the old LaTeXo Nevertheless, most people pronounce the name as twoee 9Should I use plain or ?There's no straightforward answer to this question Many people swear by plain , and produce highly respectable documents using it (Knuth is an example of this, of course) But equally, many people are happy to let someone else take the design decisions for them, accepting a small loss of flexibility in exchange for a saving of brain powerThe arguments around this topic can provoke huge amounts of noise and heat, without offering much by way of light; your best bet is to find out what those around you are using, and to go with the crowd Later on, you can always switch your allegiance; don't bother about itIf you are preparing a manuscript for a publisher or journal, ask them what markup they want before you develop your own; many big publishers have developed their own styles for journals and books, and insist that authors stick closely to their markup 10What is CONT?CONT is a macro package developed by Hans Hagen, originally to serve the needs of the Dutch firm, Pragma It was designed with the same generalpurpose aims as , but (being younger) reflects much more recent thinking about the structure of markup, etc In particular, CONT can customise its markup to an author's language (customising modules for Dutch, English and German are provided, at present)CONT is well integrated, in all of its structure, with the needs of hypertext markup, and in particular with the facilities offered by PDFCONT doesn't yet have quite such a strong developer community as does , but those developers who are active seem to have prodigious energyTry a copy, from Href="ftp://ftp.tex.ac.uk/tex-archive/macros/context"macroscontext 11What are the AMS packages (AMSTeX, etc.)?AMSTeX is a macro package, originally written by Michael Spivak for the American Mathematical Society (AMS) during 19831985. It is described in The Joy of by Michael D.Spivak (second edition, AMS, 1990, ISBN0821829971) It is based on plain , and provides many features for producing more professionallooking maths formulas with less burden on authors It pays attention to the finer details of sizing and positioning that mathematical publishers care about. The aspects covered include multiline displayed equations, equation numbering, ellipsis dots, matrices, double accents, multiline subscripts, syntax checking (faster processing on initial errorchecking runs), and other thingsAs increased in popularity, authors asked to submit papers to the AMS in , and so the AMS developed AMSLaTeX, which is a collection of packages and classes that offer authors most of the functionality of AMSTeX 12What is Eplain?The Eplain macro package expands on and extends the definitions in plain Eplain is not intended to provide generic typesetting capabilities, as do or Texinfo (iref="Q-texinfo"questionQ-texinfo) Instead, it provides definitions that are intended to be useful regardless of the highlevel commands that you use when you actually prepare your manuscriptFor example, Eplain does not have a command section, which would format section headings in an appropriate way, as 's section The philosophy of Eplain is that some people will always need or want to go beyond the macro designer's idea of appropriate Such canned macros are fine as long as you are willing to accept the resulting output If you don't like the results, or if you are trying to match a different format, you are out of luckOn the other hand, almost everyone would like capabilities such as crossreferencing by labels, so that you don't have to put actual page numbers in the manuscript Karl Berry, the author of Eplain, says he is not aware of any generally available macro packages that do not force their typographic style on an author, and yet provide such capabilities 13What is Lollipop?Lollipop is a macro package written by Victor Eijkhout; it was used in the production of his book by Topic (see iref="Q-books"questionQ-books) The manual says of it: Lollipop is made easy. Lollipop is a macro package that functions as a toolbox for writing macros It was my intention to make macro writing so easy that implementing a fully new layout in would become a matter of less than an hour for an average document, and that it would be a task that could be accomplished by someone with only a very basic training in programming Lollipop is an attempt to make structured text formatting available for environments where previously only WYSIWYG packages could be used because adapting the layout is so much more easy with them than with traditional macro packagesThe manual goes on to talk of ambitions to capture some of the market share; it's a very witty package, but little sign of it taking over from is detectable An article about Lollipop appeared in TUGboat 13(3) 14What is Texinfo?Texinfo is a documentation system that uses one source file to produce both online information and printed output So instead of writing two different documents, one for the online help and the other for a typeset manual, you need write only one document source file When the work is revised, you need only revise one document You can read the online information, known as an Info file, with an Info documentationreading program By convention, Texinfo source file names end with a texi or texinfo extension You can write and format Texinfo files into Info files within GNU emacs, and read them using the emacs Info reader If you do not have emacs, you can format Texinfo files into Info files using makeinfo and read them using infoThe Texinfo distribution, including a set of macros for formatting Texinfo files is available as Href="ftp://ftp.tex.ac.uk/tex-archive/macros/texinfo-dist"macrostexinfodist 15If is so good, how come it's free?It's free because Knuth chose to make it so He is nevertheless apparently happy that others should earn money by selling based services and products. While several valuable related tools and packages are offered subject to restrictions imposed by the GNU General Public Licence (Copyleft), itself is not subject to CopyleftThere are commercial versions of available; for some users, it's reassuring to have paid support What is more, some of the commercial implementations have features that are not available in free versions (The reverse is also true: some free implementations have features not available commercially.)Usually, this article does not describe commercial versions; iref="Q-commercial"QuestionQ-commercial lists the major vendors 16What is the future of ?Knuth has declared that he will do no further development of he will continue to fix any bugs that are reported to him (though bugs are rare) This decision was made soon after version3.0 was released; at each bugfix release the version number acquires one more digit, so that it tends to the limit (at the time of writing, Knuth's latest release is version 3.14159) Knuth wants to be frozen at version when he dies; thereafter, no further changes may be made to Knuth's source (A similar rule is applied to MF; its version number tends to the limite, and currently stands at 2.718.)There are projects (some of them longterm projects: see, for example, iref="LaTeX3"questionLaTeX3) to build substantial new macro packages based on For the even longer term, there are various projects to build a successor to see iref="Q-omega"questionsQ-omega and iref="Q-NTS"Q-NTS 17What are TUG and TUGboat?TUG is the Users Group TUGboat is TUG's main journal, containing useful articles about and MF. TUG also produces a newsletter for members ( and TUG News), organises a yearly conference, runs training courses, sells almost all related books, and distributes related microcomputer software on disk. TUG has a Technical Council to coordinate related developments (iref="Q-TUGTC"questionQ-TUGTC) Enquiries should be directed to: Users Group1466 NW Front Avenue, Suite 3141Portland, OR 97209USA Tel: 1 5032239994Fax: 1 5032233960Email: tugmailtugorgWeb: http://www.tug.org/CTAN details: Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/tug"usergrpstug 18Are there nationallybased user groups, too?The following groups publish their membership (etc.)information electronically on CTAN archives: DANTE, Deutschsprachige Anwendervereinigung e.V.Postfach 101840D69008 HeidelbergGermany Tel: 49 06221 29766Fax: 49 06221 167906Email: dantedantedeWeb: http://www.dante.de/CTAN details: Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/dante"usergrpsdante Association GUTenberg,BP 10,93220 Gagny principal,France Email: secretariatgutenbergeuorgWeb: http://www.gutenberg.eu.org/CTAN details: Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/gut"usergrpsgut NTG Postbus 394, 1740AJ Schagen,The Netherlands Email: ntgnicsurfnetnlWeb: http://www.ntg.nl/CTAN details: Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/ntg"usergrpsntg UK Users' Group,Membership enquiries: co Dr James Foster,School of Mathematical SciencesUniversity of SussexFalmer, Brighton BN1 9QHUnited Kingdom Tel: 44 1273 678781Fax: 44 1273 678097Email: jfostersussexacuk General enquiries: uktugenquiriestexacukWeb: http://uk.tug.org/uk-tugA listing of all known groups is available as Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps-list"usergrpslist 19TUG Technical Working Groups TUG (iref="Q-TUG"questionQ-TUG) has an autonomous Technical Council which can appoint Technical Working Groups related to the specific areas of interest to the community. Each group has a chaircontact person and establishes its own working methods and membership; anyone interested in taking part should contact the group's chair person. Suggestions for new groups should be addressed to techcounciltugorg; a list of members of the Technical Council can be found at http://tug.org/committees.htmlBelow is a brief list of currently active groups: WG9201 Extended Mathematics Font Encoding. To create font encoding standards for Mathematical fonts used in systems Contact: Barbara Beeton (bnbmathamsorg) WG9205 Archive Guidelines. To develop guidelines for the effective management and utilisation of major archives, and to initiate communication among the maintainers of the existing archives for the purpose of coordination and synchronisation Contact: Sebastian Rahtz (srahtzelseviercouk) WG9407 Directory Structure. To identify a universal directory structure for macros, fonts and other related software so that recommendations can be made to all suppliers of software The group's current set of proposals are to be found on CTAN at Href="ftp://ftp.tex.ac.uk/tex-archive/tds/draft-standard/tds-0.9996"tdsdraftstandardtds0.9996Contact: Karl Berry (kbcsumbedu) WG9408DVI Driver Implementation and Standardisation Issues. To study the issues in the requirements of DVI Drivers imposed by changing needs and technologies, and to make recommendations for implementation and standardisation of such drivers to enhance the uniformity of their use Work will include, but not be limited to, the examination of the use, syntax, and semantics of special commands Contact: Michael Sofka (sofkamrpiedu) WG9410 and Linguistics. To study and discuss the requirements for typesetting linguistics in and as a means of identifying, examining, testing, and comparing macros, fonts, style files and other aids for typesetting linguistics Contact: Christina Thiele (cthieleccscarletonca)
Part CDocumentation and Help20Books on and its relationsWhile Knuth's book is the definitive reference for , there are other books covering : The bookby Donald Knuth (AddisonWesley, 1984, ISBN0201134470, paperback ISBN0201134489)A Beginner's Book of by Raymond Seroul and Silvio Levy, (Springer Verlag, 1992, ISBN0387975624) by Example: A Beginner's Guideby Arvind Borde (Academic Press, 1992, ISBN0121176509)Introduction to by Norbert Schwarz (AddisonWesley, 1989, ISBN020151141X)A Plain Primerby Malcolm Clark (Oxford University Press, 1993, ISBNs0198537247 (hardback) and0198537840 (paperback)) by Topicby Victor Eijkhout (AddisonWesley, 1992, ISBN0201568829) for the Beginnerby Wynter Snow (AddisonWesley, 1992, ISBN0201547996) for the Impatientby Paul W.Abrahams, Karl Berry and Kathryn A.Hargreaves (AddisonWesley, 1990, ISBN0201513757) in Practiceby Stephan von Bechtolsheim (Springer Verlag, 1993, 4 volumes, ISBN354097296X for the set, or Vol.1: ISBN0387975950, Vol.2: ISBN0387975969, Vol.3: ISBN0387975977, and Vol.4: ISBN0387975985) : Starting from Square One by Michael Doob (Springer Verlag, 1993, ISBN3540564411)The Advanced bookby David Salomon (Springer Verlag, 1995, ISBN0387945563) A collection of Knuth's publications about typography has recently been published: Digital Typographyby Donald Knuth (CSLI and Cambridge University Press, 1999, ISBN1575860112, paperback ISBN1575860104) For , see: , a Document Preparation Systemby Leslie Lamport (second edition, Addison Wesley, 1994, ISBN020115790X)A guide to LaTeXeHelmut Kopka and Patrick W.Daly (third edition, AddisonWesley, 1998, ISBN0201398257)The Companionby Michel Goossens, Frank Mittelbach, and Alexander Samarin (AddisonWesley, 1993, ISBN0201541998)The Graphics Companion: Illustrating documents with and PostScript by Michel Goossens, Sebastian Rahtz and Frank Mittelbach (AddisonWesley, 1997, ISBN0201854694)The Web Companion Integrating , HTML and XML by Michel Goossens and Sebastian Rahtz (AddisonWesley, 1999, ISBN0201433117) Unbound: and strategies for fonts, graphics, and more by Alan Hoenig (Oxford University Press, 1998, ISBN0195096851 hardback, ISBN019509686X paperback)Math into :A Simplified Introduction using AMSLaTeX by George Gratzer (Birkhauser, 1993, ISBN0817636374, or, in Germany, ISBN3764336374)Math into :An Introduction to and AMSLaTeX by George Gratzer (Birkhauser, 1996, ISBN0817638059)First Steps in by George Gratzer (Birkhauser, 1999, ISBN0817641327): Line by Line: Tips and Techniques for Document Processing by Antoni Diller (second edition, John Wiley Sons, 1999, ISBN047197918X) for Linux:A Vade Mecum by Bernice Sacks Lipkin (SpringerVerlag, 1999, ISBN0387987088, second printing) A list of errata for the first printing is available from: http://www.springer-ny.com/catalog/np/jan99np/0-387-98708-8.html A sample of George Gratzer's book, in Adobe Acrobat format, is also available (Href="ftp://ftp.tex.ac.uk/tex-archive/info/mil/mil.pdf"infomilmil.pdf)Example files for the Graphics and Web Companions are available in Href="ftp://ftp.tex.ac.uk/tex-archive/info/lgc"infolgc (Graphics) and Href="ftp://ftp.tex.ac.uk/tex-archive/info/lwc"infolwc (Web) Example files for George Gratzer's First Steps are available in Href="ftp://ftp.tex.ac.uk/tex-archive/info/FirstSteps"infoFirstStepsThe list for MF is rather short: The MFbookby Donald Knuth (Addison Wesley, 1986, ISBN0201134454, ISBN0201529831 paperback) Alan Hoenig's Unbound includes some discussion and examples of using MF This list only covers books in English: UKTUG cannot hope to maintain a list of books in languages other than our own 21Books on Type The following is a partial listing of books on typography in general Of these, Bringhurst seems to be the one most often recommended The Elements of Typographic Styleby Robert Bringhurst (Hartley Marks, 1992, ISBN0881790338)Finer Points in the Spacing Arrangement of Typeby Geoffrey Dowding (Hartley Marks, 1996, ISBN0881791199)The Thames Hudson Manual of Typographyby Ruari McLean (Thames Hudson, 1980, ISBN0500680221)The Form of the Bookby Jan Tschichold (Lund Humphries, 1991, ISBN0853316236)Type Layoutby Colin Wheildon (Strathmore Press, 1995, ISBN0962489158)The Design of Booksby Adrian Wilson (Chronicle Books, 1993, ISBN081180304X) There are many catalogues of type specimens but the following books provide a more interesting overall view of types in general and some of their history Alphabets Old Newby Lewis F.Day (Senate, 1995, ISBN1859581609)An Introduction to the History of Printing Typesby Geoffrey Dowding (British Library, 1998, UK ISBN0712345639; USA ISBN1884718442)The Alphabet Abecedariumby Richar A.Firmage (David R.Goodine, 1993, ISBN0879239980)The Alphabet and Elements of Letteringby Frederick Goudy (Dover, 1963, ISBN0486207927)Anatomy of a Typefaceby Alexander Lawson (David R.Goodine, 1990, ISBN0879233388)A Tally of Typesby Stanley Morison (David R.Goodine, 1999, ISBN1567920047)Counterpunchby Fred Smeijers (Hyphen, 1996, ISBN0907259065)Treasury of Alphabets and Letteringby Jan Tschichold (W.W.Norton, 1992, ISBN0393701972) The above lists are limited to books published in English. Typographic styles are somewhat languagedependent, and similarly the interesting fonts depend on the particular writing system involved 22Where to find this articleBobby Bodenheimer's article, from which the present one was developed, used to be posted (nominally monthly) to newsgroup comptexttex and crossposted to newsgroups newsanswers and companswers. The most recently posted copy of that article is kept on CTAN in directory Href="ftp://ftp.tex.ac.uk/tex-archive/obsolete/help"obsoletehelp; it is no longer kept in the newsanswers archives A version of the present article may be browsed via the WorldWide Web, at URL http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes; the sources of the article are available from Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/uktug-faq"usergrpsuktugfaqBoth the Francophone usergroup Gutenberg and the CzechSlovak usergroup CSTUG have published translations of this FAQ, with extensions appropriate to their languagesIn addition, the German usergroup Dante posts a FAQ in German to decomptex, which is archived as Href="ftp://ftp.tex.ac.uk/tex-archive/usergrps/dante-faq"usergrpsdantefaq, and MariePaule Kluth posts a FAQ in French to frcomptexttex, which is archived as Href="ftp://ftp.tex.ac.uk/tex-archive/help/LaTeX-FAQ-francaise"helpLaTeXFAQfrancaise 23Where to get helpFirst read any FAQ you can find (Which is what you're doing now, isn't it?) The tutorials and other online documentation can get you started but for more indepth understanding you should get and read at least one of the many good books on the subject (iref="Q-books"questionQ-books). The definitive source for AllTeX is the source code itself, but that is not something to be approached lightly (if at all) If you are seeking a particular package or program, look on your own system first: you might already have it If you have access to the internet, and in particular newsgroups, then AllTeX discussions, including MF and MP, are on comptexttex It is best to spend a little time familiarising yourself with the current threads before asking a question. The group is normally very responsive but asking a question that has just been answered is likely to dampen people's enthusiasm to help you. In case you are not familiar with some of the abbreviations used in newsgroup postings, RTFMThe F stands for Fill in the blank stands for Read The Manual, and you don't really want to get that response, do you http://www.deja.com/usenet makes a good job of archiving Usenet news discussions, and comptexttex may be found there If your internet access doesn't include direct access to Usenet news, you can participate in discussions via DejaThe few people who can't use the World Wide Web, can't access Usenet news, but can use electronic mail can seek help through mailing listsThe hax digest is operated as a mailing list Send a message subscribe texhax to texhaxrequesttexacuk to join it Its turnaround is not rapid, but questions submitted to it do eventually get answeredMany mailing lists exist that cover some small part of the arena A good source of pointers is http://www.tug.org/ Announcements of related installations on the CTAN archives are sent to the mailing list ctanann Subscribe to the list by sending a message subscribectanannyour name' to listservurzUniHeidelbergdeIssues related to MF (and, increasingly, MP) are discussed on the metafont mailing list; subscribe by sending a message subscribemetafontyour name to listservensfrSeveral other related lists may be accessed via listservurzuniheidelbergde Send a message containing the line help to this address. 24AllTeX TutorialsSome very fine tutorials have been written, over the years Michael Doob's splendid Gentle Introduction to plain has been stable for a very long time See Href="ftp://ftp.tex.ac.uk/tex-archive/info/gentle/gentle.pdf"infogentlegentle.pdfMore dynamic is Tobias Oetiker's (Not so) Short Introduction to LaTeXe, which is regularly updated, as people suggest better ways of explaining things, etc See Href="ftp://ftp.tex.ac.uk/tex-archive/info/lshort/english/lshort.pdf"infolshortenglishlshort.pdfA recent entrant is Harvey Greenberg's Simplified Introduction to ; this was written for a lecture course, and is available (PostScript only, unfortunately) as Href="ftp://ftp.tex.ac.uk/tex-archive/info/simplified-latex/latex.ps"infosimplifiedlatexlatex.ps 25MF and MP Tutorials Unfortunately there appear to be no tutorials on how to use either MF or MP, except for the information provided by their respective authors. There are, though, a couple of articles on how to run the programs.Geoffrey Tobin has provided MF for Beginners which is available as Href="ftp://ftp.tex.ac.uk/tex-archive/info/metafont-for-beginners.tex"infometafontforbeginners.tex (iref="Q-mf"questionQ-mf). This describes how the MF system works and how to avoid some of the potential pitfalls Peter Wilson's Some Experiences in Running MF and MP is available at Href="ftp://ftp.tex.ac.uk/tex-archive/info/metafp.ps"infometafp.ps (PostScript) or Href="ftp://ftp.tex.ac.uk/tex-archive/info/metafp.pdf"infometafp.pdf (PDF format). On the MF side the article is more geared towards testing and installing new MF fonts than on the system, while on the other side it describes how to use MP illustrations in and PDF documents, with an emphasis on how to use appropriate fonts for any text or mathematics 26BibTeX DocumentationBibTeX, a program originally designed to produce bibliographies in conjunction with , is explained in Section 4.3 and Appendix B of Leslie Lamport's manual (see iref="Q-books"questionQ-books) The document BibTeXing, contained in the file btxdoctex, gives a more complete description The Companion (see iref="Q-books"questionQ-books) also has information on BibTeX and writing BibTeX style filesThe document Designing BibTeX Styles, contained in the file btxhaktex, explains the postfix stackbased language used to write BibTeX styles (bst files). The file btxbstdoc is the template for the four standard styles (plain, abbrv, alpha, unsrt). It also contains their documentation The complete BibTeX documentation set (including the files above) is in Href="ftp://ftp.tex.ac.uk/tex-archive/support/lsedit/bibtex-doc"supportlseditbibtexdocThere is a Unix BibTeX man page in the web2c package (see iref="TeX-systems"questionTeX-systems) Any copy you may find of a man page written in 1985 (before BibTeXing and Designing BibTeX Styles appeared) is obsolete, and should be thrown away 27The PiCTeX manualPiCTeX is a set of macros by Michael Wichura for drawing diagrams and pictures. The macros are freely available in Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/pictex"graphicspictex; however, the PiCTeX manual itself is not free Unfortunately, TUG is no longer able to supply copies of the manual (as it once did), and it is now available only through Personal Inc, the vendors of PC (http://www.pctex.com/) The manual is not available electronically 28Finding AllTeX macro packagesBefore you ask for a macro or class or package file to do something, try searching Graham Williams' catalogue, available as Href="ftp://ftp.tex.ac.uk/tex-archive/help/Catalogue/catalogue.html"helpCataloguecatalogue.html, or for efficient interactive searching via http://www.tex.ac.uk/tex-archive/help/Catalogue/catalogue.html; this lists many macro packages together with brief descriptive textsHaving learnt of a file that seems interesting, search a CTAN archive for it (see iref="siteindex"questionsiteindex). For packages listed in The Companion ( iref="Q-books"questionQ-books), the file Href="ftp://ftp.tex.ac.uk/tex-archive/info/companion.ctan"infocompanion.ctan may be consulted as an alternative to searching the archive's index. It lists the current location in the archive of such files 29Finding files in the CTAN archivesTo find software at a CTAN site, you can use anonymous ftp to the host with the command quote site index term, or the searching script at http://www.dante.de/cgi-bin/ctan-indexTo get the best use out of the ftp facility you should remember that term is a Regular Expression and not a fixed string, and also that many files are distributed in source form with an extension different to the final file. (For example packages are often distributed sources with extension dtx rather than as package files with extension sty.)One should make the regular expresion general enough to find the file you are looking for, but not too general, as the ftp interface will only return the first 20 lines that match your requestThe following examples illustrate these points To search for the package caption, you might use the command: quotesiteindexcaptionsty but it will fail to find the desired package (which is distributed as captiondtx) and does return unwanted hits (such as hangcaptionsty) Also, although this example does not show it the in captionsty is used as the regular expression that matches any character So quotesiteindexdocsty matches such unwanted files as languageswedishslatexdoc2stymakefileOf course if you know the package is stored as dtx you can search for that name, but in general you may not know the extension used on the archive The solution is to add to the front of the package name and to the end. This will then search for a file name that consists solely of the package name between the directory separator and the extension. The two commands: quotesiteindexcaptionquotesiteindexdoc do narrow the search down sufficiently. (In the case of doc, a few extra files are found, but the list returned is sufficiently small to be easily inspected.)If the search string is too wide and too many files would match, the list will be truncated to the first 20 items found. Using some knowledge of the CTAN directory tree you can usually narrow the search sufficiently. As an example suppose you wanted to find a copy of the dvips driver for MSDOS. You might use the command: quotesiteindexdvips but the result would be a truncated list, not including the file you want. (If this list were not truncated 412 items would be returned) However we can restrict the search to MSDOS related drivers as follows quotesiteindexmsdosdvips Which just returns relevant lines such as systemsmsdosdviwaredvipsdvips5528zipA basic introduction to searching with regular expressions is: itemsep=0.5itemsepMost charcters match themselves, so a matches a etc.; matches any character;abcDF matches any single character from the set a,b,c,D,E,F; placed after an expression matches zero or more occurrences so a matches a and aaaa, and azAZ matches a word; quotes a special character such as so just matches ; matches the beginning of a line; matches the end of a lineFor technical reasons in the quote site index command, you need to double any hence the string caption in the above example The quote site command ignores the case of letters Searching for caption or CAPTION would produce the same result
Part DBits and pieces of 30What is a DVI file?A DVI file (that is, a file with the type or extension dvi) is 's main output file, using in its broadest sense to include , etc DVI is supposed to be an acronym for DeViceIndependent, meaning that the file can be printed on almost any kind of typographic output device The DVI file is designed to be read by a driver (iref="Q-driver"questionQ-driver) to produce further output designed specifically for a particular printer (e.g., a LaserJet) or to be used as input to a previewer for display on a computer screen DVI files use 's internal coding; a input file should produce the same DVI file regardless of which implementation of is used to produce itA DVI file contains all the information that is needed for printing or previewing except for the actual bitmaps or outlines of fonts, and possibly material to be introduced by means of special commands (iref="Q-specials"questionQ-specials) The canonical reference for the structure of a DVI file is the source of dvitype (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/knuth/texware/dvitype.web"systemsknuthtexwaredvitype.web) 31What is a driver?A driver is a program that takes as input a dvi file (iref="Q-dvi"questionQ-dvi) and (usually) produces a file that can be sent to a typographic output device, called a printer for shortA driver will usually be specific to a particular printer, although any PostScript printer ought to be able to print the output from a PostScript driver As well as the DVI file, the driver needs font information Font information may be held as bitmaps or as outlines, or simply as a set of pointers into the fonts that the printer itself has Each driver will expect the font information in a particular form For more information on the forms of fonts, see questions iref="Q-pk"Q-pk, iref="Q-tfm"Q-tfm, iref="virtualfonts"virtualfonts and iref="Q-usepsfont"Q-usepsfont 32What are PK files?PK files (packed raster) contain font bitmaps. The output from MF (iref="Q-mf"questionQ-mf) includes a generic font (GF) file and the utility gftopk produces the PK file from that There are a lot of PK files, as one is needed for each font, that is each magnification (size) of each design (point) size for each weight for each family Further, since the PK files for one printer do not necessarily work well for another, the whole set needs to be duplicated for each printer type at a site As a result, they are often held in an elaborate directory structure, or in font library files, to regularise access 33What are TFM files?TFM stands for font metrics, and TFM files hold information about the sizes of the characters of the font in question, and about ligatures and kerns within that font One TFM file is needed for each font used by , that is for each design (point) size for each weight for each family; one TFM file serves for all magnifications, so that there are (typically) fewer TFM files than there are PK files The important point is that TFM files are used by (, etc.), but are not, generally, needed by the printer driver 34Virtual fontsVirtual fonts for were first implemented by David Fuchs in the early days of , but for most people they started when Knuth redefined the format, and wrote some support software, in 1989 Virtual fonts provide a way of telling about something more complicated than just a onetoone character mapping. The entities you define in a virtual font look like characters to (they appear with their sizes in a font metric file), but the DVI processor may expand them to something quite different. You can use this facility just to remap characters, to make a composite font with glyphs drawn from several sources, or to build up an effect in arbitrarily complicated ways a virtual font may contain anything which is legal in a DVI file In practice, the most common use of virtual fonts is to remap PostScript fonts (see iref="Q-metrics"questionQ-metrics) or to build fake maths fontsIt is important to realise that itself does not see virtual fonts; for every virtual font read by the DVI driver there is a corresponding TFM file read by . Virtual fonts are normally created in a single ASCII vpl (Virtual Property List) file, which includes both sets of information. The vptovf program is then used to the create the binary TFM and VF files The commonest way (nowadays) of generating vpl files is to use the fontinst package, which is described in detail iref="Q-metrics"in questionQ-metrics Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/utilities/qdtexvpl"fontsutilitiesqdtexvpl is another utility for creating adhoc virtual fonts 35special commands provides the means to express things that device drivers can do, but about which itself knows nothing For example, itself knows nothing about how to include PostScript figures into documents, or how to set the colour of printed text; but some device drivers doSuch things are introduced to your document by means of special commands; all that does with these commands is to expand their arguments and then pass the command to the DVI file In most cases, there are macro packages provided (often with the driver) that provide a comprehensible interface to the special; for example, there's little point including a figure if you leave no gap for it in your text, and changing colour proves to be a particularly fraught operation that requires real wizardry. LaTeXe has standard graphics and colour packages that make file inclusion, rotation, scaling and colour via specials all easyThe allowable arguments of special depend on the device driver you're using Apart from the examples above, there are special commands in the em drivers (e.g., dvihplj, dviscr, etc.)that will draw lines at arbitrary orientations, and commands in dvitoln03 that permit the page to be set in landscape orientation 36Documented sources (.dtx files)LaTeXe, and many support macro packages, are now written in a literate programming style (iref="Q-lit"questionQ-lit), with source and documentation in the same file This format, known as doc, was originated by Frank Mittelbach. The documented sources conventionally have the suffix .dtx, and should normally be stripped of documentation before use with Alternatively you can run on a .dtx file to produce a nicely formatted version of the documented code. An installation script (with suffix .ins) is usually provided, which needs the standard LaTeXe docstrip package (among other things, the installation process strips all the comments that make up the documentation for speed when loading the file into a running system) Several packages can be included in one .dtx file, with conditional sections, and there facilities for indices of macros etc Anyone can write .dtx files; the format is explained in The Companion (see iref="Q-books"questionQ-books). There are no programs yet to assist in composition.dtx files are not used by after they have been processed to produce .sty or .cls (or whatever) files They need not be kept with the working system; however, for many packages the .dtx file is the primary source of documentation, so you may want to keep .dtx files elsewhere 37What are the EC fonts?A font consists of a number of glyphs In order that the glyphs may be printed, there has to be some way of accessing them; in they're arranged in a numerical order called an encoding, and their number in the encoding is used For various reasons, Knuth chose rather eccentric encodings; in particular, he chose different encodings for different fontsWhen version 3 arrived, some at least of the reasons for the eccentricity of Knuth's encodings went away, and at TUG's Cork meeting, an encoding for a set of 256 glyphs, for use in text, was defined The intention was that these glyphs should cover most European languages, in the sense of including all accented letters needed (Knuth's CMR fonts missed things necessary for Icelandic, Polish and Sami, for example, but the Cork fonts have them.) LaTeXe (iref="latex2e"questionlatex2e) refers to the Cork encoding as T1, and provides the means to use fonts thus encoded to avoid problems with the interaction of accents and hyphenation (see iref="hyphenated-accents"questionhyphenated-accents) The only MFfonts that conform to the Cork encoding are the EC fonts (available as Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/ec"fontsec) They look CMlike, and are now regarded as stable (in the same sense that the CM fonts are stable: their metrics are unlikely ever to change) Their serious disadvantage for the casual user is that they are large each EC font is roughly twice the size of the corresponding CM font; what's more, until corresponding fonts for mathematics are produced, the CM fonts must be retainedThe EC fonts supersede the experimental DC fonts, which have now been removed from the archives They are distributed with a set of Text Companion (TC) fonts that provide glyphs for symbols commonly used in text The TC fonts are encoded according to the TS1 encoding, and are not viewed as stable in the same way as are the EC fonts areThe Cork encoding is also implemented by the PSNFSS system (iref="Q-usepsfont"questionQ-usepsfont), for PostScript fonts 38What is TDS? TDS stands for the Directory Structure, which is a standard way of organising all the related files on a computer system. The TDS specification can be found on CTAN in Href="ftp://ftp.tex.ac.uk/tex-archive/tds/draft-standard/tds-0.9996"tdsdraftstandardtds0.9996 Most modern distributions conform to the TDS, which provides for both a standard hierarchy and a local hierarchy. The TDS reserves the name texmf as the name of the root directory (folder) of the hierachies Files supplied as part of the distribution are put into the standard hierarchy. The location of the standard hierarchy is system dependent, but on a Unix system it might be at usrlocaltexmf, or usrlocalsharetexmf, or opttexmf, or a similar location, but in each case the files will be under the texmf subdirectory. There can be multiple local hierarchies in which additional files can be put. In the extreme an installation can have a local hierarchy and each user can also have an individual local hierarchy. The location of any local hierarchy is not only system dependent but also user dependent. Again, though, all files should be put under a local texmf directory
Part EAcquiring the Software39Repositories of materialTo aid the archiving and retrieval of of related files, a TUG working group developed the Comprehensive Archive Network (CTAN) Each CTAN site has identical material, and maintains authoritative versions of its material These collections are extensive; in particular, almost everything mentioned in this article is archived at the CTAN sites, even if its location isn't explicitly statedThe CTAN sites are currently dantectanorg (Mainz, Germany), camctanorg (Cambridge, UK) and tugctanorg (Colchester, Vermont, USA) Two of the CTAN web servers offer a search facility: http://www.tex.ac.uk/search and http://www.ctan.org/search; you can look for a file whose name you already know, or you can do a keywordbased search of the catalogue The search script requires that you choose an appropriate CTAN site or mirror to retrieve files from, and stores details of that site in a cookie on your machine Choose a site that is close to you, to reduce network loadThe organisation of files on all CTAN sites is identical and starts at texarchive Again, to reduce network load, please use the CTAN site or mirror closest to you A complete and current list of CTAN sites and known mirrors can be obtained by using the finger utility on user ctancamctanorg, ctandantectanorg or ctantugctanorg; it is also available as file Href="ftp://ftp.tex.ac.uk/tex-archive/CTAN.sites"CTAN.sitesTo find software at a CTAN site using anonymous ftp to the host, execute the command quote site index term (see iref="siteindex"questionsiteindex for details)The email servers ftpmaildantectanorg and ftpmailtugctanorg provide an ftplike interface through mail Send a message containing just the line help to your nearest server, for details of use There is also the DECUS collection of material for VMS, Unix, MSDOS, and the Macintosh It is available via anonymous ftp from wuarchivewustledu (128.252.135.4) in decustex It can also be obtained from the DECUS Library (reference number VS0058) in the US, or through your DECUS office outside of the US. To contact the DECUS Library, send mail or telephone: DECUSLIBRARY ORDER PROCESSING334 South Street, SHR31T25Shrewsbury, MA 015454195USA Tel: 800DECUS55 (within the USA, for information)Fax: 1 5088413373 (for inquiries) or send electronic mail for information to the DECUS Collection Editor, Ted Nieland (nielandtedhcstcom) Finally, of course, the user who has no access to any sort of network may buy a copy of the archive on CDROM (see iref="Q-CD"questionQ-CD) 40What's the CTAN nonfree tree?The CTAN archives are currently restructuring their holdings so that files that are not free are held in a separate tree The definition of what is free (for this purpose) is influenced by, but not exactly the same as the Debian Free Software Guidelines (DFSG: see href="http://www.debian.org/socialcontractguidelines"The Debian Social Contract) Material is placed on the nonfree tree if it is not freelyusable (e.g., if the material is shareware, commercial, or if its usage is not permitted in certain domains at all, or without payment) Users of the archive should check that they are entitled to use material they have retrieved from the nonfree treeFor details of the licence categories, see http://www.tex.ac.uk/tex-archive/help/Catalogue/licenses.html 41Contributing a file to the archivesUse anonymous ftp to any CTAN archive (see iref="Q-archives"questionQ-archives) and retrieve the file Href="ftp://ftp.tex.ac.uk/tex-archive/README.uploads"README.uploads in the root directory. It contains instructions for uploading files and notifying the appropriate people for that siteIf you cannot use ftp, mail your contribution to ctanurzUniHeidelbergde and it will be passed along You will make everyone's life easier if you choose a descriptive and unique name for your submission, so it's probably a good idea to check that your style file's name is not already in use by means of the site index command (iref="siteindex"questionsiteindex) 42Finding new fontsA comprehensive list of MF fonts is posted to compfonts and to comptexttex, roughly every six weeks, by Lee Quin (leesqsqcom); it is available as Href="ftp://ftp.tex.ac.uk/tex-archive/info/metafont-list"infometafontlistThe list contains details both of commercial fonts and of fonts available via anonymous ftp. Most of the fonts are available via anonymous ftp from the CTAN archives (see iref="Q-archives"questionQ-archives) 43 CDROMsIf you don't have access to the Internet, there are obvious attractions to collections on a CDROM Even those with net access will find large quantities of related files to hand a great convenience Readytorun systems on CDROM are available: A consortium of User Groups (notably TUG, UKTUG and GUTenberg) distribute the Live CDROM, now in its third edition All members of several User Groups are receiving copies, and additional copies may be purchased, for example, from UKTUG for 25, including an edition of Baskerville which serves as a manual Online details of Live are available at http://www.tug.org/texlive.htmlThe Dutch Users Group (NTG) publish the whole 4All workbench on a 2CDROM set packed with all the MSDOS software, macros and fonts you can want. It is available from NTG direct (see iref="Q-othergroups"questionQ-othergroups), from TUG for 40 and from UKTUG for 30 (a manual is included). It is a useful resource for anyone to browse, not just for MSDOS usersAn alternative to the readytorun system is the CTAN archive snapshot; in general one would expect that such systems would be harder to use, but that the volume of resources offered would balance this extra inconvenienceWalnut Creek CDROM provide a twodisc CDROM set, holding 1000Mb of related material Information about the CDROM is available at http://www.cdrom.com/titles/prog/tex.html, which also has a link to an ordering page Walnut Creek's address, etc., are: Walnut Creek CDROM4041 Pike Lane, Ste DwwwConcord, CA 94520USATel: 1 510 6740783 or 800 7869907 (within the USA and Canada)Fax: 1 510 6740821Email: infocdromcom (for questions) and orderscdromcom (for orders) Walnut Creek (who run one of the major CTAN mirrors) are rumoured to be producing a new release of their disc set in 1997Prime Time Freeware produced cetera 1.1 in July 1994, which was a snapshot of CTAN taken in June 1994 Regular updates were planned (but have not apparently been forthcoming) The material is all compressed in ZIP format to fit it all on one CD, and to avoid the limitations of the ISO9660 file system directory. You can buy the CD from: Prime Time Freeware370 Altair Way, Suite 150Sunnyvale CA 94086USATel: 1 408 433 9662Fax: 1 408 433 0727Email: ptfcfclcom or from many CDROM resellers, or the iref="Q-TUG"questionQ-TUG office Price will be around 60. Please note that PTF is not a big commercial firm, and is a good friend of the community
Part F Systems44AllTeX for different machinesWe list here the free or shareware packages; see iref="Q-commercial"questionQ-commercial for details of commercial packages UnixInstructions for retrieving the Unix distribution via anonymous ftp are available in the document Href="ftp://ftp.tex.ac.uk/tex-archive/systems/unix/unixtex.ftp"systemsunixunixtex.ftp, though nowadays the sensible installer will take (and possibly customise) one of the packaged distributions such as te , or the Live CDROM (see iref="Q-CD"questionQ-CD) For te, browse Href="ftp://ftp.tex.ac.uk/tex-archive/systems/unix/teTeX/1.0/distrib/sources"systemsunixteTeX1.0distribsources for relevant files: you need at most one each of the targz files for teTeXsrc, teTeXtexmf and teTeXtexmfsrc Sets of binaries for many common Unix systems are to be found as part of the te distribution, or on the Live CDROM For te binaries, browse Href="ftp://ftp.tex.ac.uk/tex-archive/systems/unix/teTeX/1.0/distrib/sources-bin"systemsunixteTeX1.0distribsourcesbin there's a compressed tar archive for each supported architecture in the directory In default of a precompiled version, te will compile on most Unix systems, though it was originally developed for use under Linux (see below) LinuxThere are at least two respectable implementations of to run on Linux, N (available as Href="ftp://ftp.tex.ac.uk/tex-archive/systems/unix/linux/ntex"systemsunixlinuxntex) and te (browse Href="ftp://ftp.tex.ac.uk/tex-archive/systems/unix/teTeX/1.0/distrib/sources"systemsunixteTeX1.0distribsources) Beware the Slackware '96 CDROM distribution of N: it includes a version of the CM fonts that has deeply offended Don Knuth (since it contravenes his distribution conditions) The Slackware updates now offer te, as do most Linux distributions PCThe em package for PCs running OS2, MSDOS or Windows includes , BibTeX, previewers, and drivers, and is available in Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/emtex"systemsmsdosemtex as a series of zip archives The package was written by Eberhard Mattes, and documentation is available in both German and English Appropriate memory managers for using em with 386 (and better) processors and under Windows, are included in the distribution The most recent offering is an MSDOS port of the Web2C7.0 implementation, using the GNU djgpp compiler It is available from Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/djgpp"systemsmsdosdjgpp PC: Win32fp, by Fabrice Popineau, is a version of te for Windows systems As such, it is particularly attractive to those who need to switch back and forth between Windows and Unix environments, and to administrators who need to maintain both (fp can use the same texmf tree as a te installation) fp's previewer (Windvi) is based on xdvi, and takes advantage of extra facilities in the Win32 environment Printing is available via dvips only fp is available from Href="ftp://ftp.tex.ac.uk/tex-archive/systems/win32/fptex"systemswin32fptex Mik, by Christian Schenk, is also a comprehensive distribution, developed separately from the te work It has its own previewer, YAP, which is itself capable of printing, though the distribution also includes a port of dvips The current version is in Href="ftp://ftp.tex.ac.uk/tex-archive/systems/win32/miktex"systemswin32miktex Windows NT, other platformsA Power PC port of Mik is available from Href="ftp://ftp.tex.ac.uk/tex-archive/systems/win32/miktexppc"systemswin32miktexppc, and an AXP port is available from Href="ftp://ftp.tex.ac.uk/tex-archive/systems/win32/miktex-AXP"systemswin32miktexAXP; these versions have not been updated for version1.2 (and later) of Mik they may not be satisfactory MacOz is a shareware version of for the Macintosh. A DVI previewer and PostScript driver are also included. It should run on any Macintosh Plus, SE, II, or newer model, but will not work on a 128K or 512K Mac. It was written by Andrew Trevorrow, and is available in Href="ftp://ftp.tex.ac.uk/tex-archive/nonfree/systems/mac/oztex"nonfreesystemsmacoztex UKTUG prepays the shareware fee, so that its members may acquire the software without further payment Questions about Oz may be directed to oztexmidwayuchicagoedu Another partly shareware program is CMac (available as Href="ftp://ftp.tex.ac.uk/tex-archive/systems/mac/cmactex"systemsmaccmactex), put together by Tom Kiffe. This is much closer to the Unix setup (it uses dvips, for instance) CMac includes a port of the latest version of Omega (iref="Q-omega"questionQ-omega) A useful resource for Mac users is to be found at http://www.esm.psu.edu/mac-tex/; it has a news and help section, as well as details of systems and tools OpenVMS for OpenVMS is available as Href="ftp://ftp.tex.ac.uk/tex-archive/systems/OpenVMS/TEX97CTAN.ZIP"systemsOpenVMSTEX97CTAN.ZIP Standard tape distribution is through DECUS (see iref="Q-archives"questionQ-archives) Atari is available for the Atari ST in Href="ftp://ftp.tex.ac.uk/tex-archive/systems/atari"systemsatari If anonymous ftp is not available to you, send a message containing the line help to atariatariarchiveumichedu AmigaFull implementations of 3.1 (Pas) and MF 2.7 are available in Href="ftp://ftp.tex.ac.uk/tex-archive/systems/amiga"systemsamiga You can also order a CDROM containing this and other Amiga software from Walnut Creek CDROM, telephone 1 5109475997 TOPS20 was originally written on a DEC10 under WAITS, and so was easily ported to TOPS20. A distribution that runs on TOPS20 is available via anonymous ftp from ftpmathutahedu (128.110.198.34) in pubtexpubweb 45friendly editors and shellsThere are good writing environments and editors for most operating systems; some are described below, but this is only a personal selection: UnixTry GNUemacs, and the AUC mode (Href="ftp://ftp.tex.ac.uk/tex-archive/support/auctex"supportauctex) This provides menu items and control sequences for common constructs, checks syntax, lays out markup nicely, lets you call and drivers from within the editor, and everything else like this that you can think of Complex, but very powerfulVMSAn lsedit mode for editing source is available from TUG (iref="Q-TUG"questionQ-TUG) as niques 1, VAX LanguageSensitive Editor, by Kent MacPherson (1985)MSDOSThere are several choices: The (shareware) 4All workbench (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/4alltex"systemsmsdos4alltex) provides a very comprehensive environment written in 4DOS which lets you access most related software in a friendly way. You can choose your own editor; something such as QEdit or Brief is suitable. This whole package is available in easytouse form on CDROM from user groups shell (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/texshell"systemsmsdostexshell) is a simpler, easilycustomisable environment, which can be used with the editor of your choice Eddi4 (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/e4t"systemsmsdose4t; also shareware) is a speciallywritten editor which features intelligent colouring, bracket matching, syntax checking, online help and the ability to call programs from within the editor. It is highly customisable, and features a powerful macro language You can also use GNUemacs and AUC under MSDOSWindows 3.1Your best public domain bet is probably to use MicroEmacs as an editor and control centre for programs telmExtel (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/emtex-contrib/TeXtelmExtel"systemsmsdosemtexcontribTeXtelmExtel) is a Shell for em or W and related tools under Windows It includes a simple multipledocument editor, a builtin spelling checker, automatic OEMANSI character conversion, userdefinable pointandclick Templates, support for the forward and inverse search mechanism of DVI driver for Windows and for automatic font generation Besides the predefined tools, up to 10 userdefined tools can be set up On a PC with large enough memory, a version of GNUemacs, that will run under Windows, is available; thus you can also use AUC under Windows YY's commercial (and highquality) Windows previewer, dviwindo, can be used as a good shell, calling programs such as , drivers, and editors (YY supply the public domain PE, and recommend the commercial Epsilon) from customisable menus (see iref="Q-commercial"questionQ-commercial for details of YY) Scientific Word is a WYSIWYG editing program, strong on maths, which uses for output (see iref="Q-commercial"questionQ-commercial for contact address)Windows '9x, NTWinedt, a shareware package (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/win32/winedt/winedt32.exe"systemswin32winedtwinedt32.exe), is highly spoken of It provides a shell for the use of tex and related programs, as well as a powerful and wellconfigured editorOS2Eddi4 works under OS2; look also at Href="ftp://ftp.tex.ac.uk/tex-archive/systems/os2/epmtex"systemsos2epmtex for a specific OS2 shellMacintoshThe commercial Textures provides an excellent integrated Macintosh environment with its own editor More powerful still (as an editor) is the shareware Alpha (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/mac/support/alpha"systemsmacsupportalpha) which is extensible enough to let you perform almost any related job. It works well with Oz Atari, Amiga and NeXT users also have nice environments. users who like make should try Href="ftp://ftp.tex.ac.uk/tex-archive/support/latexmk"supportlatexmkThere is another set of shell programs to help you manipulate BibTeX databases 46Commercial implementationsThere are many commercial implementations of . The first appeared not long after itself appeared. Of the vendors, ArborText (formerly Textset) and Personal are those who have survived longest (since the mid or early 80s)What follows is probably an incomplete list Naturally, no warranty or fitness for purpose is implied by the inclusion of any vendor in this list The source of the information is given to provide some clues to its currencyIn general, a commercial implementation will come complete, that is, with suitable previewers and printer drivers They normally also have extensive documentation (i.e., not just the book) and some sort of support service In some cases this is a toll free number (probably applicable only within the USA and or Canada), but others also have email, and normal telephone and fax support Unix; Silicon Graphics IrisIndigo, Solaris 2.1, IBM RS6000, DECRISCUltrix, HP 9000. Complete packages. Ready to use, fully documented and supported. ArborText Inc1000 Victors WaySuite 400Ann Arbor MI 48108USA Tel: 1 3139963566Fax: 1 3139963573 Source: TUGboat 15(1) (1994)VAXVMS; Convergent Complete system for VAXVMS machines (a version for Alphas is in preparation); includes , multinational typesetting support, MF and Web Northlake Software, Inc.812 SW Washington, Ste 1100Portland, OR 97201USA Tel: 1 5032283383Fax: 1 5032285662Email: raunlscom Source: Email from Pat Rau, November 1994 PC; TrueRuns on Windows3.1, WindowNT and Windows95 Richard J. KinchTrueTeX Software6994 Pebble Beach CourtLake Worth FL 33467USA Tel: 1 5619668400Fax: 1 3056446978Email: kinchtruetexcomWeb: http://truetex.com/ Source: News posting from Richard Kinch, October 1997, updated from new web page PC; Bitmap free for Windows. YY, Inc.45 Walden StreetConcord MA 01742USA Tel: 8007424059 (within the USA)Tel: 1 5083713286Fax: 1 5083712004Email: saleshelpYandYcom and techhelpYandYcomWeb: http://www.YandY.com/ Source: YY announcement, February 1995 pcLongestablished: pc32 is a Windows implementation Personal Inc12 Madrona StreetMill Valley, CA 94941USA Tel: 8008087906 (within the USA)Fax: 1 4153888865Email: texsalespctexcom and texsupppctexcomWeb: http://www.pctex.com/ Source: Mail from Personal Inc, September 1997 PC; VDVI, PDF and HTML backends, Visual Tools and Type 1 fonts MicroPress Inc6830 Harrow StreetForest Hills, NY 11375USA Tel: 1 7185751816Fax: 1 7185758038Email: supportmicropressinccomWeb: http://www.micropress-inc.com/ Source: Mail from MicroPress, Inc., July 1999 PC; Scientific WordScientific Word and Scientific Workplace offer a mechanism for nearWYSIWYG input of documents; they ship with True from Kinch (see above) Queries within the UK and Ireland should be addressed to Scientific Word Ltd., others should be addressed directly to the publisher, MacKichan Software Inc Dr Christopher MabbScientific Word Ltd.49 Queen StreetPeterheadAberdeenshire, AB42 1TUUK Tel: 0845 7660340 (within the UK)Tel: 44 1779 490500Fax: 01779 490600 (within the UK)Email: christophersciworddemoncoukWeb: http://www.sciword.demon.co.uk MacKichan Software Inc.600 Ericksen Ave.NE, Suite 300Bainbridge Island WA 98110USA Tel: 1 206 7802799Fax: 1 206 7802857Email: infomackichancomWeb: http://www.mackichan.com Source: Mail from Christopher Mabb, May 1999 Macintosh; TexturesA system for the rest of us; also gives away a MF implementation and some font manipulation tools Blue Sky Research534 SW Third AvenuePortland, OR 97204USA Tel: 8006228398 (within the USA)Tel: 1 5032229571Fax: 1 5032221643Email: salesblueskycomWeb: http://www.bluesky.com/ Source: TUGboat 15(1) (1994) AmigaA full implementation for the Commodore Amiga, including full, onscreen and printing support for all PostScript graphics and fonts, IFF raster graphics, automatic font generation, and all of the standard macros and utilities Radical Eye SoftwarePO Box 2081Stanford, CA 94309USA Source: Mail from Tom Rokicki, November 1994
Part GDVI Drivers and Previewers47DVI to PostScript conversion programsThe best public domain DVI to PostScript conversion program which runs under many operating systems is Tom Rokicki's dvips dvips is written in C and ports easily to other operating systems; it is available as Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dvips"dviwaredvipsVMS versions are available through the DECUS library (see iref="Q-archives"questionQ-archives), and also as part of the CTAN distribution of for VMS (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/OpenVMS/TEX97CTAN.ZIP"systemsOpenVMSTEX97CTAN.ZIP)A precompiled version for MSDOS is available from Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/dviware/dvips"systemsmsdosdviwaredvipsKarl Berry's version of dvips (called dvipsk) has a configure script and path searching code similar to that in his other programs (e.g., web2c); it is available from Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dvipsk"dviwaredvipskAnother good portable program is dvitops by James Clark, which is also written in C and will compile under Unix, MSDOS, VMS, and Primos; however, it does not support virtual fonts It is available from Href="ftp://ftp.tex.ac.uk/tex-archive/obsolete/dviware/dvitops"obsoletedviwaredvitopsMacintosh users can use either the excellent drivers built into Oz or Textures, or a port of dvips in the CMac package 48DVI drivers for HP LaserJetThe em package (see iref="TeX-systems"questionTeX-systems) contains a driver for the LaserJet, dvihpljVersion 2.10 of the Beebe drivers supports the LaserJet. These drivers will compile under Unix, VMS, and on the Atari ST and DEC20's, and are available from Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/beebe"dviwarebeebeKarl Berry's dviljk, which has the same pathsearching code as his dvipsk (see iref="Q-dvips"questionQ-dvips), is available in Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dviljk"dviwaredviljk 49DVI previewersEm for PCs running MSDOS or OS2, Mik and fp for PCs running Windows and Oz for the Macintosh, all come with previewers that can be used on those platforms. Em's previewer can also be run under Windows3.1, as can the public domain Windows previewer dviwin (Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dviwin"dviwaredviwin)Commercial PC packages (see iref="Q-commercial"questionQ-commercial) have good previewers for PCs running Windows, or for MacintoshesFor Unix systems, there is one canonical viewer, xdvi The basic distribution is available as Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/xdvi"dviwarexdvi, and a version integrated with the current state of web2c is available from Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/xdvik"dviwarexdvik; Unix distributions (such as te or N include a version of xdvik which is compatible with the version of web2c that they useAlternatives to previewing include conversion to similar ASCII text (using Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dvi2tty"dviwaredvi2tty or something of the sort) and using a conventional text viewer to look at that,generating a PostScript version of your document and viewing it with a ghostscript previewer, andgenerating PDF output, and viewing that with AcrobatReader or one of the substitutes for that
Part HSupport Packages for 50Fig, a friendly drawing packageXFig is a menu driven tool that allows you to draw objects on the screen of an X workstation transfig is a set of tools which translate the code fig produces to other graphics languages including PostScript and the picture environment. They are available in Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/xfig"graphicsxfig and Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/transfig"graphicstransfigFig is supported by Micah Beck (beckcscornelledu) and transfig is maintained by Brian Smith (bvsmithlblgov). Another tool for fig conversion is fig2mf which generates MF code from fig input. It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/fig2mf"graphicsfig2mf 51CAD, a drawing package for CAD is a program for the PC which enables the user to draw diagrams on screen using a mouse or arrow keys, with an onscreen menu of available pictureelements. Its output is code for the picture environment Optionally, it can be set to include lines at all angles using the em driverfamily specials (iref="Q-specials"questionQ-specials) CAD is part of the em distributionA Unix port of the program exists, Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/xtexcad/xtexcad-2.4.tar.gz"graphicsxtexcadxtexcad2.4.tar.gz 52Spelling checkers for work with For Unix, ispell is probably the program of choice. Browse Href="ftp://ftp.tex.ac.uk/tex-archive/support/ispell"supportispell for a version, but beware of any with a number 4x such versions represent a divergent version of the source which lacks many useful facilities of the 3x seriesFor MSDOS, there are several programs. amspell can be called from within an editor (available as Href="ftp://ftp.tex.ac.uk/tex-archive/support/amspell"supportamspell) jspell is an extended version of ispell (available as Href="ftp://ftp.tex.ac.uk/tex-archive/support/jspell"supportjspell)For the Macintosh, Excalibur is the program of choice It will run in native mode on both sorts of Macintosh, and is available as Href="ftp://ftp.tex.ac.uk/tex-archive/systems/mac/support/excalibur/Excalibur-2.6-sit.hqx"systemsmacsupportexcaliburExcalibur2.6sit.hqx (there are other dictionaries in the same directory)For VMS, a spell checker can be found in Href="ftp://ftp.tex.ac.uk/tex-archive/support/vmspell"supportvmspell
Part ILiterate programming53What is Literate Programming?Literate programming is the combination of documentation and source together in a fashion suited for reading by human beings. In general, literate programs combine source and documentation in a single file Literate programming tools then parse the file to produce either readable documentation or compilable source The WEB style of literate programming was created by D.E.Knuth during the development of his typesetting softwareDiscussion of literate programming is conducted in the newsgroup compprogrammingliterate The literate programming FAQ is stored as Href="ftp://ftp.tex.ac.uk/tex-archive/help/LitProg-FAQ"helpLitProgFAQ 54WEB for C, FORTRAN, and other languages is written in the programming language WEB; WEB is a tool to implement the concept of literate programmingCWEB, a WEB for C programs, written by Silvio Levy, is available as Href="ftp://ftp.tex.ac.uk/tex-archive/web/ccpp/cweb"webccppcwebSpidery WEB supports many languages including Ada, awk, and C. It was written by Norman Ramsey and, while not in the public domain, is usable free. It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/spiderweb"webspiderwebFWEB is a version for Fortran, Ratfor, and C written by John Krommes It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/fweb"webfwebSchemeWEB is a Unix filter that translates SchemeWEB into source or Scheme source. It was written by John Ramsdell and is available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/schemeweb"webschemewebAPLWEB is a version of WEB for APL and is available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/apl/aplweb"webaplaplwebFunnelWeb is a version of WEB that is language independent. It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/funnelweb"webfunnelweb Other language independent versions of WEB are nuweb (which is written in ANSI C), available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/nuweb"webnuweb, and noweb, available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/noweb"webnowebA WEB for plain macro files, using noweb, has recently been made available in Href="ftp://ftp.tex.ac.uk/tex-archive/web/tweb"webtweb
Part JFormat conversions55Conversion between AllTeX and otherstrofftrofftolatex (available as Href="ftp://ftp.tex.ac.uk/tex-archive/indexing/makeindex/troff-to-latex"indexingmakeindextrofftolatex), written by Kamal AlYahya at Stanford University (California, USA), assists in the translation of a troff document into format It recognises most ms and man macros, plus most eqn and some tbl preprocessor commands Anything fancier needs to be done by hand. Two style files are provided. There is also a man page (which converts very well to ) The program is copyrighted but free. An enhanced version of this program, tr2latex, is available in Href="ftp://ftp.tex.ac.uk/tex-archive/support/tr2latex"supporttr2latex The DECUS distribution (see iref="Q-archives"questionQ-archives) also contains a program which converts troff to WordPerfectwp2latex (available as Href="ftp://ftp.tex.ac.uk/tex-archive/support/wp2latex"supportwp2latex) has recently been much improved, and is now available either for MSDOS or for Unix systems, thanks to its current maintainer Jaroslav Fojtik PCWritepcwritexarc, from Href="ftp://ftp.tex.ac.uk/tex-archive/support/pcwritex"supportpcwritex, is a print driver for PCWrite that prints a PCWrite V2.71 document to a compatible disk file It was written by Peter Flynn at University College, Cork, Republic of Ireland runoffPeter Vanroose's (vanrooseesatkuleuvenacbe) conversion program is written in VMS Pascal The sources and a VAX executable are available from Href="ftp://ftp.tex.ac.uk/tex-archive/support/rnototex"supportrnototex refertibThere are a few programs for converting bibliographic data between BibTeX and refertib formats They are in Href="ftp://ftp.tex.ac.uk/tex-archive/biblio/bibtex/utils/refer-tools"bibliobibtexutilsrefertools In spite of the directory name, it also contains a shell script to convert BibTeX to refer as well. The collection is not maintained RTFA program for converting Microsoft's Rich Text Format to is available in Href="ftp://ftp.tex.ac.uk/tex-archive/support/rtf2tex"supportrtf2tex, which was written and is maintained by Robert Lupton (rhlastroprincetonedu) There is also a convertor to by Erwin Wechtl, in Href="ftp://ftp.tex.ac.uk/tex-archive/support/rtf2latex"supportrtf2latex Translation to RTF may be done (for a somewhat constrained set of documents) by 2RTF, which can produce ordinary RTF, Windows Help RTF (as well as HTML, iref="Q-LaTeX2HTML"questionQ-LaTeX2HTML) 2RTF is supported on various Unix platforms and under Windows3.1; it is available from Href="ftp://ftp.tex.ac.uk/tex-archive/support/tex2rtf"supporttex2rtf Microsoft WordA rudimentary program for converting MSWord to is wd2latex, for MSDOS (Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/wd2latex"dviwarewd2latex); a better idea, however, is to convert the document to RTF format and use one of the RTF converters mentioned aboveA FAQ that deals specifically with conversions between based formats and word processor formats is regularly posted to comptexttex, is available via http://www.kfa-juelich.de/isr/1/texconv/texcnv.html and is archived as Href="ftp://ftp.tex.ac.uk/tex-archive/help/wp-conv/wp-conv.zip"helpwpconvwpconv.zipA group at Ohio State University (USA) is working on a common document format based on SGML, with the ambition that any format could be translated to or from this one FrameMaker provides import filters to aid translation from alien formats (presumably including ) to Framemaker's own 56Conversion from AllTeX to plain ASCIIThe aim here is to emulate the Unix nroff, which formats text as best it can for the screen, from the same input as the Unix typesetting program troffRalph Droms (dromsbucknelledu) has a style file and a program that provide the equivalent of nroff, though it doesn't do a good job with tables and mathematics. The software is available in Href="ftp://ftp.tex.ac.uk/tex-archive/support/txt"supporttxt; the original dvi2tty often does an acceptable job and is available in Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dvi2tty"dviwaredvi2tty Another possibility is to use screensty, available as Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex209/contrib/misc/screen.sty"macroslatex209contribmiscscreen.sty Use a dvi2tty program of some kind; you might try Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/crudetype"dviwarecrudetype as well Another possibility is to use the toASCII conversion program, l2a (Href="ftp://ftp.tex.ac.uk/tex-archive/support/l2a"supportl2a), although this is really more of a deing programThe canonical deing program is detex (Href="ftp://ftp.tex.ac.uk/tex-archive/support/detex"supportdetex), which removes all comments and control sequences from its input before writing it to its output Its original purpose was to prepare input for a dumb spelling checker 57Conversion from SGML or HTML to SGML is a very important system for document storage and interchange, but it has no formatting features; its companion ISO standard DSSSL (http://www.jclark.com/dsssl/) is designed for writing transformations and formatting, but this has not yet been widely implemented. Some SGML authoring systems (e.g., SoftQuad AuthorEditor) have formatting abilities, and there are highend specialist SGML typesetting systems (e.g., Miles33's Genera) However, the majority of SGML users probably transform the source to an existing typesetting system when they want to print. is a good candidate for this. There are three approaches to writing a translator: Write a freestanding translator in the traditional way, with tools like yacc and lex; this is hard, in practice, because of the complexity of SGMLUse a specialist language designed for SGML transformations; the best known are probably Omnimark and Balise They are expensive, but powerful, incorporating SGML query and transformation abilities as well as simple translationBuild a translator on top of an existing SGML parser By far the bestknown (and free) parser is James Clark's nsgmls, and this produces a much simpler output format, called ESIS, which can be parsed quite straightforwardly (one also has the benefit of an SGML parse against the DTD). Two good public domain packages use this method: David Megginson's sgmlspm, written in Perl 5 Available from http://www.perl.com/CPAN/modules/by-module/SGMLS Joachim Schrod and Christine Detig's stil, written in Common Lisp. Available from ftp://ftp.th-darmstadt.de/pub/text/sgml/stil Both of these allow the user to write handlers for every SGML element, with plenty of access to attributes, entities, and information about the context within the document tree If these packages don't meet your needs for an average SGML typesetting job, you need the big commercial stuffSince HTML is simply an example of SGML, we do not need a specific system for HTML However, Nathan Torkington (NathanTorkingtonvuwacnz) developed html2latex from the HTML parser in NCSA's Xmosaic package The program takes an HTML file and generates a file from it The conversion code is subject to NCSA restrictions, but the whole source is available as Href="ftp://ftp.tex.ac.uk/tex-archive/support/html2latex"supporthtml2latexMichel Goossens and Janne Saarela published a very useful summary of SGML, and of public domain tools for writing and manipulating it, in TUGboat 16(2) 58AllTeX conversion to HTML is a typesetting language, not a markup system With properlyused , you may be luckier, but don't expect a free lunch. Remember that a) if you want a really good Web document, you had better redesign it from scratch, and b) HTML (even HTML3) has pretty poor typesetting facilities, and anything beyond the trivial will probably need to end up a graphic2HTML (Href="ftp://ftp.tex.ac.uk/tex-archive/support/latex2html"supportlatex2html) is a package by Nikos Drakos (mostly of perl scripts) that breaks up a document into one or more components, and links them together so that they can be read over the WorldWide Web as an hypertext document It defines a mapping between intradocument references and hyperlinks, and extends the mechanisms to permit reference to other (possibly remote) documents and other Internet resources It translates accented and other characters (as best it can) to things that WorldWide Web browsers can display, and translates mathematics (and other things that browsers can't deal with) to images that can be loaded inline into the hypertext document2HTML needs Perl, the PBM utilities, dvips, Ghostscript, and other sundries; it assumes it is running on a Unix system Michel Goossens and Janne Saarela published a detailed discussion of 2HTML, and how to tailor it, in TUGboat 16(2)There are two alternative strategies: Freestanding to HTML translations. Hard, but not impossible Julian Smart's latex2rtf (available from Href="ftp://ftp.tex.ac.uk/tex-archive/support/latex2rtf"supportlatex2rtf) does a plausible job on a subset of Writing an HTMLoutput backend in itself See Sebastian Rahtz' paper in TUGboat 16(3) for a discussion of how to go about this for the general case of SGML 59Making hypertext documents from If you want online hypertext with a AllTeX source, probably on the World Wide Web, consider four technologies (which overlap): Try direct conversion to HTML; see iref="Q-LaTeX2HTML"questionQ-LaTeX2HTML;Rewrite your document using Texinfo (see iref="Q-texinfo"questionQ-texinfo), and convert that to HTML;Look at Adobe Acrobat, an electronic delivery system guaranteed to preserve your typesetting perfectly See iref="Q-acrobat"questionQ-acrobat;Invest in the hyper conventions (standardised special commands); there are supporting macro packages for plain and )The Hyper project aims to extend the functionality of all the crossreferencing commands (including the table of contents) to produce special commands which are parsed by DVI processors conforming to the Hyper guidelines; it provides general hypertext links, including those to external documentsThe Hyper specification says that conformant viewerstranslators must recognize the following set of special commands: href:htmlahrefhrefstringname:htmlanamenamestringend:htmlaimage:htmlimgsrchrefstringbasename:htmlbasehrefhrefstringThe href, name and end commands are used to do the basic hypertext operations of establishing links between sections of documents.Further details are available on http://xxx.lanl.gov/hypertex/; there are two commonlyused implementations of the specification, a modified xdvi and (recent releases of) dvips. Output from the latter may be used in recent releases of Ghostscript or Acrobat Distiller 60Making Acrobat documents from There are three general routes to Acrobat output: Adobe's original distillation route (via PostScript output), conversion of an DVI file, and the use of a direct PDF generator such PDF (see iref="Q-pdftex"questionQ-pdftex) or MicroPress's V (see iref="Q-commercial"questionQ-commercial)For simple documents (with no hyperreferences), you can either process the document in the normal way, produce PostScript output and distill it,(on a Windows or Macintosh machine with Acrobat Exchange installed) pass the output through the PDFwriter in place of a printer driver This route is a dead end: the PDFwriter cannot create hyperlinksprocess the document in the normal way and process the DVI with dvipdfm (available from Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dvipdfm"dviwaredvipdfm, and on the latest live disc), orprocess the document direct to PDF with PDF or V PDF has the advantage of availability for a wide range of platforms, V (available commercially for Windows, or free of charge for Linux Href="ftp://ftp.tex.ac.uk/tex-archive/systems/linux/micropress"systemslinuxmicropress) has wider graphics capability, dealing with encapsulated PostScript and some inline PostScriptTo translate all the crossreferencing into Acrobat links, you need a package to suitably redefine the internal commands There are two of these for , both capable of conforming to the Hyper specification (see iref="Q-hyper"questionQ-hyper): Sebastian Rahtz's hyperref (available from Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/hyperref"macroslatexcontribsupportedhyperref), and Michael Mehlich's hyper (available from Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/hyper"macroslatexcontribsupportedhyper). Hyperref uses a configuration file to determine how it will generate hypertext; it can operate using PDF primitives, the hyper specials, or DVI driverspecific special commands Both dvips or YY's DVIPSONE to translate the DVI into PostScript acceptable to DistillerThere is no free implementation of all of Adobe Distiller's functionality, but Ghostscript (version 4.00 onwards) provides some restricted distilling capability (note the restrictions on the fonts it can use) However, Distiller itself is now remarkably cheap (for academics at least)For viewing (and printing) the resulting files, Adobe's Acrobat Reader is available for a wide range of platforms (see ftp://ftp.adobe.com/pub/adobe/acrobatreader) For those platforms for which Adobe's reader is unavailable, GhostScript (versions 3.51 onwards) can display and print PDF files 61Using to read SGML or XML directlyThis can nowadays be done, with a certain amount of clever macro programming David Carlisle's xmltex (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/xmltex/base"macrosxmltexbase) and Jonathan Fine's SGMLbase (see http://www.active-tex.demon.co.uk) are two examples of packages that have been developed and are publicly available At the time of writing, xmltex is more mature than SGMLbase, and offers a practical solution to typesetting XML files SGMLbase is designed to cope with SGML as well as XML, but at present only has toy typesetting examplesOne use of a that can typeset XML files is as a backend processor for XSL formatting objects, serialized as XML Sebastian Rahtz's Passive (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/xmltex/contrib/passivetex"macrosxmltexcontribpassivetex) uses xmltex to achieve this end
Part KMF62Getting MF to do what you wantMF allows you to create your own fonts, and most users will never need to use it. MF, unlike , requires some customisation: each output device for which you will be generating fonts needs a mode associated with it. Modes are defined using the modedef convention described on page94 of The MFbook (see iref="Q-books"questionQ-books). You will need a file, which conventionally called localmf, containing all the modedefs you will be using. If localmf doesn't already exist, Karl Berry's collection of modes, available as Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/modes-file"fontsmodesfile, is a good starting point (it can be used as a localmf without modification in a big enough implementation of MF). Lists of settings for various output devices are also published periodically in TUGboat (see iref="Q-TUG"questionQ-TUG). Now create a plain base file using inimf, plainmf, and localmf: inimfThisisMETAFONTplainyoutypeplainoutputinputlocalyoutypethisoutputdumpyoutypethisBeginningtodumponfileplainoutput This will create a base file named plainbase (or something similar; for example, it will be PLAINBAS on MSDOS systems) which should be moved to the directory containing the base files on your system (note that some systems have two or more such directories, one for each size of MF used)Now you need to make sure MF loads this new base when it starts up. If MF loads the plain base by default on your system, then you're ready to go. Under Unix (using the default web2c distributionThe commandname is symbolically linked to virmf, and virmf loads commandnamebase) this does indeed happen, but we could for instance define a command mf which executes virmfplain loading the plain base fileThe usual way to create a font with plain MF is to start it with the line modemodename;magmagnification;inputfontfilename in response to the prompt or on the MF command line. (If modename is unknown or omitted, the mode defaults to proof and MF will produce an output file called fontfilename2602gf) The magnification is a floating point number or magstep (magsteps are defined in The MFbook and The book) If magmagnification is omitted, then the default is 1 (magstep 0) For example, to generate cmr10 at 12pt for an epson printer you would type mfmodeepson;magmagstep1;inputcmr10 Note that under Unix the and ; characters must usually be quoted or escaped, so this would typically look something like mfmodeepson;magmagstep1;inputcmr10If you don't have inimf or need a special mode that isn't in the base, you can put its commands in a file (e.g., ln03mf) and invoke it on the fly with the smode command For example, to create cmr10300gf for an LN03 printer, using the file Thisisln03mfasof19900227modedefcourtesyofJohnSauterproofing0;fontmaking1;tracingtitles0;pixelsperinch300;blacker065;fillin01;ocorrection5; (note the absence of the modedef and enddef commands), you would type mfsmodeln03;inputcmr10 This technique isn't one you should regularly use, but it may prove useful if you acquire a new printer and want to experiment with parameters, or for some other reason are regularly editing the parameters you're using Once you've settled on an appropriate set of parameters, you should use them to rebuild the base file that you useA summary of the above written by Geoffrey Tobin, and tips about common pitfalls in using MF, is available as Href="ftp://ftp.tex.ac.uk/tex-archive/info/metafont-for-beginners.tex"infometafontforbeginners.tex 63Which font files should be keptMF produces from its run three files, a metrics (TFM) file, a generic font (GF) file, and a log file; all of these files have the same base name as does the input (e.g., if the input file was cmr10mf, the outputs will be cmr10tfm, cmr10nnngf Note that the file name may be transmuted by such operating systems as MSDOS, which don't permit long file names and cmr10log)For to use the font, you need a TFM file, so you need to keep that However, you are likely to generate the same font at more than one magnification, and each time you do so you'll (incidentally) generate another TFM file; these files are all the same, so you only need to keep one of themTo preview or to produce printed output, the DVI processor will need a font raster file; this is what the GF file provides However, while there used (once upon a time) to be DVI processors that could use GF files, modern processors use packed raster (PK) files Therefore, you need to generate a PK file from the GF file; the program gftopk does this for you, and once you've done that you may throw the GF file awayThe log file should never need to be used, unless there was some sort of problem in the MF run, and need not be ordinarily kept 64Getting bitmaps from the archivesMost people these days start using with a 300 dotsperinch (dpi) laser printer, and Computer Modern bitmap fonts for this resolution are supplied with most packages There are also two such sets available on CTAN: Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/cm/pk/pk300.zip"fontscmpkpk300.zip (for writeblack printer engines) and Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/cm/pk/pk300w.zip"fontscmpkpk300w.zip (for writewhite engines) However, some users want to send their work to high quality typesetting machines (typically with a resolution of 1270dpi or greater); it is also becoming more common to use a 600dpi laser printer. Why don't the archives or suppliers provide bitmap fonts at these sizes? There are two reasons: When a bitmap font is created with MF, it needs to know the characteristics of the device; who knows what 600 or 1270dpi device you have (Of course, this objection applies equally well to 300dpi printers.)Bitmap fonts get big at high resolutions. Who knows what fonts at what sizes you need It would be possible to provide some set of 1270dpi bitmap fonts in the archives, but it would take a lot of space, and might not be right for you.So what to do You can build the fonts you need yourself with MF: this isn't at all hard, and some drivers help you (dvips, and the em drivers construct the MF commands). You might need to look at Karl Berry's collection of MF modes (Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/modes-file"fontsmodesfile). Alternatively, if it is a PostScript device you have, consider using the fonts in Type1 font format. You can buy all the Computer Modern fonts in outline form from Blue Sky Research, Kinch or YY (iref="Q-commercial"questionQ-commercial for addresses), or you can use Basil Malyshev's public domain versions in Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/cm/ps-type1"fontscmpstype1 (the Paradissa collection is complete, but has largely been replaced by the better BaKoMa collection).
Part LPostScript and 65Using PostScript fonts with In order to use PostScript fonts, needs metric (called TFM) files. Several sets of metrics are available from the archives; for mechanisms for generating new ones, see iref="Q-metrics"questionQ-metrics You also need the fonts themselves; PostScript printers come with a set of fonts built in, but to extend your repertoire you almost invariably need to buy from one of the many commercial font vendors (see, for example, iref="Q-psfchoice"questionQ-psfchoice)If you use LaTeXe, the best way to get PostScript fonts into your document is to use the PSNFSS package maintained by Sebastian Rahtz and Alan Jeffrey (available in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/psnfss"macroslatexrequiredpsnfss); it's supported by the 3 project team, so bug reports can and should be submitted. PSNFSS gives you a set of packages for changing the default roman, sansserif and typewriter fonts; e.g., timessty will set up Times Roman, Helvetica and Courier in place of Computer Modern, while avantsty just changes the sansserif family to AvantGarde. To go with these packages, you will need the font metric files (watch out for encoding problems see iref="Q-metrics"questionQ-metrics) and font description (.fd) files for each font family you want to use. These can be obtained from Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/psfonts"fontspsfonts, arranged by vendor (e.g., Adobe, Monotype, etc.). For convenience, metrics for the common 35 PostScript fonts found in most printers are provided with PSNFSS, packaged as Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/packages/psnfss/lw35nfss.zip"macroslatexpackagespsnfsslw35nfss.zipFor older versions of there are various schemes, of which the simplest to use is probably the PS macros distributed with dvipsFor plain , you load whatever fonts you like; if the encoding of the fonts is not the same as Computer Modern it will be up to you to redefine various macros and accents, or you can use the font reencoding mechanisms available in many drivers and in ps2pk and afm2tfmVictor Eijkhout's sophisticated Lollipop package (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/lollipop"macroslollipop) supports declaration of font families and styles in a similar way to 's NFSS, and so is easy to use with PostScript fontsSome common problems encountered are discussed elsewhere (see iref="psfonts-problems"questionpsfonts-problems) 66Previewing files using PostScript fontsMost previewers only display bitmap PK fonts. If you want to preview documents using PostScript fonts, you have three choices: Convert the DVI file to PostScript and use a PostScript previewer. Some modern Unix X implementations have this built in (as does NeXTstep); (X11) Unix, Windows, OS2, and MSDOS users can use the free Ghostscript (Href="ftp://ftp.tex.ac.uk/tex-archive/support/ghostscript"supportghostscript), a complete level 2 implementationUnder Windows on a PC, or on a Macintosh, let Adobe Type Manager display the fonts. Textures (Macintosh) works like this, and under Windows you can use YY's dviwindo for bitmapfree previewing (See iref="Q-commercial"questionQ-commercial for details of these suppliers.) If you have the PostScript fonts in Type1 format, use ps2pk (Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/utilities/ps2pk"fontsutilitiesps2pk) or gsftopk (designed for use with the Ghostscript fonts; Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/utilities/gsftopk"fontsutilitiesgsftopk) to make PK bitmap fonts which your previewer will understand. This can produce excellent results, also suitable for printing with nonPostScript devices. Check the legalities of this if you have purchased the fonts. The very commonest PostScript fonts such as Times and Courier come in Type1 format on disk with Adobe Type Manager (often bundled with Windows, and part of OS2) 67 font metric files for PostScript fontsFont vendors such as Adobe supply metric files for each font, in AFM (Adobe Font Metric) form; these can be converted to TFM ( Font Metric) form. The CTAN archives have prebuilt metrics which will be more than enough for many people (Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/psfonts"fontspsfonts; beware this directory is at the root of a huge tree), but you may need to do the conversion yourself if you have special needs or acquire a new font. One important question is the encoding of (Latin character) fonts; while we all more or less agree about the position of about 96 characters in fonts (the basic ASCII set), the rest of the (typically) 256 vary. The most obvious problems are with floating accents and special characters such as the pounds sterling sign. There are three ways of dealing with this: either you change the macros which reference the characters (not much fun, and errorprone); or you change the encoding of the font (easier than you might think); or you use virtual fonts (iref="virtualfonts"questionvirtualfonts) to pretend to that the encoding is the same as it is used to. If you use LaTeXe, it allows for changing the encoding in read the Companion (see iref="Q-books"questionQ-books) for more details. In practice, if you do much nonEnglish (but Latin script) typesetting, you are strongly recommended to use the fontenc package with option T1 to select T1 (Cork: iref="ec-fonts"questionec-fonts) encoding.Alan Jeffrey's fontinst package (Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/utilities/fontinst"fontsutilitiesfontinst) is an AFM to TFM converter written in it is used to generate the files used by LaTeXe's PSNFSS package to support use of PostScript fonts. It is a sophisticated package, not for the fainthearted, but is powerful enough to cope with most needs Much of its power relies on the use of virtual fonts (iref="virtualfonts"questionvirtualfonts) For slightly simpler problems, Rokicki's afm2tfm, distributed with dvips (Href="ftp://ftp.tex.ac.uk/tex-archive/dviware/dvips"dviwaredvips), is fast and efficient; note that the metrics and styles that come with dvips are not currently LaTeXe compatible, but Karl Berry plans to distribute metrics directly compatible with PSNFSS in his dvipsk packageFor the Macintosh, there is a program called EdMetrics which does the job (and more) It comes with the Textures distribution, but is in fact free software, available as Href="ftp://ftp.tex.ac.uk/tex-archive/systems/mac/textures/utilities/EdMetrics.sea.hqx"systemsmactexturesutilitiesEdMetrics.sea.hqxMSDOS users can buy (see iref="Q-commercial"questionQ-commercial) YY's Font Manipulation Tools package which includes a powerful afmtotfm program among many other goodies 68Problems using PostScript fontsFor the typical user trying to use the PSNFSS (iref="Q-usepsfont"questionQ-usepsfont) package, three questions often arise First, you have to declare to the DVI driver that you are using PostScript fonts; in the case of dvips, this means adding lines to the psfontsmap file. Otherwise, dvips will try to find PK files. If the font isn't built into the printer, you have to acquire it (in many cases this means buying it from a commercial supplier) You then have to instruct the driver to download it with each job (the mechanism depends on your driver). So it's no good just installing the metrics for Optima and expecting it to work. You have to pay hard cash for the font itself, which will come (for Unix and MSDOS users) in pfb (Printer Font Binary) formSecond, you cannot expect your previewer to suddenly start displaying PostScript fonts; most of them only know about PK bitmap fonts such as Computer Modern. ps2pk (Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/utilities/ps2pk"fontsutilitiesps2pk) can create these from the pfb file you have bought; this would also let you use the fonts with nonPostScript device drivers such as the em ones You are responsible for making sure you are not breaking the licence restrictions on font you boughtThird, the stretch and shrink between words is a function of the font metric; it is not specified in AFM files, so different converters choose different values. The PostScript metrics that come with PSNFSS used to produce quite tight setting, but they were revised in mid 1995 to produce a compromise between American and European practice. Really sophisticated users may not find even the new the values to their taste, and want to override them. Even the casual user may find more hyphenation or overfull boxes than CMR produces; but CMR is extremely generous. 69Choice of scalable outline fontsIf you are interested in text alone, you can use any of over 20,000 fonts() in Adobe Type1 format (called PostScript fonts in the world and ATM fonts in the DTP world), or any of several hundred fonts in TrueType format That is, provided of course, that your previewer and printer driver support scalable outline fonts itself only cares about metrics, not the actual character programs You just need to create a metric file TFM using some tool such as afm2tfm, afmtotfm (from YY, see iref="Q-commercial"questionQ-commercial) or fontinst For the previewer or printer driver you need the actual outline font files themselves (pfa for Display PostScript, pfb for ATM on IBM PC, Mac outline font files on Macintosh)If you also need mathematics, then you are severely limited by the demands that makes of maths fonts (for details, see the paper by B.K.P. Horn in TUGboat 14(3)) For maths, then, there are relatively few choices: Computer Modern(75 fonts optical scaling) Donald E. Knuth Note that CM is available in scalable outline form There are commercial as well as public domain versions, and there are both Adobe Type1 and TrueType versions Some of these are commercial grade, with full handtuned hinting, some render very poorly, while others are merely incompatible with Adobe Type Manager (ATM)Lucida Bright with Lucida New Math(25 fonts) Chuck Bigelow and Kris Holmes Lucida is a family of related fonts including seriffed, sans serif, sans serif fixed width, calligraphic, blackletter, fax, Kris Holmes' connected handwriting font, etc; they're not as spindly as Computer Modern, with a large xheight, and include a larger set of maths symbols, operators, relations and delimiters than CM (over 800 instead of 384: among others, it also includes the AMS msam and msbm symbol sets) The planned Lucida Bright Expert (14 fonts) adds seriffed fixed width, another handwriting font, smallcaps, bold maths, upright maths italic, etc., to the set The distribution includes support for use with plain and LaTeXo Support under LaTeXe is provided in PSNFSS (iref="Q-usepsfont"questionQ-usepsfont) thanks to Sebastian RahtzMathTime 1.1(3 fonts) plorators (Michael Spivak) The set contains maths italic, symbol, and extension fonts, designed to work well with TimesRoman These are typically used with Times, Helvetica and Courier (which are resident on many printers, and which are supplied with some PC versions) In addition you may want to complement this basic set with Adobe's Times Smallcap, and perhaps the set of Adobe Math Pi fonts, which include blackboard bold, blackletter, and script faces The distribution includes support for use with plain and LaTeXo (including code to link in Adobe Math Pi2 and Math Pi6) Support under LaTeXe is provided in PSNFSS (iref="Q-usepsfont"questionQ-usepsfont) thanks to Sebastian RahtzAdobe Lucida, LucidaSans and LucidaMath(12 fonts) Lucida and LucidaMath are generally considered to be a bit heavy The three maths fonts contain only the glyphs in the CM maths italic, symbol, and extension fonts Support for using LucidaMath with is not very good; you will need to do some work reencoding fonts etc (In some sense this set is the ancestor of the LucidaBright plus LucidaNewMath font set.)Concrete, the AMS maths fonts etc.Donald E. Knuth and the AMS. These are sometimes mentioned as alternatives to CM, but they are really adjuncts, in that you need to use at least the basic CM maths fonts with themProprietary fontsVarious sources. Since having a high quality font set in scalable outline form that works with can give a publisher a real competitive advantage, there are some publishers that have paid (a lot) to have such font sets made for them Unfortunately, these sets are not available on the open market, despite the likelihood that they're more complete than those that areMathptm(4 fonts) Alan Jeffrey. This set contains maths italic, symbol, extension, and roman virtual fonts, built from Adobe Times, Symbol, Zapf Chancery, and the Computer Modern fonts The Mathptm fonts are free, and the resulting PostScript files can be freely exchanged Contains most of the CM math symbols. Support under LaTeXe in PSNFSS (iref="Q-usepsfont"questionQ-usepsfont) thanks to Alan Jeffrey and Sebastian Rahtz (A similar development by Walter Schmidt, using the Adobe Palatino fonts, is available from Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/mathpple"fontsmathpple)All of the first three font sets are available in formats suitable for IBM PCWindows, Macintosh and UnixNeXT from YY and from Blue Sky Research (see iref="Q-commercial"questionQ-commercial for details) The MathTime fonts are also available from: plorators1572 West Gray 377Houston TX 77019USA The very limited selection of maths font sets is a direct result of the fact that a maths font has to be explicitly designed for use with and as a result it is likely to lose some of its appeal in other markets. Furthermore, the market for commercial fonts is minute (in comparison, for example, to Microsoft TrueType font pack 1, which sold something like 10 million copies in a few weeks after release of Windows 3.1)Text fonts in Type1 format are available from many vendors including Adobe, Monotype, Bitstream Avoid cheap ripoffs: not only are you rewarding unethical behaviour, destroying the cottage industry of innovative type design, but you are also very likely to get junk The fonts may not render well (or at all under ATM), may not have the standard complement of 228 glyphs, or may not include metric files (needed to make TFM files). Also, avoid TrueType fonts from all but the major vendors TrueType fonts are an order of magnitude harder to hint properly than Type1 fonts and hence TrueType fonts from places other than Microsoft and Apple may be suspect In any case you may find other problems with TrueType fonts such as service bureaux not accepting jobs calling for them 70Including a PostScript figure in AllTeX LaTeXe (iref="latex2e"questionlatex2e) has a standard package for graphics inclusion, rotation, colour, and other driverrelated features. The package is documented in the second edition of Lamport's book, as well as in the Graphics Companion (see iref="Q-books"questionQ-books)The distribution itself comes with documentation, and a processed copy (grfguideps) is available in the distribution so that users can read documentation without first installing the packageThe graphics package comes with a relative, graphicx, which provides more convenient means of scaling and otherwise manipulating graphics Both packages are configured for the particular processor you're using (either DVI processor, or PDF), and the packages cope with any sort of graphics inclusion the processor understands, be it PostScript, bitmap, PDF or anythingBoth graphics and graphicx are to be found on Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/graphics"macroslatexrequiredgraphicsIf you don't use LaTeXe, a version of the package is available that will work under Plain (and other formats) see Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/graphics-plain"macroslatexrequiredgraphicsplainOne point to note about including PostScript figures is that they are not part of the DVI file, but are only included when you use a DVI to PostScript conversion program The special commands used to do this are potentially different for every DVI processor (which is why the graphics package must be configured for the processor you use) As a result, some DVI previewers will simply show the blank space has reserved for your figure, not the figure itselfThere are two rather good documents on CTAN addressing figure production, with rather different emphasis Keith Reckdahl's, Href="ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.pdf"infoepslatex.pdf (also available in PostScript format as Href="ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.ps"infoepslatex.ps), covers the standard facilities, as well as some of the supporting packages, notably subfigure (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/subfigure"macroslatexcontribsupportedsubfigure) and psfrag (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/psfrag"macroslatexcontribsupportedpsfrag) Anil K.Goel's, Href="ftp://ftp.tex.ac.uk/tex-archive/info/figsinltx.ps"infofigsinltx.ps, covers the different ways in which you might generate figures, and the old (LaTeXo) ways of including them into documents
Part MSpecial sorts of typesetting71Drawing with There are many packages to do pictures in AllTeX itself (rather than importing graphics created externally), ranging from simple use of picture environment, through enhancements like epic, to sophisticated (but slow) drawing with PiCTeX. Depending on your type of drawing, and setup, four systems should be at the top of your list to look at: Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/pstricks"graphicspstricks; this gives you access to all the power of PostScript from itself, by sophisticated use of specials. You need a decent DVI to PostScript driver (like dvips), but the results are worth it The welldocumented package gives you not only lowlevel drawing commands (and full colour) like lines, circles, shapes at arbitrary coordinates, but also highlevel macros for framing text, drawing trees and matrices, 3D effects, and moreMP; you liked MF, but never got to grips with font files Try MP (iref="Q-MP"questionQ-MP) all the power of MF, but it generates PostScript figures Knuth uses it for all his workMfpic; you liked MF, but can't understand the language The package (Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/mfpic"graphicsmfpic) makes up MF code for you within using familiarlooking macros Not quite the full power of MF, but a friendlier interfaceYou liked PiCTeX but don't have enough memory or time Look at Eitan Gurari's Href="ftp://ftp.tex.ac.uk/tex-archive/macros/generic/dratex"macrosgenericdratex, which is as powerful as most other drawing packages, but is an entirely new implementation, which is not as hard on memory, is much more readable (and is fully documented) 72Doublespaced documents in Are you producing a thesis, and trying to obey regulations that were drafted in the typewriter era Or are you producing copy for a journal that insists on double spacing for the submitted articles is a typesetting system, so the appropriate design conventions are for real books If your requirement is from thesis regulations, find whoever is responsible for the regulations, and try to get the wording changed to cater for typeset theses (e.g., to say if using a typesetting system, aim to make your thesis look like a welldesigned book) (If your requirement is from a journal, you're probably even less likely to be able to get the rules changed, of course.)If you fail to convince your officials, or want some interline space for copyediting: Try changing baselinestretch: renewcommandbaselinestretch12 may be enough to give officials the impression you've kept to their regulations. Don't try changing baselineskip: its value is reset at any sizechanging commandAlternatively, use a linespacing package The best for current is Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/setspace/setspace.sty"macroslatexcontribsupportedsetspacesetspace.sty 73Formatting a thesis in Thesis styles are usually very specific to your University, so it's usually not profitable to ask around for a package outside your own University Since many Universities (in their eccentric way) still require doublespacing, you may care to refer to iref="Q-linespace"questionQ-linespace If you want to write your own, a good place to start is the University of California style (available as Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/ucthesis"macroslatexcontribsupporteducthesis), but it's not worth going to a lot of trouble. (If officials won't allow standard typographic conventions, you won't be able to produce an sthetically pleasing document anyway) 74Flowing text around figures in There are several packages that purport to do this, but they all have their limitations because the machine isn't really designed to solve this sort of problem Piet van Oostrum has conducted a survey of the available packages; he recommends: picinspicinssty is part of a large package (Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/picins/picins.zip"systemsmsdospicinspicins.zip) that allows inclusion of pictures (e.g., with shadow boxes, various MSDOS formats, etc.) The command is: parpicwidthheightxoffyoffOptionsPositionPicture Paragraph text All parameters except the Picture are optional The picture can be positioned left or right, boxed with a rectangle, oval, shadowbox, dashed box, and a caption can be given which will be included in the list of figures Unfortunately (for those of us whose understanding of German is not good), the documentation is in German Piet van Oostrum has written an English summary Href="ftp://ftp.tex.ac.uk/tex-archive/systems/msdos/picins/picins.zip-summary"systemsmsdospicinspicins.zipsummaryfloatfltHref="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/floatflt"macroslatexcontribotherfloatflt is an improved version (for LaTeXe) of floatfigsty, and its syntax is: beginfloatingfigureoptionswidth of figure figure contents endfloatingfigure There is a (more or less similar) floatingtable environment The tables or figures can be set left or right, or alternating on evenodd pages in a doublesided document The package works with the multicol package, but doesn't work well in the neighbourhood of list environments (unless you change your document)wrapfigHref="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/wrapfig.sty"macroslatexcontribothermiscwrapfig.sty has syntax: beginwrapfigureheight of figure in lines l,r,etc overhangwidth figure, caption, etc. endwrapfigure The syntax of the wraptable environment is similar Height can be omitted, in which case it will be calculated by the package; the package will use the greater of the specified and the actual width The l,r,etc. parameter can also be specified as i(nside) or o(utside) for twosided documents, and uppercase can be used to indicate that the picture should float The overhang allows the figure to be moved into the margin The figure or table will entered into the list of figures or tables if you use the caption command The environments do not work within list environments that end before the figure or table has finished, but can be used in a parbox or minipage, and in twocolumn format 75Alternative head and footlines in The standard document classes define a small set of page styles which (in effect) specify head and footlines for your document The set defined is very restricted, but is capable of much more; people occasionally set about employing facilities to do the job, but that's quite unnecessary Piet van Oostrum has already done the workThe package is found in directory Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyhdr"macroslatexcontribsupportedfancyhdr and provides simple mechanisms for defining pretty much every head or footline variation you could want; the directory also contains some (rather good) documentation and one or two smaller packages Fancyhdr also deals with the tedious behaviour of the standard styles with initial pages (iref="Q-ps-empty"questionQ-ps-empty), by enabling you to define different page styles for initial and for body pages 76Including a file in verbatim in A good way is to use Rainer Schopf's verbatimsty, which provides a command verbatiminput that takes a file name as argument. This package is available as part of Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtoolsAnother way is to use the alltt environment, which requires allttsty (which is now part of ) alltt interprets its contents mostly verbatim, but executes any commands it finds: so one can say: beginallttinputverbtxtendalltt of course, this is little use for inputting AllTeX source codeThe moreverb package (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/moreverb"macroslatexcontribsupportedmoreverb) extends the facilities of verbatim package), providing a listing environment and a listinginput command, which linenumber the text of the fileThe fancyvrb package (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyvrb"macroslatexcontribsupportedfancyvrb) offers configurable implementations of everything verbatim and moreverb have, and more besides It is nowadays the package of choice for the discerning typesetter of verbatim text, but its wealth of facilities makes it a complex beast and study of the documentation is strongly advised 77Including line numbers in typeset outputFor general numbering of lines, there are two packages for use with , Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/lineno"macroslatexcontribsupportedlineno (which permits labels attached to individual lines of typeset output) and Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/numline/numline.sty"macroslatexcontribsupportednumlinenumline.styBoth of these packages play fast and loose with the output routine, which can cause problems: the user should bewareIf the requirement is for numbering verbatim text, the Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/moreverb"macroslatexcontribsupportedmoreverb or Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyvrb"macroslatexcontribsupportedfancyvrb packages (see iref="Q-verbfile"questionQ-verbfile) may be usedOne common use of line numbers is in critical editions of texts, and for this the edmac package (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/plain/contrib/edmac"macrosplaincontribedmac) offers comprehensive support 78Generating an index in AllTeXMaking an index is not trivial; what to index, and how to index it, is difficult to decide, and uniform implementation is difficult to achieve You will need to mark all items to be indexed in your text (typically with index commands)It is not practical to sort a large index within , so a postprocessing program is used to sort the output of one run, to be included into the document at the next runThe following programs are available: makeindexfor under Unix (but runs under other OSs without changes) Available in Href="ftp://ftp.tex.ac.uk/tex-archive/indexing/makeindex"indexingmakeindex; a version for the Macintosh is available as Href="ftp://ftp.tex.ac.uk/tex-archive/systems/mac/macmakeindex.sit"systemsmacmacmakeindex.sit, and one for MSDOS is part of the em distribution (the em version also runs under OS2) The Makeindex documentation is a good source of information on how to create your own index. Makeindex can be used with some macro packages other than , such as Eplain( iref="Q-eplain"questionQ-eplain), and sis, Href="ftp://ftp.tex.ac.uk/tex-archive/nonfree/macros/texsis"nonfreemacrostexsis (whose macros, Href="ftp://ftp.tex.ac.uk/tex-archive/nonfree/macros/texsis-index"nonfreemacrostexsisindex, can be used independently with plain)idxtexfor under VMS Available (together with a glossarymaker called glotex) in Href="ftp://ftp.tex.ac.uk/tex-archive/indexing/glo+idxtex"indexinggloidxtextexindexA witty little shellsedscriptbased utility for under Unix Available from Href="ftp://ftp.tex.ac.uk/tex-archive/support/texindex"supporttexindex There are other programs called texindex, notably one that comes with the Texinfo distribution (iref="Q-texinfo"questionQ-texinfo) xindya recent development, designed for wideranging flexibility (including support for multilingual indexes), based on Common Lisp The system is available on CTAN (Href="ftp://ftp.tex.ac.uk/tex-archive/support/xindy"supportxindy), but is more easily accessed from a web browser via http://www.iti.informatik.th-darmstadt.de/xindy/ since the distribution contains several different implementations 79Typesetting URLsURLs tend to be very long, and contain characters that would naturally prevent them being hyphenated even if they weren't typically set in ttfamily, verbatim Therefore, without special treatment, they often produce wildly overfull hboxes, and their typeset representation is awfulThere are two approaches to this problem: Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/path.sty"macroslatexcontribothermiscpath.sty, which defines a path command The command defines each potential break character as a discretionary, and offers the user the opportunity of specifying a personal list of potential break characters Its chief disadvantage is fragility in the contextHref="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/url.sty"macroslatexcontribothermiscurl.sty, which defines an url command (among others, including its own path command) The command gives each potential break character a mathsmode personality, and then sets the URL itself in the user's choice of font, in maths mode It can produce (style) robust commands (see iref="Q-protect"questionQ-protect) for use within moving arguments Note that, because the operation is conducted in maths mode, spaces within the URL argument are ignored unless special steps are takenThe author of this answer prefers the (rather newer) urlsty; both packages work equally well with plain (though of course, the fancy facilities of urlsty don't have much place there) 80Citing URLs with BibTeXThere is no citation type for URLs, per se, in the standard BibTeX styles, though Oren Patashnik (the author of BibTeX) is considering developing one such for use with the longawaited BibTeX version1.0The actual information that need be available in a citation of an URL is discussed at some length in the publicly available online extracts of ISO6902, available via http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm; the techniques below do not satisfy all the requirements of ISO6902, but they offer a solution that is at least available to users of today's toolsUntil the new version arrives, the simplest technique is to use the howpublished field of the standard styles' misc function Of course, the strictures about typesetting URLs (iref="Q-setURL"questionQ-setURL) still apply, so the entry will look like: mischowpublishedurlhttpAnother possibility is that some conventionallypublished paper, technical report (or even book) is also available on the Web In such cases, a useful technique is something like: techreportnoteAlsoavailableasurlhttpThere is good reason to use Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/url.sty"macroslatexcontribothermiscurl.sty in this context, since (by default) it ignores spaces in its argument BibTeX has a habit of splitting lines it considers excessively long, and if there are no space characters for it to use as natural breakpoints, BibTeX will insert a comment () character which is an acceptable character in an URL, so that url will typeset it The way around the problem is to insert odd spaces inside the URL itself in the bib file, to enable BibTeX to make reasonable decisions about breaking the line 81Using BibTeX with plain The file Href="ftp://ftp.tex.ac.uk/tex-archive/macros/eplain/btxmac.tex"macroseplainbtxmac.tex contains macros and documentation for using BibTeX with plain , either directly or with Eplain (iref="Q-eplain"questionQ-eplain) See iref="BibTeXing"questionBibTeXing for more information about BibTeX itself 82Typesetting music in A powerful package which allows the typesetting of polyphonic and other multiplestave music is Music, written by Daniel Taupin (taupinrsovaxlpsupsudfr). It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/musictex"macrosmusictexIn the recent past, Daniel (as well as with various other people, notably Ross Mitchell and Andreas Egler) have been working on a development of Music, known as MusiX MusiX is a threepass system (with a processor program that computes values for the element spacing in the music), and achieves finer control than is possible in the unmodified based mechanism that Music uses Daniel Taupin and Andreas Egler are pursuing distinct versions of MusiX they are available, respectively, from Href="ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin"macrosmusixtextaupin and Href="ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/egler"macrosmusixtexeglerDigital music fans can typeset notation for their efforts by using midi2tex, which translates MIDI data files into Music source code It is available from Href="ftp://ftp.tex.ac.uk/tex-archive/support/midi2tex"supportmidi2texA rather simpler notation than Music is supported by abc2mtex; this is a package designed to notate tunes stored in an ASCII format (abc notation). It was designed primarily for folk and traditional tunes of Western European origin (such as Irish, English and Scottish) which can be written on one stave in standard classical notation However, it should be extendable to many other types of music It is available from Href="ftp://ftp.tex.ac.uk/tex-archive/support/abc2mtex"supportabc2mtexThere is a mailing list for discussion of typesetting music in To subscribe, send mail to mutexrequeststolafedu containing the word subscribe in the body 83Drawing Feynman diagrams in Michael Levine's macro package for drawing Feynman diagrams in is available in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex209/contrib/feynman"macroslatex209contribfeynmanAnother possibility is Thorsten Ohl's Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/feynmf"macroslatexcontribsupportedfeynmf, that works in combination with MF (or MP) The feynmf or feynmp package reads a description of the diagram written in , and writes out code MF (or MP) can then produce a font (or PostScript file) for use in a subsequent run For new users, who have access to MP, the PostScript version is probably the better route, for document portability and other reasons
Part NHow do I do X in or 84Proof environmentIt is not possible to make a proof environment which automatically includes an endofproof symbol. Some proofs end in displayed maths; others do not. If the input file contains endproof then finishes off the displayed maths and gets ready for a new line before it reads any instructions connected with ending the proof But traditionally the endofproof sign goes in the display, not on a new line. So you just have to put it in by hand in every proof 85Symbols for the number setsIt is a good idea to have commands such as R for the real numbers and other standard number sets. Traditionally these were typeset in bold Because mathematicians usually do not have access to bold chalk, they invented the special symbols that are now often used for R, C, etc These symbols are known as blackboard bold. Before insisting on using them, consider whether going back to the old system of ordinary bold might not be acceptable (it is certainly simpler)A set of blackboard bold capitals is available in the AMS fonts msam (e.g., msam10 for 10pt) and msbm. The fonts have a large number of mathematical symbols to supplement the ones in the standard distribution. The fonts are available in Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/ams/amsfonts-symbols"fontsamsamsfontssymbolsTwo files which load the fonts and define the symbols are provided, and both work with either or Questions or suggestions regarding these fonts should be directed to techsupportmathamsorgAnother complete set of blackboard bold fonts, the bbold family, is available in MF (in Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/bbold"fontsbbold) This set has the interesting property of offering blackboard bold forms of lowercase letters, something rather rarely seen on actual blackboardsThe lazy persons blackboard bold macros: newcommandRsfRhspace09exrule015ex15exhspace09exnewcommandNsfNhspace10exrule015ex13exhspace10exnewcommandQsfQhspace11exrule015ex15exhspace11exnewcommandCsfChspace09exrule015ex13exhspace09ex work well at normal size if the surrounding text is cmr10. However, they are not part of a proper maths font, and so do not work in sub and superscripts. Moreover, the size and position of the vertical bar is affected by the font of the surrounding text 86Roman theoremsIf you want to take advantage of the powerful newtheorem command without the constraint that the contents of the theorem is in a sloped font (for example, to use it to create remarks, examples, proofs, ) then you can use the style file theoremsty (part of Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtools). Alternatively, the following sets up an environment remark whose content is in roman newtheorempreremarkRemarknewenvironmentremarkbeginpreremarkrmendpreremark This will not work if you are using the prototype NFSS outside of LaTeXe (iref="latex2e"questionlatex2e), because the command rm behaves differently there 87Fancy enumeration listsSuppose you want your toplevel enumerates to be labelled I, II, , then give these commands: renewcommandtheenumiRomanenumirenewcommandlabelenumitheenumi The possible styles of numbering are given in Section6.3 of Lamport's book (see iref="Q-books"questionQ-books) Both theenumi and labelenumi must be changed, since theenumi is used in crossreferences to the listFor lower level enumerates, replace enumi by enumii, enumiii or enumiv, according to the level If your label is much larger than the default, you should also change leftmargini, leftmarginii, etcIf you're running LaTeXe, the package enumeratesty (part of Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtools) offers similar facilities With enumeratesty, the example above would be achieved simply by starting the enumeration beginenumerateI 88Unnumbered sections in the Table of ContentsThe easiest way to get headings of funny sections such as prefaces in the table of contents is to use the counter secnumdepth described in AppendixC of the manual. For example: setcountersecnumdepth1chapterPreface Of course, you have to set secnumdepth back to its usual value (which is2 in the standard styles) before you do any section which you want to be numberedSimilar settings are made automatically in the book class by the frontmatter and backmatter commands This is why it works. chapter without the star does put something in the toc file; if secnumdepth0, increase the counter for the chapter and write it outwrite the chapter title Other sectioning commands are similar, but with other values used in the test 89Footnotes in tablesThe standard footnote command doesn't work in tables; the table traps the footnotes and they can't escape to the bottom of the pageIf your table is floating, your best bet is (unfortunately) to put the table in a minipage environment and to put the notes underneath the table, or to use Donald Arseneau's package Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/threeparttable.sty"macroslatexcontribothermiscthreeparttable.styOtherwise, if your table is not floating (it's just a tabular in the middle of some text), there are several things you can do to fix the problem Use footnotemark to position the little marker appropriately, and then put in footnotetext commands to fill in the text once you've closed the tabular environment This is described in Lamport's book, but it gets messy if there's more than one footnoteStick the table in a minipage anyway This provides all the ugliness of footnotes in a minipage with no extra effortUse Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/threeparttable.sty"macroslatexcontribothermiscthreeparttable.sty anyway; the package is intended for floating tables, and the result might look odd if the table is not floating, but it will be reasonableUse tabularx or longtable from the tools distribution (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtools); they're noticeably less efficient than the standard tabular environment, but they do allow footnotesGrab hold of footnotesty from CTAN, lurking in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/mdwtools"macroslatexcontribsupportedmdwtools Then put your tabular environment inside a savenotes environment Alternatively, say makesavenoteenvtabular in the preamble of your document, and tables will all handle footnotes correctlyUse mdwtabsty from the same directory (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/mdwtools"macroslatexcontribsupportedmdwtools) This will handle footnotes properly, and has other facilities to increase the beauty of your tables It may also cause other tablerelated packages (not the standard tools ones, though) to become very unhappy and stop working 90Style of section headingsSuppose that the editor of your favourite journal has specified that section headings must be centred, in small capitals, and subsection headings ragged right in italic, but that you don't want to get involved in the sort of programming described in The Companion (iref="Q-books"questionQ-books; the programming itself is discussed in iref="atsigns"questionatsigns) The following hack will probably satisfy your editor. Define yourself new commands newcommandssection1section1centeringsc1newcommandssubsection1subsection1raggedrightit1 and then use ssection and ssubsection in place of section and subsection. This isn't perfect: section numbers remain in bold, and starred forms need a separate redefinition. Also, this will not work if you are using the prototype NFSS with LaTeXo, because the fontchanging commands behave differently thereThe Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/sectsty"macroslatexcontribsupportedsectsty package provides an easytouse set of tools to do this job, while the Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/titlesec"macroslatexcontribsupportedtitlesec package permits more advanced usage as well (titlesec comes with a second package, titletoc, which is used to adjust the format of table of contents entries.)The headings of chapter and part commands are produced by a different mechanism; sectsty deals with both, but titlesec deals only with chapter The Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fncychap"macroslatexcontribsupportedfncychap package provides a nice collection of customised chapter heading designs 91Indent after section headings implements a style that doesn't indent the first paragraph after a section heading There are coherent reasons for this, but not everyone likes it The package indentfirststy (part of Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtools) suppresses the mechanism, so that the first paragraph is indented 92Footnotes in section headingsThe footnote command is fragile, so that simply placing the command in section's arguments isn't satisfactory Using protectfootnote isn't a good idea either: the arguments of a section command are used in the table of contents and (more dangerously) potentially also in page headings Unfortunately, there's no mechanism to suppress the footnote in the heading while allowing it in the table of contents, though having footnotes in the table of contents is probably unsatisfactory anywayTo suppress the footnote in headings and table of contents: Take advantage of the fact that the mandatory argument doesn't move if the optional argument is present: sectiontitletitlefootnotetitleftntUse the Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/footmisc"macroslatexcontribsupportedfootmisc package, with package option stablethis modifies footnotes so that they softly and silently vanish away if used in a moving argument 93Changing the margins in Don't do it. Learn some , produce some documents, and then ask again.You can never change the margins of a document by software, because they depend on the actual size of the paper What you can change are the distances from the apparent top and left edges of the paper, and the width and height of the text. Changing the last two requires more skill than you might expect. The height should bear a certain relationship to baselineskip. And the width should not be more than 75characters. Lamport's warning in his section on Customizing the Style really must be taken seriously. Oneinch margins on A4 paper are fine for 10 or 12pitch typewriters, but not for 10pt type (or even 11pt or 12pt) because so many characters per line will irritate the reader However Perhaps the easiest way to get more out of a page in is to get Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex209/contrib/misc/fullpage.sty"macroslatex209contribmiscfullpage.sty which sets the margins of the page identical to those of plain , i.e., 1inch margins at all four sides of the paper. It also contains an adjustment for A4 paperSomewhat more flexible is Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/vmargin.sty"macroslatexcontribothermiscvmargin.sty, which has a canned set of paper sizes (a superset of that provided in LaTeXe), provision for custom paper, margin adjustments and provision for twosided printingFor details of 's page parameters, see sectionC.5.3 of the manual (pp.181182) The origin in DVI coordinates is one inch from the top of the paper and one inch from the left side; positive horizontal measurements extend right across the page, and positive vertical measurements extend down the page. Thus, for margins closer to the left and top edges of the page than 1 inch, the corresponding parameters, i.e., evensidemargin, oddsidemargin, topmargin, can be set to negative valuesYou cannot simply change the margins of part of a document within the document by modifying the parameters shown in Lamport's figureC.3. They should only be changed in the preamble of the document, i.e., before the begindocument statement. To adjust the margins within a document we define an environment: newenvironmentchangemargin2beginlistsetlengthtopsep0ptsetlengthleftmargin1setlengthrightmargin2setlengthlistparindentparindentsetlengthitemindentparindentsetlengthparsepparskipitemendlist This environment takes two arguments, and will indent the left and right margins by their values, respectively. Negative values will cause the margins to be narrowed, so beginchangemargin1cm1cm narrows the left and right margins by 1cm 94Finding the width of a letter, word, or phrasePut the word in a box, and measure the width of the box. For example, newdimenstringwidthsetbox0hboxhistringwidthwd0 Note that if the quantity in the hbox is a phrase, the actual measurement only approximates the width that the phrase will occupy in running text, since the interword glue can be adjusted in paragraph modeThe same sort of thing is expressed in by: newlengthgnatsettowidthgnattextbfsmall This sets the value of the length command gnat to the width of small in boldface text 95Changing the space between lettersA common technique in advertising copy (and other text whose actual content need not actually be read) is to alter the space between the letters (otherwise known as the tracking) As a general rule, this is a very bad idea: it detracts from legibility, which is contrary to the principles of typesetting (any respectable font you might be using should already have optimum tracking built into it)The great type designer, Eric Gill, is (possibly apocryphally) credited with saying he who would letterspace lowercase text, would steal sheep (stealing sheep was, before Gill's time, a capital offence in Britain) As the remark suggests, though, letterspacing of uppercase text is less awful a crime; the technique used also to be used for emphasis of text set in gothic (or similar) fontsStraightforward macros (usable, in principle, with any macro package) may be found in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/generic/letterspacing.tex"macrosgenericletterspacing.texA more comprehensive package is Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/soul"macroslatexcontribsupportedsoul (which is optimised for use with , but also works with Plain Soul also permits hyphenation of letterspaced text; Gill's view of such an activity is not (even apocryphally) recorded 96Excluding blocks of text from the DVI fileRainer Schopf's verbatimsty provides a comment environment which excludes everything between begincomment and endcomment. This package is available as part of Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtoolsA more general environment for doing the job is Victor Eijkhout's commentsty, which lets you define environments for inclusion or exclusion in a document, thus offering a primitive configuration structure It is available from the CTAN sites in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex209/contrib/misc/comment.sty"macroslatex209contribmisccomment.sty 97Setting bold Greek letters in The simple solution (mathbf) doesn't always work, because lowercase Greek letters behave differently from uppercase Greek letters (due to Knuth's esoteric font encoding decisions) However, mathbf can be used for uppercase Greek letters in ordinary circumstances, but the AMSLaTeX package amsmathsty disables this fontswitching and you must use one of the techniques outlined belowThe plain solution does work, in a limited way: boldmaththeta but boldmath may not be used in maths mode, so this solution requires arcana such as: mboxboldmaththeta which then causes problems in superscripts, etcThese problems may be addressed by using a bold mathematics package The package bmsty, which is part of the tools distribution (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtools), defines a command bm which may be used anywhere in maths modeThe package amsbsysty, which is part of AMSLaTeX (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/amslatex"macroslatexrequiredamslatex) defines a command boldsymbol, which (though slightly less comprehensive than bm) covers almost all common casesAll these solutions cover all mathematical symbols, not merely Greek letters 98Defining a new loglike function in Use the mathop command, as in: newcommanddiagmathoprmdiagSubscripts and superscripts on diag will be placed exactly as they are on lim If you want your subscripts and superscripts always placed to the right, do: newcommanddiagmathoprmdiagnolimitsThis works in LaTeXo and in LaTeXe, but not under NFSS alone (see iref="rmnonsense"questionrmnonsense) However, the canonical method for doing this in LaTeXe is to use the the DeclareMathOperator command of amsopnsty (which is part of the AMSLaTeX package: Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/amslatex"macroslatexrequiredamslatex)(It should be noted that loglike was reportedly a joke on Lamport's part; it is of course clear what was meant.) 99Typesetting all those related logosKnuth was making a particular point about the capabilities of when he defined the logo Unfortunately, many believe, he thereby opened floodgates to give the world a whole range of rather silly bumpy road logos such as AMSTeX, PiCTeX, BibTeX, and so on, produced in a flurry of different fonts, sizes, and baselines indeed, everything one might hope to cause them to obstruct the reading process In articular, Lamport invented (silly enough in itself) and marketing input from AddisonWesley led to the even stranger current logo LaTeXe Sensible users don't have to follow this stuff wherever it goes, but, for those who insist, a large collection of logos is defined in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/eplain/texnames.sty"macroseplaintexnames.sty (but note that this set of macros isn't entirely reliable in LaTeXe) The MF and MP logos can be set in fonts that LaTeXe knows about (so that they scale with the surrounding text) using the package Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/mflogo"macroslatexcontribsupportedmflogo; but be aware that boobytraps surround the use of the Knuthian font for MP (you might get META O T in the font used to set MFReworded for the GELLMU edition) You needn't despair, however the author himself uses just MetaPostFor those who don't wish to acquire the proper logos, the canonical thing to do is to say AMSTeX (AMS) for AMSTeX, PicTeX (Pic) for PiCTeX, BibTeX (Bib) for BibTeX, and so onWhile the author of this FAQ list can't quite bring himself to do away with the bumpyroad logos herein, he regularly advises everyone else to 1001column abstract in 2column documentOne often requires that the abstract of a paper should appear across the entire page, even in a twocolumn paper The required trick is: documentclasstwocolumnarticlebegindocumentauthoretctwocolumnbegintwocolumnfalsemaketitlebeginabstractendabstractendtwocolumnfalse Unfortunately, with the above thanks won't work in the author list If you need such speciallynumbered footnotes, you can make them like this: titleDemonstrationauthorMeYouthankstwocolumnasaboverenewcommandthefootnotefnsymbolfootnotefootnotetext1Thanksfornothing and so on 101Changing babel's ideas of words to use uses symbolic names for many of the automaticallygenerated text it produces (specialpurpose section headers, captions, etc.) For example, the special section produced by the tableofcontents command is always called contentsname (or rather, what contentsname is set to)When babel is selecting a new language, it ensures that these symbolic names are translated appropriately for the language in question In particular, babel selects the document's main language at the point that begindocument is executed, which means that any changes to these symbolic names made in the prologue of a document that uses babel will be lostTherefore, babel defines a command to enable users to change the definitions of the symbolic names, on a perlanguage basis: addtocaptionslanguage is the thingFor example: addtocaptionsdanishrenewcommandcontentsnameIndholdsfortegnelse 102Code listings in Pretty code listings are sometimes considered worthwhile by the neurotically sthetic programmer, but they have a serious place in the typesetting of dissertations by computer science and other students who are expected to write programs Simple verbatim listings are commonly useful, as wellVerbatim listings are dealt with elsewhere (see iref="Q-verbfile"questionQ-verbfile) Pretty listings are generally provided by means of a precompiler, but the listings package (Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/listings"macroslatexcontribsupportedlistings) manages to do the job within The lgrind system (CTAN Href="ftp://ftp.tex.ac.uk/tex-archive/support/lgrind"supportlgrind) is a wellestablished precompiler, with all the facilities one might need and a wide repertoire of languagesThe tinyc2l system (CTAN Href="ftp://ftp.tex.ac.uk/tex-archive/support/tinyc2l"supporttinyc2l) is more recent: users are encouraged to generate their own driver files for languages it doesn't already deal with
Part OMacros for Particular Types of Documents103Setting papers for journalsPublishers of journals have a wide range of requirements for the presentation of papers, and while many publishers do accept electronic submissions in AllTeX, they don't often submit recommended macros to public archivesNevertheless, there are considerable numbers of macros of one sort or another available on CTAN; searching for your journal name in the CTAN catalogue http://www.tex.ac.uk/tex-archive/help/Catalogue/catalogue.html may well turn up what you're seekingFailing that, you may be well advised to contact the prospective publisher of your paper; many publishers have macros on their own web sites, or otherwise available only upon applicationCheck that the publisher is offering you macros suitable to an environment you can use: a few still have no macros for current , for example, claiming that LaTeXo is good enoughSome publishers rekey anything sent them anyway, so that it doesn't really matter what macros you use Others merely encourage you to use as few extensions of a standard package as possible, so that they will find it easy to transform your paper to their own internal form 104A report from lots of articlesThis is a requirement, for example, if one is preparing the proceedings of a conference whose papers were submitted in There's no canned solution, but Matt Swift's includex and moredefs packages (both part of the Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/frankenstein"macroslatexcontribsupportedfrankenstein bundle) offer a possible way forwardincludex enables you to includedoc complete articles (in the way that you include chapter files in an ordinary report) It doesn't do the whole job for you, though You need to analyse the package use of the individual papers, and ensure that a consistent set is loaded in the preamble of the main reportAnother tedious problem to address is that suppresses all titlerelated commands after maketitle has been used once in a document: thus you need to define replacements for all of them, for use in the papersMore work is plainly needed in this area, but at least a start has been made 105Curriculum Vitae (Resume)A framework class for Curricula Vitae, provided by Andrej Brodnik, is available from Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/vita"macroslatexcontribothervitaThe class can be customised both for subject (example class option files are offered for both computer scientists and singers), and for language (both the options provided are available for both English and Slovene) Extensions may be written by creating new class option files, or by using macros defined in the class to define new entry types, etc
Part PThings are Going Wrong106Weird hyphenation of wordsYou may have a version mismatch problem. 's hyphenation system changed between version2.9 and3.0 If you are using (plain) version3.0 or later, make sure your plaintex file has a version number which is at least3.0 If you are using LaTeXo you should consider upgrading to LaTeXe; if for some reason you can't, the last version of LaTeXo, released on 25 March 1992, is available (for the time being at least) from Href="ftp://ftp.tex.ac.uk/tex-archive/obsolete/macros/latex209/distribs/latex209.tar"obsoletemacroslatex209distribslatex209.tar and ought to solve this problemIf you're using LaTeXe, the problem probably arises from your hyphencfg file, which has to be created if you're using a multilingual versionFor the curious, here's what happened: before 3.0 the hyphenation algorithm would not break a word if the part before the break was not at least two characters long, and the part after the break at least three characters long. Starting with version 3.0 the parameters lefthyphenmin and righthyphenmin control the length of these fragments. These are set to 2 and 3, respectively, in the new plain and lplain formats They can be set to any value, of course, but if lefthyphenminrighthyphenmin is greater than 62, all hyphenation is suppressedA further source of oddity can derive from the 1995 release of Corkencoded fonts (iref="ec-fonts"questionec-fonts), which introduced an alternative hyphen character The LaTeXe configuration files in the font release specified use of the alternative hyphen, and this could produce odd effects with words containing an explicit hyphen The font configuration files in the December 1995 release of LaTeXe do not use the alternative hyphen character, thus removing this source of problems 107(Merely) peculiar hyphenationYou may have found that 's famed automatic worddivision does not produce the breakpoints recommended by your dictionary. This may be because is set up for American English, whose rules for word division (as specified, for example, in Webster's Dictionary) are completely different from the British ones (as specified, for example, in the Oxford Dictionaries). This problem is being addressed by the UK User community (see Baskerville, issue4.4) but an entirely satisfactory solution will take time An interim hyphenation file is available in Href="ftp://ftp.tex.ac.uk/tex-archive/language/hyphenation/ukhyphen.tex"languagehyphenationukhyphen.tex 108Accented words aren't hyphenated's algorithm for hyphenation gives up when it encounters an accent command; there are good reasons for this, but it means that quality typesetting in nonEnglish languages can be difficultFor itself, avoiding this effect means using Corkencoded fonts (iref="ec-fonts"questionec-fonts) which contain accented letters as single glyphs In the future, perhaps, Omega (iref="Q-omega"questionQ-omega) will provide a rather different solution 109Enlarging The error message capacity exceeded covers a multitude of problems What has been exhausted is listed in brackets after the error message itself, as in: TeXcapacityexceededsorrymainmemorysize263001 Most of the time this error can be fixed without enlarging . The most common causes are unmatched braces, extralong lines, and poorlywritten macros. Extralong lines are often introduced when files are transferred incorrectly between operating systems, and lineendings are not preserved properly (the telltale sign of an extralong line error is the complaint that the bufsize has overflowed)If you really need to extend your 's capacity, the proper method depends on your installation There is no need (with modern implementations) to change the defaults in Knuth's WEB source; but if you do need to do so, use a change file to modify the values set in module 11, recompile your and regenerate all format filesModern implementations allow the sizes of the various bits of 's memory to be changed semidynamically Some (such as em) allow the memory parameters to be changed in commandline switches when is started; most frequently, a configuration file is read which specifies the size of the memory On web2cbased systems, this file is called texmfcnf: see the documentation that comes with the distribution for other implementations Again, in many cases, the format files need to be regenerated after changing the memory parameters 110Moving tables and figures in Tables and figures have a tendency to surprise, by floating away from where they were specified to appear This is in fact perfectly ordinary document design; any professional typesetting package will float figures and tables to where they'll fit without violating the certain typographic rules Even if you use the placement specifierh for here, the figure or table will not be printed here if doing so would break the rules; the rules themselves are pretty simple, and are given on page198, sectionC.9 of the manual In the worst case, 's rules can cause the floating items to pile up to the extent that you get an error message saying Too many unprocessed floats; this means that the limited set of registers in which stores floating items is full What follows is a simple checklist of things to do to solve these problems (the checklist talks throughout about figures, but applies equally well to tables) Are the placement parameters on your figures right The default (tbp) is reasonable; you should never simply say h, for example, since that says if it cant go here, it cant go anywhere, and as a result all subsequent floats pile up behind itCan you perhaps prevent your figures from floating by adjusting 's placement parameters Again, the defaults are reasonable, but can be overridden in case of problems The parameters are described on pages199200, sectionC.9 of the manualAre there places in your document where you could naturally put a clearpage command If so, do: the backlog of floats is cleared after a clearpage (Note that the chapter command implicitly executes clearpage, so you can't float past the end of a chapter.)Have a look at the LaTeXe afterpage package (part of Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/required/tools"macroslatexrequiredtools) Its documentation gives as an example the idea of putting clearpage after the current page (where it will clear the backlog, but not cause an ugly gap in your text), but also admits that the package is somewhat fragile (though it's improving)As a last resort, try the package Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex209/contrib/misc/morefloats.sty"macroslatex209contribmiscmorefloats.sty; this simply increases the number of floating inserts that can handle at one time (from18 to36), but that may suit your needsIf you actually wanted all your figures to float to the end (e.g., for submitting a draft copy of a paper), don't rely on 's mechanism: get the package Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/endfloat"macroslatexcontribsupportedendfloat to do the job for you 111pagestyleempty on first page in If you use pagestyleempty, but the first page is numbered anyway, you are probably using the maketitle command too. This is not a bug but a feature The standard styles are written so that initial pages (pages containing a maketitle, part, or chapter) have a different page style from the rest of the document; Hence, the commands internally issue thispagestyleplain. This is usually not acceptable behaviour if the surrounding page style is emptyPossible workarounds include: Put thispagestyleempty immediately after the maketitle command, with no blank line between themUse fancyhdrsty, which allows you to customise the style for initial pages independently of that for body pages It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyhdr"macroslatexcontribsupportedfancyhdrUse nopagenosty, which suppresses this behaviour It is available in Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/carlisle/nopageno.sty"macroslatexcontribsupportedcarlislenopageno.sty 112Underlined text won't breakKnuth made no provision for underlining text: he took the view that underlining is not a typesetting operation, but rather one that provides emphasis on typewriters, which typically offer but one typeface The corresponding technique in typeset text is to switch from upright to italic text (or viceversa): the command emph does just that to its argumentNevertheless, typographically illiterate people (such as those that specify doublespaced thesis styles iref="Q-linespace"questionQ-linespace) continue to require underlining of us, so as distributed defines an underline command that applies the mathematical underbar operation to text This technique is not entirely satisfactory, however: the text gets stuck into a box, and won't break at line endThe solution is the package Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/other/misc/ulem.sty"macroslatexcontribothermisculem.sty, which redefines the emph command to underline its argument; the underlined text thus produced behaves as ordinary emphasised text, and will break over the end of a line (The package is capable of other peculiar effects, too: read its documentation, contained within the file itself.) 113Odd behaviour of rm, bf, etc.If commands such as rm and bf have suddenly stopped working in in the way that you expect, it is likely that your system administrator has installed a version of LaTeXo with a prototype version of the NFSS (iref="latex2e"questionlatex2e) Complain loudly; ask your system administrator to replace this version with LaTeXe (iref="latex2e"questionlatex2e), in which commands such as rm and bf work just as before if you are using one of the standard classesarticle, report and book (among others) In the meantime, use the option oldlfontsty, which should have been installed at the same time as NFSS 114Old font references such as tenrmLaTeXo defined a large set of commands for access to the fonts that it had built in to itself For example, various flavours of cmr could be found as fivrm, sixrm, sevrm, egtrm, ninrm, tenrm, elvrm, twlrm, frtnrm, svtnrm, twtyrm and twfvrm These commands were never documented, but certain packages nevertheless used them to achieve effects they neededSince the commands weren't public, they weren't included in LaTeXe; to use the unconverted LaTeXo packages under LaTeXe, you need also to include the package rawfontssty (which is part of the LaTeXe distribution) 115Missing symbolsIf some symbols, such as Box and lhd, no longer appear to exist, then your system administrator has probably upgraded your version of to either use the prototype NFSS or LaTeXe itself (iref="latex2e"questionlatex2e) In the former case, use oldlfontsty, iref="rmnonsense"as in the questionrmnonsense In the latter, use the package latexsym, which is part of the LaTeXe distribution, or the package amsfonts, if it is available 116 gets crossreferences wrongSometimes, however many times you run , the crossreferences are just wrong. Remember that the label command must come after the caption command, or be part of it. For example, lllbeginfigurebeginfigurecaptionAFigureorcaptionAFigurelabelfiglabelfigendfigureendfigure
117 and in macro namesA common source of problems in a document is the diagnostic about the appearance of the command , or about other commands containing the character The most common complaint is You cant use spacefactor in vertical mode, but others occurSuch problems are usually caused by including a LaTeXe class or package file into a document by some means other than documentclass or usepackage defines internal commands whose names contain the character ; this enables it to avoid clashes between its internal names and names that we would normally use in our documents In order that these commands may work at all, documentclass and usepackage play around with the meaning of Solve this problem by using the correct command to include the fileBut, you will say, The Companion tells me to use commands containing Indeed; for example, there's a lengthy section about startsection and how to use it to control the appearance of section titles Page15 of The Companion explains this; and suggests that you make such changes in the document preamble, between makeatletter and makeatother So the definition of subsection on page26 could be:makeatletterrenewcommandsubsectionstartsectionsubsectionnamenormalfontnormalsizeitshapestylemakeatother 118Where are the msx and msy fonts?The msx and msy fonts were designed by the American Mathematical Society in the very early days of , for use in typesetting papers for mathematical journals They were designed using the old MF, which wasn't portable and is no longer available; for a long time they were only available in 300dpi versions which only imperfectly matched modern printers The AMS has now redesigned the fonts, using the current version of MF, and the new versions are called the msa and msb families; they are available from Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/ams/amsfonts-symbols"fontsamsamsfontssymbolsNevertheless, msx and msy continue to turn up to plague us There are, of course, still sites that haven't got around to upgrading; but, even if everyone upgraded, there would still be the problem of old documents that specify themIf you have a tex source that requests msx and msy, the best technique is to edit it so that it requests msa and msb (you only need to change the single letter in the font names)If you have a DVI file that requests the fonts, there is a package of virtual fonts (iref="virtualfonts"questionvirtualfonts) to map the old to the new series; it's available in Href="ftp://ftp.tex.ac.uk/tex-archive/fonts/vf-files/msx2msa"fontsvffilesmsx2msa 119Where are the am fonts?One still occasionally comes across a request for the am series of fonts The initials stood for Almost [Computer] Modern, and they were the predecessors of the Computer Modern fonts that we all know and love (or hate)The fonts acquired their label Almost following the realisation that their first implementation in MF79 still wasn't quite right; Knuth's original intention had been that they were the final answer There's not a lot one can do with these fonts; they are (as their name implies) almost (but not quite) the same as the cm series; if you're faced with a document that requests them, all you can reasonably do is to edit the document The appearance of DVI files that request them is sufficiently rare that noone has undertaken the mammoth task of creating a translation of them by means of virtual fonts; however, most drivers let you have a configuration file in which you can specify font substitutions. If you specify that every am font should be replaced by its corresponding cm font, the output should be almost correct 120String too long in BibTeXThe BibTeX diagnostic Warningyouve exceeded 1000, the globalstringsize, for entry foo usually arises from a very large abstract or annotation included in the database The diagnostic usually arises because of an infelicity in the coding of abstractbst, or styles derived from it (One doesn't ordinarily output annotations in other styles.)The solution is to make a copy of the style file (or get a clean copy from CTAN Href="ftp://ftp.tex.ac.uk/tex-archive/biblio/bibtex/contrib/abstract.bst"bibliobibtexcontribabstract.bst), and rename it (e.g., on a long filename system to abstractlongbst) Now edit it: find function outputnonnull and change its first line (line 60 in the version on CTAN) from s to swap, anddelete its last line, which just says s (line 84 in the version on CTAN) Finally, change your bibliographystyle command to refer to the name of the new fileThis technique applies equally to any bibliography style: the same change can be made to any similar outputnonnull function If you're reluctant to make this sort of change, the only way forward is to take the entry out of the database, so that you don't encounter BibTeX's limit, but you may need to retain the entry because it will be included in the typeset document In such cases, put the body of the entry in a separate file: articlelongboringauthorFredVerboseabstractinputabstractslongtex In this way, you arrange that all BibTeX has to deal with is the file name, though it will tell (when appropriate) to include all the long text
Part QWhy does it do that?121What's going on in my include commands?The original provided the include command to address the problem of long documents: with the relatively slow computers of the time, the companion includeonly facility was a boon With the vast increase in computer speed, includeonly is less valuable (though it still has its place in some very large projects) Nevertheless, the facility is retained in current , and causes some confusion to those who misunderstand itIn order for includeonly to work, include makes a separate aux file for each included file, and makes a checkpoint 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 What's more, this mechanism doesn't work if a include command appears in a file that was included itself: diagnoses this as an errorSo, we can now answer the two commonest questions about include: Why does throw a page before and after include commands Answer: because it has to If you don't like it, replace 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 Why can't I nest included files? I always used to be able to under LaTeXo Answer: in fact, you couldn't, even under LaTeXo, but the failure wasn't diagnosed However, since you were happy with the behaviour under LaTeXo, replace the include commands with input commands (with clearpage as appropriate) 122Why does it ignore paragraph parameters?When is laying out text, it doesn't work from word to word, or from line to line; the smallest complete unit it formats is the paragraph The paragraph is laid down in a buffer, as it appears, and isn't touched further until the endparagraph marker is processed It's at this point that the paragraph parameters have effect; and it's because of this sequence that one often makes mistakes that lead to the paragraph parameters not doing what one would have hoped (or expected)Consider the following sequence of : raggedrightdeclarationforraggedtextHerestexttoberangedleftinouroutputbutitstheonlysuchparagraphsowenowendthegroupHeresmorethatneedntberagged will open a group, and set the raggedsetting parameters within that group; it will then save a couple of sentences of text and close the group (thus restoring the previous value of the raggedsetting parameters) Then it encounters a blank line, which it knows to treat as a par token, so it typesets the two sentences; but because the enclosing group has now been closed, the parameter settings have been lost, and the paragraph will be typeset normallyThe solution is simple: close the paragraph inside the group, so that the setting parameters remain in place An appropriate way of doing that is to replace the last three lines above with: endthegroupparHeresmorethatneedntberagged In this way, the paragraph is completed while the setting parameters are still in force within the enclosing groupAnother alternative is to define an environment that does the appropriate job for you For the above example, already defines an appropriate one: beginflushleftHerestexttoberangedleftendflushleft 123What's the reason for protection?Sometimes saves data it will reread later. These data are often the argument of some command; they are the socalled moving arguments (Moving because data are moved around.) Places to look for are all arguments that may go into table of contents, list of figures, etc.; namely, data that are written to an auxiliary file and read in later Other places are those data that might appear in head or footlines Section headers and figure captions are the most prominent examples; there's a complete list in Lamport's book (see iref="Q-books"questionQ-books) What's going on really, behind the scenes? The commands in the moving arguments are already expanded to their internal structure during the process of saving. Sometimes this expansion results in invalid code when processed again. protectcmd tells to save cmd as cmd, without expansionWhat is a fragile command It's a command that expands into illegal code during the save processWhat is a robust command It's a command that expands into legal code during the save processNoone (of course) likes this situation; the 3 team have removed the need for protection of some things in the production of LaTeXe, but the techniques available to them within current mean that this is an expensive exercise It remains a longterm aim of the team to remove all need for these things 124Why doesn't verb work within?The verbatim commands work by changing category codes Knuth says of this sort of thing Some care is needed to get the timing right, since once the category code has been assigned to a character, it doesn't change So verb has to assume that it is getting the first look at its parameter text; if it isn't, has already assigned category codes so that verb doesn't have a chance For example: verberror will work (typesetting error), but newcommandunbrace11unbraceverberror will not (it will attempt to execute error) Other errors one may encounter are verb ended by end of line, or even verb illegal in command argumentThis is why the book insists that verbatim commands must not appear in the argument of any other command; they aren't just fragile, they're quite unusable in any command parameter, regardless of protection (iref="Q-protect"questionQ-protect) 125Casechanging oddities provides two primitive commands uppercase and lowercase to change the case of text; they're not much used, but are capable creating confusionThe two commands do not expand the text that is their parameter the result of uppercaseabc is ABC, but uppercaseabc is always abc, whatever the meaning of abc The commands are simply interpreting a table of equivalences between upper and lowercase characters They have (for example) no mathematical sense, and uppercaseAboutyfx will produce ABOUTYFX which is probably not what is wantedIn addition, uppercase and lowercase do not deal very well with nonAmerican characters, for example uppercaseae is the same as ae provides commands MakeUppercase and MakeLowercase which fixes the latter problem These commands are used in the standard classes to produce upper case running heads for chapters and sectionsUnfortunately MakeUppercase and MakeLowercase do not solve the other problems with uppercase, so for example a section title containing begintabular endtabular will produce a running head containing beginTABULAR The simplest solution to this problem is using a userdefined command, for example: newcommandmytablebegintabularendtabularsectionAsectiontitleprotectmytablewithatable Note that mytable has to be protected, otherwise it will be expanded and made upper case 126Why are signs doubled in macros?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 argumentSo if you define a macro and use it as: defa1111ab the macro expansion produces bbb, which people find normal However, if we now replace part of the macro: defa11defx1xxx1 ab will expand to bdefxbxxxb This defines x to be a macro delimited by b, and taking no arguments, which people may find strange, even though it is just a specialisation of the example above If you want a to define x to be a macro with one argument, you need to write: defa11defx1xxx1 and ab will expand to bdefx1xxx1, because 1 gets replaced by b and gets replaced by To nest a definition inside a definition inside a definition then you need 1, as at each stage is replaced by At the next level you need 8s each time, and so on 127Why does split footnotes across pages? splits footnotes when it can think of nothing better to do Typically, when this happens, the footnote mark is at the bottom of the page, and the complete footnote would overfill the page could try to salvage this problem by making the page short of both the footnote and the line with the footnote mark, but its priorities told it that splitting the footnote would be preferableAs always, the best solution is to change your text so that the problem doesn't occur in the first place Consider whether the text that bears the footnote could move earlier in the current page, or on to the next pageIf this isn't possible, you might want to change 's perception of its priorities: they're controlled by interfootnotelinepenalty the larger it is, the less willing is to split footnotesSetting interfootnotelinepenalty10000 inhibits split footnotes altogether, which will cause Underfull vbox messages unless you also specify raggedbottom The default value of the penalty is 100, which is rather mildAn alternative technique is to juggle with the actual size of the pages enlargethispage changes the size of the current page by its argument (for example, you might say enlargethispagebaselineskip to add a single line to the page, but you can use any ordinary length such as 15mm or 20pt as argument) Reducing the size of the current page could force the offending text to the next page; increasing the size of the page may allow the footnote to be included in its entirety It may be necessary to change the size of more than one page 128Getting marginpar on the right sideIn twoside documents, makes stirling attempts to put marginpars in the correct margin (the outer or the gutter margin, according to the user's command) However, a boobytrap arises because runs its page maker asynchronously If a marginpar is processed while page n is being being built, but doesn't get used until page n1, then the marginpar will turn up on the wrong side of the pageThe solution to the problem is for to remember which side of the page each marginpar should be on The package Href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/mparhack"macroslatexcontribsupportedmparhack does this, using marks stored in the aux file 129Why does PiCTeX run out of dimens?PiCTeX uses a lot of 's counter and length registers Since only has 256 of each, it's therefore often impossible to load PiCTeXThe Cont modules mpictextex (for plain and variants) or mpictexsty (for both files are available from Href="ftp://ftp.tex.ac.uk/tex-archive/macros/context-tmf"macroscontexttmf) mpictextex provides an ingenious solution to the problem based on hacking the code of newdimen itselfAn alternative is Andreas Schrell's pictexwd packages (from Href="ftp://ftp.tex.ac.uk/tex-archive/graphics/pictex-addon"graphicspictexaddon, which replaces PiCTeX itself and simply uses less registers 130Why won't fixed names stay changed? has many commands that define the names that are used for common functions in document for example, chaptername, figurename, and so on These names allow users to adjust the appearance of their documents, most notably when the document itself is being written in a language other than 's default EnglishThe babel package, of course, uses this mechanism extensively, setting up a new set of names whenever the user declares that the current language is changing However, babel's defaults are not to everyone's liking, so users often want to change names after they've loaded babelThe simplest approach: usepackagefrenchbbabelrenewcommandrefnameBibliographie doesn't work: babel actually performs its selectlanguage operation at the start of the document, and so the renewcommand is lost For a singlelanguage document, the sequence: usepackagefrenchbbabelAtBeginDocumentrenewcommandrefnameBibliographie will overcome this problem, but this solution is not stable if the document later becomes a multilanguage one, the original version of refname will be restored every time the language switches back to French The solution is to use the babel command addto, as follows: usepackagefrenchbbabeladdtocaptionsfrenchbrenewcommandrefnameBibliographieThis last code will establish the new name for use at every change of to the language, and is the recommended way for defining new names The captionsfrenchb shown above is an example: in general the name to use is captionsyourlanguage, where yourlanguage is the language option given to babel in the first place
Part RCurrent Projects131LaTeXe (the new standard )LaTeXe is the version of prepared and supported by the 3 project team (iref="LaTeX3"questionLaTeX3) With the advent of LaTeXe, users gained a formal support structure, and the knowledge that bug fixes would be incorporated into the distribution on a fairly regular basis (new releases appear at approximately 6month intervals)LaTeXe is so structured that significant enhancements may be added using macro addons, rather than by the different formats that were the bane of the LaTeXo worldLaTeXe is upwardly compatible with LaTeXo, but has new features In the latest (June 1999) release, these include: The font selection scheme is different (based on the New Font Selection Scheme (NFSS) described by Frank Mittelbach and Rainer Schopf in TUGboat 10(2) The NFSS the user may select a font by specifying an array of required properties (such as size, weight and series); commands that provide the LaTeXo syntax remainSliTeX is now merely a different document class, so that there is no longer a need for a separate formatBetter control of floating environments, such as figuresThere is a documented interface for package and class writers (though not yet for designers)The box commands have been enhanced, with e.g., options to specify the height of a minipageSeveral standard commands are no longer fragile (iref="Q-protect"questionQ-protect); they can therefore be included in the argument of commands such as caption without being protectednewcommand can define commands with one optional argument; such commands are automatically robust; there is also a separate command to define robust commandsThere are standard packages for graphics inclusion and colour typesettingThere is standard support for typesetting in cyrillic 132The 3 projectThe 3 project team (see http://www.latex-project.org/latex3.html) is a small group of volunteers whose aim is to produce a major new document processing system based on the principles pioneered by Leslie Lamport in the current It will remain freely available and it will be fully documented at all levelsThe 3 team's first product, LaTeXe (iref="latex2e"questionlatex2e), was delivered in 1994, and the team undertakes its maintenance 133The Omega projectOmega () is a program built as an extension of the sources which works internally with 16bit characters (Unicode); this allows it to work with most scripts in the world with much reduced coding scheme complications Omega also has a powerful concept of input and output filters to allow the user to work with existing transliteration schemes, etc Omega is an ongoing project by John Plaice (plaicecseunsweduau) and Yannis Haralambous (YannisHaralambousunivlille1fr) An email discussion list is available: subscribe by sending a message subscribeomegayour name to listservensfrThe base distribution of was released in November 1996; it is available via Href="ftp://ftp.tex.ac.uk/tex-archive/systems/omega"systemsomegaImplementations of Omega are available as part of the te, mik, fp and CMac distributions (QrefTeXsystems) 134The NTS projectThe NTS project first saw the light of day at the Hamburg meeting of DANTE during 1992, as a response to an aspiration to produce something even better than The project is not simply enhancing , for two reasons: first, that itself has been frozen by Knuth (see iref="tex-future"questiontex-future), and second, even if they were allowed to develop the program, some members of the NTS team feel that in its present form is simply unsuited to further development While all those involved in the project are involved with, and committed to, , they recognise that the end product may very well have little in common with other than its philosophyInitially, and despite the reservations expressed at the inaugural meeting, the group is concentrating on extending per se: members are implementing extensions and enhancements to through the standard medium of a changefile These extensions and enhancements, together with proper, form a system called eTeX, which is 100 compatible with furthermore, it is possible during format creation to construct a format that is : no extensions or enhancements are presentThe final aim of the project will be to produce an entirely new typesetting system, building on the experience gained in the earlier phases This system is intended to provide a stable basis for typesetting in the future, in the way that has since it was first offered to the worldA distribution of eTeX was made available in November 1996 It is available via Href="ftp://ftp.tex.ac.uk/tex-archive/systems/e-tex"systemsetex; eTeX is also distributed on the Live CDROM (see iref="Q-CD"questionQ-CD) 135The PDF projectPDF (formerly known as 2PDF) arose from Han The Thanh's postgraduate research at Masaryk University, Brno, Czech Republic The basic idea is very simple: to provide a version of that can output PDF as an alternative format to DVI PDF implements a small number of new primitives, to switch to PDF output, and to control various PDF features Han The Thanh is continuing work on the project; the latest version is available from Href="ftp://ftp.tex.ac.uk/tex-archive/systems/pdftex"systemspdftex, and a version was distributed on the Live CDROM (see iref="Q-CD"questionQ-CD)
Part SPerhaps There isn't an Answer136What to do if you find a bugFor a start, make entirely sure you have found a bug Doublecheck with books about , , or whatever you're using; compare what you're seeing against the other answers above; ask every possible person you know who has any related expertise The reasons for all this caution are variousIf you've found a bug in itself, you're a rare animal indeed Don Knuth is so sure of the quality of his code that he offers real money prizes to finders of bugs; the cheques he writes are such rare items that they are seldom cashed. If you think you have found a genuine fault in itself (or MF, or the CM fonts, or the book), don't immediately write to Knuth, however. He only looks at bugs once or twice a year, and even then only after they are agreed as bugs by a small vetting team. In the first instance, contact Barbara Beeton at the AMS (bnbmathamsorg), or contact TUG (iref="Q-TUG"questionQ-TUG) If you've found a bug in LaTeXe, look in the bugs database to see if it's already been reported If not you should submit details of the bug to the 3 team To do this, you should process the file latexbugtex with (the file is part of the LaTeXe distribution The process will give you instructions about what to do with your bug report (it can, for example, be sent to the team by email) Please be sparing of the team's time; they're doing work for the good of the whole community, and any time they spend tracking down nonbugs is time not available to write or debug new code Details of the whole process, and an interface to the database, are available via http://www.latex-project.org/help.htmlIf you've found a bug in LaTeXo, or some other such unsupported software, there's not a lot you can do about it You may find help or de facto support on a newsgroup such as comptextex or on a mailing list such as texhaxtexacuk, but posting nonbugs to any of these forums can lay you open to ridicule Otherwise you need to go out and find yourself a willing consultant TUG maintains a register of consultants (see http://www.tug.org/consultants.html)