Contents of the teTeX HOWTO: The Linux-teTeX Local Guide are Copyright (c) 1997 by Robert A. Kiesling. Permission is granted to copy this document, in whole or in part, provided that credit is given to the author and the Linux Documentation Project. Send all complaints, sug­ gestions, errata, and any miscellany to Robert_A._Kiesling@macline.com, so I can keep this document as com­ plete and up to date as possible. Thanks! --Robert Kiesling The teTeX HOWTO: The Linux-teTeX Local Guide Robert Kiesling v2.0, 14 May 1997 Table of Contents 1. DO I REALLY WANT TO DO THIS? 2. What is TeX? What is LaTeX? What is teTeX? What is the difference? 3. Performing the actual installation. 4. Typesetting text. 5. Mixing text and graphics with dvips. 6. Using PostScript (tm) fonts. Appendices. A. CTAN Site Listing. 1. 1. DO I REALLY WANT TO DO THIS? FAQ No. 1. My computer just ate NINE high density diskettes' worth of data. WHAT HAPPENED? Answer: Installing teTeX on Chanel3, my Compaq laptop, was like dropping a 20-foot concrete bridge section exactly into place from a height of 50 feet. teTeX is a BIG package. Even so, it is a moderately complete implementation of TeX 3.1415 and LaTeX 2e for Linux systems. TeX is very big subject anyway, so you can expect to spend the rest of your computing career keeping up-to-date on the latest in the world of TeX. That is to say, installing and using teTeX is not for the faint of heart. Nor is it for daytrippers. You can expect to spend some serious quality time with this package. Thomas Esser, the author of teTeX, has gone to great lengths to make the package fast, complete, and easy to use. Because TeX is implemented for practically every serious computer system in the world -- and quite a few "non-serious" ones -- implementors must provide the installation facilities for all of them. This accounts in part for teTeX's size. It also accounts for the fact that the pieces necessary to make a workable teTeX installation are spread all over your friendly neighborhood CTAN archive. CTAN is the Combined TeX Archive Network, a series of FTP sites which archive TeX programs, macros, fonts, and documentation. You'll probably become familiar with at least one CTAN site. In this document, a pathname like CTAN/contrib/pstricks means look in the directory contrib/pstricks of your nearest CTAN site." See Appendix A for a current list of CTAN sites and their mirror sites. Fortunately, some considerate implementors of the Linux Slackware Distribution have assembled all of the necessary pieces for us. If you haven't installed the Slackware distribution from scratch, you don't have the wonderful Slackware installpkg or setup utilities. Don't worry. It's not too difficult to install the individual pieces of teTeX from the command line. 2. difference? 2. What is TeX? What is LaTeX? What is teTeX? What is the TeTeX is Thomas Esser's implementation of TeX for Linux systems. This means the executable programs themselves run under Linux and the fonts are provided in form which is usable by the Linux/teTeX system. The rest of the code, TeX and LaTeX itself, is portable across various machines. In addition to the executable programs, the distribution includes all of the TeX, LaTeX, and metafont sources, BibTeX, MakeIndex, and ALL of the documentation... about 3 megabytes' worth. In short, teTeX is a reasonably complete implementation of TeX 3.1419 and LaTeX 2e, and the documentation covers everything you will forseeably know to get started. So, you should install all of the documents. Not only will you eventually read them, they also provide useful examples of "live" TeX and LaTeX code. In comparison with other implementations of TeX, the installation of teTeX is almost trivial even without the Slackware configuration utilities, if you don't count the effort necessary to insert and remove the nine diskettes of the Slackware distribution. If you installed and have used Slackware-distributed teTeX, you can pretty much skip the rest of this section, and the next. But for the rest of you... TeX is a typesetting system developed by Professor Donald Knuth of Stanford University. It is a lower-level typesetting language that powers all of the higher-level packages, like LaTeX. Essentially, LaTeX is a set of TeX macros which provide convenient, predefined document formats for end users. If you like the formats provided by LaTeX, you may never need to learn bare-bones TeX programming. The difference between the two languages is like the difference between assembly language and C. You can have the speed and flexibility of TeX, or the convenience of LaTeX. Which brings us to the next answer, ANSWER NO. 2: YOU HAVE IT BACKWARDS!!! I WANT TO KNOW WHAT EXACTLY I NEED TO GET BEFORE I CAN HAVE TeX ON MY SYSTEM! It's important to remember that TeX only handles the typesetting part of the document preparation. Generating output with TeX is like compiling source code into object code which still needs to be linked. You prepare an input file with a text editor -- what most people think of as "word processing" -- and typeset the input file document with TeX to produce a device-independent output file, called a DVI file. You also need output output drivers for your printer and video display. These output drivers use TeX's DVI output to display your typeset document on the screen or on paper. This software is collectively known as "dviware." For example, TeX itself only makes requests for fonts. It is up to the DVI driver to provide the actual font to the display device if necessary, regardless whether it is the screen or a printer. This extra step may seem overly complicated, but the abstraction allows documents to display the same on different devices with no change to the original document. In fact, much of TeX, and therefore LaTeX's complexity, arises from its implementation of various font systems, and the way these fonts are specified. A major improvement of LaTeX 2e over its predecessor was the way users specify fonts, the former New Font Selection Scheme. (See Section 6.) TeTeX comes distributed with about a dozen standard fonts preloaded, which is enough to get you started. Also provided are the font metrics descriptions, in .tfm (TeX font metric) files. To generate the other fonts you will need, it is simply a matter of installing the metafont sources. Tetex's DVI utilities will invoke metafont automatically and generate the Computer Modern fonts you need, on-the- fly. Section 6 discusses how to get teTeX to use Postscript fonts on your system. Sometime in the future I'd like to add a section that describes how to unify all of the various font schemes on your machine. Not only will this provide you with a more consistent look on-screen and in print, it can save you wads of disk space, too. By the way, the letters of the word "TeX" are Greek, tau-epsilon-chi. This is not a fraternity. Instead, it is the root of the Greek word "techne," which means art and/or science. "TeX" is not pronounced like the first syllable in "Texas." The chi has no English equivalent, but TeX is generally pronounced so that it rhymes with "yecch." When writing, "TeX," on character devices, always use the standard capitalization, or the TeX{} macro in typesetting. This is how TeX is distinguished from other text systems. Speaking of typing, any of the editors which come with Linux -- jed, joe, jove, vi, vim, stevie, emacs, microemacs -- will work to prepare a TeX input file, as long as the editor reads and writes plain-vanilla ASCII text. My preference is GNU emacs. There are several reasons for this: 1. Emacs's TeX and LaTeX modes obviate the need for a stand-alone TeX shell. 2. Emacs can automatically insert TeX-style, ``curly quotes,'' as you type, rather than the "ASCII-vanilla" kind. 3. Emacs has integrated support for texinfo and makeinfo, a hypertext documentation system. 4. Emacs is widely supported. Version 19.34, for example, is included in Slackware 96. 5. Emacs does everything except butter the toast in the morning. 5. Emacs is free. There's a lot of software to assemble. In the meantime, you can start in "learning" TeX and LaTeX. Remember that teTeX and the font packages have been designed as two separate entities: teTeX is specific to Linux, but the CM, DC, American Mathematical Society, or other font distributions have been designed for many different platforms. While you are working on assembling the files, you can take a few breaks to locate some of the documentation you will need. There are user manuals available both commercially and via the Internet. Judging by the number of mentions they receive in the comp.text.tex newsgroup, the most useful -- and definitive -- commercially available texts for beginners are: "LaTeX: A Document Preparation System," by Leslie Lamport, 272 pp. If you're using LaTeX instead of plain TeX (highly recommended), this is the definitive reference. If you must use plain TeX, "The TeXBook," by Donald Knuth, 483 pp., is the definitive reference. It is also necessary if you plan to do any serious class, package, or macro writing for LaTeX. Also, "The LaTeX Companion," by Michel Goosens, Frank Mittelbach, and Alexander Samarin, 530 pp., is more advanced than the Lamport, above. If you are approaching TeX or LaTeX for the first time, you'll likely feel lost reading this. (I was.) However, when you need to add extension packages, like PSNFSS (See Section 6.) or BibTeX, a bibliography indexing program, this book is one of the most highly regarded on the market. There's also supposed to be an edition devoted entirely to TeX/LaTeX graphics soon. At your nearest CTAN site you can retrieve these documents for free: "The Not So Short Introduction to LaTeX2e," by Tobias Oetiker, Hubert Partl, Irene Hyna, and Elisabeth Schlegl, 69 pp. This wonderful document is located: ~CTAN:packages/TeX/info/lshort/*. You can get a PostScript or .DVI version of the document ready for printing, or the native LaTeX document. There is also a version available in German: lkurz.*. Make sure to read the README file before assembling! "A Gentle Introduction to TeX: A Manual for Self-Study," by Michael Doob, 91 pp. You can find this document at: ~CTAN:packages/TeX/info/gentle.tex Almost of necessity, this document covers less ground than its LaTeX counterpart, above. However, it will get you to the same place as the LaTeX manuals, if you still must use plain TeX for your documents. "IMPRINT: The Newsletter of Digital Typography," edited by Robert Kiesling. Yes, this is BLATANT and SHAMELESS self-promotion. But you should know anyway that IMPRINT is a free, ASCII text newsletter which is available via e-mail. IMPRINT appears approximately monthly and covers a broad range of text processing and digital imaging topics, both beginning and advanced. Many of the items covered apply directly or indirectly to TeX'ing, though. The emphasis is on production of industry-standard typeset and printed material. To subscribe to IMPRINT, send a brief, human-readable message to me at imprint@macline.com. There are, of course, other guides available to using TeX and LaTeX. They cover different aspects of these systems to varying degrees. The reference documents cited above, however, are the most comprehensive in scope that I have seen and the most suitable for someone who is approaching these systems from scratch. If the going gets especially tough, you can probably do a little extra shopping at Office Max, Office Depot, Staples, or another office- supply store, and pick up several reams of three-hole punched, photocopy paper, two or three, three-inch binders, and some index tabs. When it comes time to print the documents you'll need a place to keep them, and they seem to be more useful if they are kept on paper. This must be one of the stranger phenomena of technical documentation. You will note, however, that the references mentioned above are hardware-independent. They won't tell you a thing about running teTeX specifically. Many of them, in fact, refer to some mythical "Local Guide." Well, gentle reader, this, and several of the documents which come bundled with teTeX comprise the less-than-mythical Local Guide to installing teTeX under Linux. 3. 3. PERFORMING THE ACTUAL INSTALLATION. First, FTP to your nearest Linux archive site. Mine is wuarchive.wustl.edu then find the directory with the Slackware distribution diskettes. On wuarchive, this is systems/linux/sunsite/distributions/Slackware/slakware Linux sites which mirror sunsite.edu will store these diskettes in the directory distributions/Slackware/slakware. teTeX, the full package, is contained on the Slackware disk series t. So, grab all nine disks' worth of the t series, disks t1 - t9. Be sure to keep them in order, too. Either store the files them in separate subdirectories labeled t1 - t9 on a hard drive partition, or on diskettes, and label the diskettes t1 through t9. We're going to install them by hand. This isn't difficult. The Slackware installer creates the directories and unpacks the files. It also provides descriptions of each module in the distribution which allows you to decide whether you want to install it or not. In the case of teTeX, however, you are simply going to install everything, because that's what you should do anyway. Installation will require about 30 Mb of disk space, so you should make sure that it's available before you start. You don't need to have the gcc compiler or the X Windows System installed (although X certainly is helpful because then you can preview documents on- screen). All you need is an editor that is capable of producing plain ASCII text (see above). What could be simpler? Let's assume that you have all nine diskettes' worth of the Slackware teTeX distribution ready at hand, organized as described above. You'll have a lot of files which have the extension .tgz. This is shorthand for a gzipped tar archive. The names all fit the 8+3 filename limitations of MS-DOG. Aren't you glad you decided to scrap your DOG partitions and install Linux instead? You can use a MS-DOG hard disk partition or DOG-format diskettes to store the files. The archives also begin with the letters tb, td, or tm, and so on, which is the implementors' shorthand for TeX binary, TeX documentation, TeX macro, and so on. The difference to you is academic, because you'll be installing everything anyway. Let's assume that you've assembled the Slackware distribution on floppy diskettes labelled t1 thru t9. Mount the t1 diskette like this ______________________________________________________________________ mount /dev/fd0 /mnt ______________________________________________________________________ if your Linux configuration is a standard Slackware configuration like mine. Actually, any mount point will do. You'll simply need to sub­ stitute the appropriate path spec in the next few steps. The next thing you want to do is create the teTeX top-level directory. teTeX's internal paths are specified relative to its binaries, but the Slackware distribution is archived relative to the root directory. So the top-level teTeX directory is /usr/lib/teTeX so, for each of the .tgz archive files in the distribution, copy the archive file to the /usr/lib/teTeX directory and repeat the following commands: You should be logged in as root and in the top-level directory, /, for these steps. I've used the tb-xfig.tgz archive for demonstration purposes. Of course, you'll want to substitute the name of whichever archive you're unpacking. ______________________________________________________________________ cp /mnt/tb-xfig.tgz /usr/lib/teTeX gunzip /usr/lib/teTeX/tb-xfig.tgz tar -xvf /usr/lib/teTeX/tb-xfig.tar # v to see what's going on! rm /usr/lib/teTeX/tb-xfig.tar ______________________________________________________________________ Most Slackware packages that I've seen also include an install script, which the Slackware installer executes after unpacking the files. Look in the directory /install after you've unpacked the files. If there's a script there called doinst.sh or something similar, execute that, as root, by typing sh /dev/lp0 ______________________________________________________________________ assuming that your printer is connected to /dev/lp0. Substitute the appropriate device driver file as appropriate. Repeat these steps with the teTeX-FAQ. Keep the FAQ handy because it contains useful hints for configuring teTeX's output drivers for your printer. We'll get to that in a moment. It is disappointing that the Linux Slackware Distribution doesn't come with a standard lpr daemon. That's probably because of the wide variations in printing hardware, but that's only my semi-informed guess. Setting up a working printer daemon is no mean feat. If you're using teTeX on an individual system, you can simply dump the output to the printer, but this is less than desirable. You lose the filtering capabilities of the printer daemon. If you're printing on a network, having a working printer daemon is a must. I wrote the first version of this HOWTO before I saw Grant Taylor's Printing-HOWTO. It's a must-read for setting up a print spooler. It really works! This may seem like a digression, but the time spent setting up a print spooler now pays off later. Back to TeX. You next want to define a directory to store your own TeX format files. teTeX searches the directories listed by the $TEXINPUTS environment variable for local TeX input files. On Chanel3, I added the line ______________________________________________________________________ export TEXINPUTS=".:~/texinputs:" ______________________________________________________________________ to the system-wide /etc/profile file. Of course, you must have logged in as root before you can do this. The $TEXINPUTS environment vari­ able tells teTeX to look for users' individual TeX style files in the ~/texinputs directories under each user's home directory. It is CRIT­ ICAL that a colon appear before and after this directory. teTeX is going to append its own directory searches to your own. You want to have teTeX to search the local format files first, so it uses the local versions of any of the standard files you have edited. Add the /usr/lib/teTeX/bin directory to system-wide path in whatever manner you usually do this, and restart the system to make sure the path and TEXINPUTS are registered properly; that is, globally. Now, log in as the system administrator and run texconfig per the instructions in the teTeX-FAQ and choose the printer that is attached to your system. Make sure that you configure teTeX for both the correct printer and printer resolution. 4. 4. Using teTeX. Theoretically, at least, everything is installed correctly and is ready to run. TeTeX is a very large software package. As with any complex software, you'll want to start by learning teTeX slowly, instead of being overwhelmed by its complexity. At the same time, the software should do something useful. So instead of watching TeX typeset ``Hello, World!'' as Professor Knuth suggests in the TeXBook, we'll produce a couple of teTeX's own documents in order to test it. You should be logged in as root the first few times you run teTeX. If you aren't, metafont may not be able to create the necessary directories for its fonts. The texconfig program includes an option to make the font directories world-writable, but if you're working on a multiuser system, security considerations may make this option impractical or undesirable. In either instance, if you don't have the appropriate permissions to write to the directories where the fonts are stored, metafont will complain loudly because it can't make the directories, and you won't see any output because you will have a bunch of zero-length font characters. This is no problem. Simply log out, re-login as root, and repeat the offending operation. Of course, it doesn't mention this in teTeX's manual. But the nice thing about teTeX is that, if you blow it, no real harm is done. It's not like a compiler, where, say, you will trash the root partition if a pointer goes astray. What, you haven't read the teTeX manual yet? Of course you haven't! It's still in the distribution, in source code form, waiting to be output! So, without further delay, you will want to read the teTeX manual. It's located in the directory /usr/lib/teTeX/texmf/doc/tetex. The LaTeX source for the manual is called TETEXDOC.tex. (The .tex extension is used for both TeX and LaTeX files. Some editors, like Emacs, can tell the difference.) There is also a file TETEXDOC.dvi included with the distribution, which you might want to keep in a safe place -- say, another directory -- in case you want to test your DVI drivers later. With that out of the way, type ______________________________________________________________________ latex TETEXDOC.tex ______________________________________________________________________ LaTeX will print several warnings. The first, LaTeX Warning: Label(s) may have changed. Rerun to get the cross-references right. is a standard procedure for building a document's Table of Contents. So, repeat the command. The other warnings can be safely ignored. They simply are warning you that some of the FTP paths mentioned in the documentation are too wide for their alloted spaces. (If you're really inquisitive, look at one of the TeX references for a discussion of \hbox and \vbox.) TeTeX will have generated several files from TETEXDOC.tex. The one we're interested in is TETEXDOC.dvi. This is the device-independent output that you can send either to the screen or the printer. If you're running teTeX under the X Windows System, you can preview the document with xdvi. You can also preview the file on a character- based display with dvi2tty, dvi2svga, or ghostscript. Both dvi2tty and dvi2svga need to be compiled first, though, and ghostscript also may need to be re-compiled depending on the version of svgalib installed on your system. Of course, you can send the output to the printer without previewing it first. The teTeX distribution comes with DVI drivers for the following printers: HP Laserjets and printers which support PCL, the HP Deskjet (and Officejet) family, and to a file, using dvitype. The man(1) pages can provide you with details. If your printer is not covered by teTeX's standard dviware, you have several options: you can convert the file to PostScript using dvips and print it either with a PostScript printer or ghostscript. (See below.) There is also a complete library of DVI drivers available via anonymous FTP at ftp://ftp.math.utah.edu/pub/tex/dvi The former option is more flexible, the latter is easier. For the present, let's assume that you have a HP Laserjet II. You would give the command dvilj2 TETEXDOC.dvi which will write a PCL output file of TETEXDOC.dvi, including soft fonts which will be down loaded to the Laserjet. This is NOT a fea­ ture of TeX or LaTeX, but a feature provided by dvilj2. Other DVI drivers provide features which are relevant to the devices they sup­ port. Dvilj2 will fill the font requests which were made in the orig­ inal LaTeX document with the the closest equivalents available on the system. In the case of a plain-text document like TETEXDOC.tex there isn't much difficulty. All of the fonts requested by TETEXDOC.tex will be generated by metafont, which is automatically invoked by dvilj2 and generates the fonts if they aren't already present. (If you're running dvilj2 for the first time, it needs to generate all of the fonts, which could take up to several days if you're using a slow machine.) There are several options which control font generation via dvilj4; they're outlined in the man page. At this point, you shouldn't need to do any direct operation of metafont. If you do, then something has gone awry with your installation. All of the DVI drivers will invoke metafont directly via the kpathsea path-searching library -- also beyond the scope of this document -- and you don't need to do any more work with metafont for the present -- all the metafont sources for the Computer Modern font library are provided. You can simply dump TETEXDOC.lj to the printer now, via the command ______________________________________________________________________ cat TETEXDOC.lj >/dev/lp0 ______________________________________________________________________ if your printer is connected to /dev/lp0 or wherever your printer is connected. The idea is that you simply dump the file to the appropri­ ate device. If your system has a lpd printer daemon, the command ______________________________________________________________________ lpr TETEXDOC.lj ______________________________________________________________________ should spool the output to the printer. You may need a magicfilter (tm?) that understands PCL. Again, look at the Printing-HOWTO for details. The nine-page teTeX Users Manual provides some useful information for further configuring your system, some of which I have mentioned, much that this document doesn't cover. Some of the information in the next section I haven't been able to test, because I have a non-PostScript HP Deskjet 400 color inkjet printer connected to Chanel3's parallel port. However, not owning a PostScript printer is no barrier to printing text and graphics from your text documents. 5. 5. Mixing text and graphics with dvips. In general, this section applies to any TeX or LaTeX document which mixes text and graphics. TeTeX, like most other TeX distributions, is configured to request Computer Modern fonts by default. Specifically, font and graphics imaging is the job of dvips. Dvips can use either Computer Modern bit mapped or Type 1 scalable fonts, or any combination of the two. First, let's concentrate on printing and previewing some graphics. In general, you will want to follow this procedure any time a LaTeX source document has the statement ______________________________________________________________________ \includepackage{graphics} ______________________________________________________________________ in the document preamble; that is, the first few lines of text before the \begin{document} statement. This statement tells LaTeX to include the text of the graphics.sty package in the source document. There are other commands to perform graphics operations, and the statements in plain-TeX documents may not clue you in whether you need to use dvips. The difference will be apparent in the output, though, when the document is printed with missing figures and other graphics. So for now, we'll concentrate on printing documents which use the LaTeX graphics.sty package. You might want to take a look at the original TeX input. It isn't included in the teTeX distribution, but it is available at ~CTAN/macros/latex/packages/graphics/grfguide.tex. What the teTeX distribution does include is the DVI output file, and it is already TeXed for you. There is a reason for this, and it has to do with the necessity of including Type 1 fonts in the output in order for the document to print properly. If you want to LaTeX grfguide.tex, see the next section. For now, however, we'll work on getting usable output using dvips. This is where ghostscript comes into the picture. What ghostscript does is translate (actually, render) PostScript code into a form that any bit mapped output device can understand. Even though my HP Deskjet doesn't understand PostScript, ghostscript allows me to scale, rotate, blend, or otherwise alter text, or include graphics or colors, just like the expensive printers. A discussion of color printing is a little beyond the scope of this document, though, along with most other effects. We're going to stick to the basics for the moment. The file grfguide.dvi is located in the directory /usr/lib/teTeX/texmf/doc/latex/graphics The first step in outputting grfguide.dvi is to translate it to PostScript. The program dvips is used for this. It does just exactly what its name implies. There are many options to invoking dvips, but the simplest (nearly) form is ______________________________________________________________________ dvips -f -r grfguide.ps ______________________________________________________________________ The -f command switch tells dvips to operate as a filter, reading from standard input and writing to standard output. Dvips output defaults to the lpr daemon. (At least my version does.) In many instances you'll want to use a post processor like ghostscript or a magicfilter. The -f option is generally the first thing I include in a dvips command line, and this form tends to be easier to use in shell scripts. The -r option tells dvips to output the pages in reverse order so they stack correctly when they exit the printer. Depending on whether you still have the fonts that dvilj generated from the last document, dvips and metafont may or may not need to create new fonts needed by grfguide.dvi. Eventually, though, dvips will output a list of the pages translated to PostScript, and you will have your PostScript output ready to be rendered on whatever output device you have available. If you're lucky (and rich), you have a PostScript-capable printer already and will be able to print grfguide.ps directly. You can either spool the output to the printer using lpr if it is installed on our system, or simply dump the file to printer, with ______________________________________________________________________ cat grfguide.ps >/dev/lp0 ______________________________________________________________________ or whichever port your printer is attached to. As for using ghostscript, rendering PostScript to a bit mapped device is among the most basic things it does. You may have noticed other files in the same directory as grfguide.dvi which have the .ps extension. a.ps is used as in grfguide.ps, and epslatex.ps is yet another document related to graphics. It is left as an exercise to you, the reader, to output epslatex.ps, by following the steps below. The first thing you want to do is invoke ghostscript to view its command line arguments, like this: ______________________________________________________________________ gs -help ______________________________________________________________________ You'll see a list of supported output devices and sundry other com­ mands. Pick the output device which most nearly matches your printer. On Chanel3, because I generally produce black-and-white text, I use the cdjmono driver, which drives a color Deskjet in monochrome (black and white) mode. The command line I would use is: ______________________________________________________________________ gs -dNOPAUSE -sDEVICE=cdjmono -sOutputFile=/tmp/gs.out grfguide.ps -c quit ______________________________________________________________________ This will produce my HP-compatible output in the /tmp directory. It's a good idea to use a directory like /tmp, because gs can be particular about access permissions, and you can't (and shouldn't) always count on being logged in as root to perform these steps. Now you can print the file: ______________________________________________________________________ lpr /tmp/gs.out ______________________________________________________________________ Obviously, this can all go into a shell script. On my system, I have two simple scripts written, pv and pr, which simply outputs the PostScript file either to the display or the printer. Screen preview­ ing is possible without X, but it's far from ideal. So, it's defi­ nitely worth the effort to install XFree86, or TinyX (which is what I did) in order to preview the output on the screen. The order of commands in a ghostscript command line is significant, because some of the options tell ghostscript to look for pieces of PostScript code from is library. The important thing to remember is that grfguide.dvi makes requests for both Computer Modern bit mapped and Type 1 scaled fonts. Generally, this works fairly well, but the possibility that the different font sets won't match esthetically is a possibility. This situation has improved in the last several years, though, but font matching is still best left to taste and simplicity. Also, having several different font systems on one machine can seem redundant, and can be an unnecessary waste of disk space. And the Computer Modern fonts can seem, well, a little too _formal_ to be suitable for everyday use. It reminds me sometimes of bringing out the good China to feed the dog. Fortunately, some good Type 1 fonts have become available in the public domain, so you don't need to spend a bundle on good-looking, scalable fonts any more. The trick to get teTeX to use them. A final, significant note: Combining different versions of ghostscript and the svgalib can quickly become confusing. Version 3.33 of Alladin Ghostscript seems to be the most complete. The version of ghostscript which is included in the Slackware AP set is version 2.6.2 and does not have X support compiled in. You might also have trouble finding the correct svgalib versions for it. There is supposedly a version of ghostscript with X11 support in the Slackware XAP distribution series, though I haven't tried it. It's easiest, it seems to me, to compile ghostscript on your own system. Svgalib support for ghostscript 3.33 is included in a small archive which contains a .diff file. Ghostscript 3.33 for X is also configured for JPEG support, so you should include those sources as well. The relevant archives can be found at any GNU distribution site, like prep.ai.mit.edu or one of its mirrors. 6. 6. Using PostScript fonts. One of the major improvements of LaTeX2e over its predecessor was the inclusion of the New Font Selection Scheme. (It's now called PSNFSS.) Formerly, TeX authors would specify fonts with commands like ______________________________________________________________________ \font=bodyroman = cmr10 scaled \magstep 1 <\code> which provides precision but requires the skills of a type designer to make good use of. Also, it's not very portable. If another system didn't have the font cmr10 (this is TeX nomenclature for Computer Modern Roman, 10 point, with the default medium stroke weight), somebody would have to re-code the fonts specifications for the entire document. PSNFSS, however, allows you specify fonts by family (Computer Modern, URW Nimbus, Helvetica, Utopia, and so forth), weight (light, medium, bold), orientation (upright or oblique), and face (Roman, Italic), and base point size. Also, many fonts are packaged as families. For example, a Roman-type font may come packaged with a sans serif font, like Helvetica, and a monospaced font, like Courier. You as the author of a LaTeX document can specify an entire font family with one command. There are, as I said, several high-quality font sets available in the public domain. One of them is Adobe Utopia. Another is Bitstream Charter. Both are commercial quality fonts which have been donated to the public domain. These happen to be two of my favorites. If you look around one of the CTAN sites, however, you will find these and other fonts archived there. There are enough fonts around that you'll be able to design documents the way you want them to look, and not just English text, either. TeX was originally designed for mathematical typesetting, so there is a full range of mathematical fonts available, as well as Cyrillic, Greek, Kana, and other alphabets too numerous to mention. The important thing to look for is files which have either the .pfa or not simply the metrics files. Type 1 fonts use .pfm metric files, as opposed to the .tfm metric files which bit mapped fonts use. The two font sets I mentioned above are included in the teTeX Slackware distribution. As a bit of an aside, fonts are a contentious subject. They are both data and a form of expression, and that makes them vulnerable to less-than-fair-usage. In other words, it's easy for someone to copy a font design without somehow compensating the original designer of the font. Sometimes discovering who the original designer was is difficult also. I mention this here because recently Blue Sky Research donated Type 1 versions of the Computer Modern fonts to the public domain. However, only crippled versions of these fonts are available now because some biz-whizzes decided they could re-issue the Type 1 CM fonts as shareware, conveniently omitting ligatures, punctuation, and other essential characters. These fonts should be avoided. Certainly do not send these Value-Added Resellers any money, because they are simply exploiting Blue Sky Research's generosity. I don't know all the details, but you can take a look at the fonts for yourself without paying anything for them. Then delete them, because they're not worth the disk space they're stored on. In the meantime, the Bitstream Charter fonts which come with teTeX are the best alternative for a public domain, Type 1 font. What I said above, concerning the ease of font selection under PSNFSS, is true in this instance. If we want to use the Charter fonts in our document instead of Computer Modern bit mapped, all that is necessary is include the LaTeX statement \renewcommand{\familydefault}{bch} ______________________________________________________________________ where the letters "bch" is the common designation for Bitstream Char­ ter. The Charter fonts reside in the directory /usr/lib/teTeX/texmf/fonts/type1/bitstrea/charter. There you'll see the .pfb files of the Charter fonts: bchb8a.pfb for Charter Bold, bchr8a.pfb for Charter Roman, bchbi8a.pfb for Charter Bold Italic. The "8a" in the font names indicates the character encoding. At this point you don't need to worry about them, because the encodings mostly differ for 8-bit characters, which have numeric values above 128 deci­ mal. They mostly define accents, and foreign characters. You'll be concerned with them if you're typesetting documents in say, Spanish, but for now the default encodings are fine. The Type 1 fonts conform to the ISO standards for international character sets, so this is an added benefit of using them. To typeset a document which has Charter fonts selected, you would give the command ______________________________________________________________________ pslatex document.tex ______________________________________________________________________ Pslatex is a variant of teTeX's standard LaTeX command which redefines from the command the directories where the fonts are, as well as some additional LaTeX code to load. You'll see the notice screen for psla­ tex followed by the status output of the TeX job itself. In a moment you'll have a .dvi file which includes the Charter font requests. At this point it is finally appropriate to say that installing a Type 1 font set is not difficult, as long as you follow a few basic steps. You should unpack the fonts in a subdirectory of the fonts/type1 directory, where your other Type 1 fonts are located, and then run texhash to let the directory search routines know that the fonts have been added. Then you need to add the font descriptions to the file psfonts.map so dvips knows they're on the system. The format of the psfonts.map file is covered in a couple different places in the references mentioned above. Again, remember to run the texhash program to update the teTeX directory database. (Actually it's a ls- lR file.) It is definitely an advantage to use the X Windows System with teTeX-- XFree86 under Linux -- because it allows for superior document previewing. It's not required, but in general, anything that allows for easier screen previewing is going to benefit your work, in terms of the quality of the output. However, there is a tradeoff with speed of editing, which is much quicker on character-mode displays. Having an editor which is slower than molasses in Minnesota can definitely hinder your work. Anyway, whether or not you are able to view documents easily on- screen, please recycle your paper, and use both sides of each sheet. If possible, purchase recycled photocopy paper to print on. You don't want your workplace to look like a branch office of a paper company. Remember: Save a tree... kill an editor. Robert Kiesling Robert_A._Kiesling@macline.com 7. Appendix A. CTAN Site Listing This is the text of the file CTAN.sites, which is available in the top-level directory of each archive or mirror site: In order to reduce network load, it is recommended that you use the Comprehensive TeX Archive Network (CTAN) host which is located in the closest network proximity to your site. Alternatively, you may wish to obtain a copy of the CTAN via CD-ROM (see help/CTAN.cdrom for details). Known mirrors of the CTAN reside on (alphabetically): cis.utovrm.it (Italia) /TeX ctan.unsw.edu.au (NSW, Australia) /tex-archive dongpo.math.ncu.edu.tw (Taiwan) /tex-archive ftp.belnet.be (Belgium) /packages/TeX ftp.center.osaka-u.ac.jp (Japan) /CTAN ftp.ccu.edu.tw (Taiwan) /pub/tex ftp.cdrom.com (West coast, USA) /pub/tex/ctan ftp.comp.hkbu.edu.hk (Hong Kong) /pub/TeX/CTAN ftp.cs.rmit.edu.au (Australia) /tex-archive ftp.cs.ruu.nl (The Netherlands) /pub/tex-archive ftp.cstug.cz (The Czech Republic) /pub/tex/CTAN ftp.duke.edu (North Carolina, USA) /tex-archive ftp.ee.up.ac.za (South Africa) /tex-archive ftp.funet.fi (Finland) /pub/TeX/CTAN ftp.gwdg.de (Deutschland) /pub/dante ftp.jussieu.fr (France) /pub4/TeX/CTAN ftp.kreonet.re.kr (Korea) /pub/CTAN ftp.loria.fr (France) /pub/unix/tex/ctan ftp.mpi-sb.mpg.de (Deutschland) /pub/tex/mirror/ftp.dante.de ftp.nada.kth.se (Sweden) /pub/tex/ctan-mirror ftp.rediris.es (Espa\~na) /mirror/tex-archive ftp.rge.com (New York, USA) /pub/tex ftp.riken.go.jp (Japan) /pub/tex-archive ftp.tu-chemnitz.de (Deutschland) /pub/tex ftp.u-aizu.ac.jp (Japan) /pub/tex/CTAN ftp.uni-augsburg.de (Deutschland) /tex-archive ftp.uni-bielefeld.de (Deutschland) /pub/tex ftp.unina.it (Italia) /pub/TeX ftp.uni-stuttgart.de (Deutschland) /tex-archive (/pub/tex) ftp.univie.ac.at (\"Osterreich) /packages/tex ftp.ut.ee (Estonia) /tex-archive ftpserver.nus.sg (Singapore) /pub/zi/TeX kadri.ut.ee (Estonia) /pub/tex src.doc.ic.ac.uk (England) /packages/tex/uk-tex sunsite.cnlab-switch.ch (Switzerland) /mirror/tex sunsite.icm.edu.pl (Poland) /pub/CTAN sunsite.queensu.ca (Canada) /pub/tex-archive sunsite.unc.edu (North Carolina, USA) /pub/packages/TeX wuarchive.wustl.edu (Missouri, USA) /packages/TeX (N.B.: Some of the CTAN subdirectories have been missing from wuarchive recently. I'm not sure why this is. If someone knows, please drop me a line. -RK) Known partial mirrors of the CTAN reside on (alphabetically): ftp.adfa.oz.au (Australia) /pub/tex/ctan ftp.fcu.edu.tw (Taiwan) /pub2/tex ftp.germany.eu.net (Deutschland) /pub/packages/TeX ftp.gust.org.pl (Poland) /pub/TeX ftp.jaist.ac.jp (Japan) /pub/TeX/tex-archive ftp.uu.net (Virginia, USA) /pub/text-processing/TeX nic.switch.ch (Switzerland) /mirror/tex sunsite.dsi.unimi.it (Italia) /pub/TeX sunsite.snu.ac.kr (Korea) /shortcut/CTAN Please send updates to this list to . The participating hosts in the Comprehensive TeX Archive Network are: ftp.dante.de (Deutschland) -- anonymous ftp /tex-archive (/pub/tex /pub/archive) -- gopher on node gopher.dante.de -- e-mail via ftpmail@dante.de -- World Wide Web access on www.dante.de -- Administrator: ftp.tex.ac.uk (England) -- anonymous ftp /tex-archive (/pub/tex /pub/archive) -- gopher on node gopher.tex.ac.uk -- NFS mountable from nfs.tex.ac.uk:/public/ctan/tex-archive -- World Wide Web access on www.tex.ac.uk -- Administrator: