SGML for Windows NT: Setting up a free SGML/XML editing and publishing system on the Windows platform | ||
---|---|---|
Prev | Next |
TeX is Donald Knuth's famous typesetting software that was born from the inability of the computer systems of the early '80 to output anything that comes close to a decent mathematical text. The typesetting algorithms are derived from long-standing rules in the book printing business, and the default output looks quite different (read: more pleasant) than any word processor output. Of course everything is configurable. The primary printable output (a DVI file) is device-independent, i.e. the printed output will be the same regardless of the operating system and the printer that you may use (remember that Windows word processors shift line- and pagebreaks back and forth if you just dare to move from a 300dpi to a 600dpi printer?). Furthermore the system comes with utilities to create Postscript files (the standard print format on Unix systems) and PDF files (the inofficial standard print format of the web).
TeX is big, completely different from a word processor, and at times unwieldy for the uninitiated. If you just want to print something somehow, the SGML->RTF conversion or the XML->PDF conversion may be sufficient. If you look for highest-quality typesetting and easy conversion to platform-independent formats, you should seriously consider installing TeX.
If you have never before worked with TeX or LaTeX, there are a few things you should know:
TeX is a markup language just like SGML, but it lacks the strict separation of content and formatting instructions.
The TeX system resides in a directory tree which is usually called \texmf. The subdirectories contain all the binaries, configuration files, fonts, and macros. Additionally, a \texmf-local tree can be used. This tree holds modified configuration files and format files. This prevents them from being overwritten if you update the TeX installation.
Unlike a word processor, TeX does not have a graphical user interface. You type the TeX source text in whatever editor you prefer. In a later section of this tutorial we will also install a TeX major mode which turns Emacs into a nice TeX editor. In the case of SGML documents, the intermediate TeX file will be created by OpenJade's TeX backend.
The TeX command-line application interprets the markup instructions of the source document and creates a .dvi (device independent) output file. This file can be further converted to a Postscript file to view or print it with Ghostview.
TeX uses auxiliary files to create tables of contents, lists of figures or tables, and other kinds of cross-referencing. Therefore you may need up to three passes to get all references right (TeX tells you whether or not you need an additional pass).
TeX uses the MetaFont application and font descriptions to generate bitmap fonts on the fly for the requested font sizes and styles. These bitmap font files remain on the system unless you manually remove them. Therefore the necessary MetaFont runs will become less frequent or stop after a while.
Everything that you need for TeX and then some is available at CTAN (Comprehensive TeX Archive Network). This is a group of servers that provide a plethora of TeX-related files in an identical directory layout. A list of available mirrors can be found here. A HTML-based search is available at www.dante.de.
The TeX binaries have a very long history and carry a lot of legacy code with them. Among this is the use of fixed size buffers for various internal things. The size of these buffers is defined in a configuration file (web2c/texmf.cnf). Although we start with pretty generous settings it is possible to hit the limit with very large or very complex SGML or XML files. The error message will tell you which variable was limiting. You should then increase the value in the configuration file and rebuild the format files with the command texconfig init as shown below.
The probably best known TeX distribution is teTeX. fpTeX is a Win32 version of TeX based on teTeX.
Our customized fpTeX installation contains two macro sets which are necessary to create printable output from SGML or XML documents through TeX. They will be automatically configured so we don't have any extra work to do. Just keep in mind that they are there. JadeTeX is a macro set that complements Jade's TeX backend. xmlTeX and PassiveTeX do a similar job for the FO output of XSLT engines.
TeXSetup.exe. This is the install program to bootstrap your fpTeX installation.
ulem.sty and url.sty. These are two style files needed by JadeTeX that apparently are not in any of the fpTeX packages.
Visit a CTAN server, e.g. ftp.dante.de, to retrieve some additional TeX-related files which are not part of the TeX distribution. This is not necessary in most cases, but if you deal a lot with foreign languages or with functional programming, you may want to have the following packages (I don't provide full links here; please use a CTAN mirror and visit the given directories):
tipa (International Phonetic Alphabet): CTAN:fonts/tipa
mmasym: Virtual TeX fonts for use with Mathematica 3.0 PostScript fonts: CTAN:fonts/psfonts/Mathematica 3.0