## 45.16. Converting Typeset Files into a Printing Language

Section 45.15 showed the steps necessary to convert plain text into something printable. Generally the steps involved are similar for a typeset source file, with perhaps an extra step or two.

troff generates PostScript by default in most installations these days, or it can be made to easily enough. GNU troff (groff ) can also generate PCL, DVI, and HTML by using the appropriate -T option.

TEX generates DVI; the teTEX package includes dvips to convert DVI into PostScript, dvilj4 to convert it into PCL, dvipdf to convert it into PDF, and several others.

HTML can be converted into PostScript using html2ps.

An example of using LATEX, dvilj4, and lpr to print the article.tex file to my printer (an HP LaserJet 6L):

>     % latex article.tex
>     % dvilj4 article.dvi
>     % lpr article.lj
>     % rm article.lj article.dvi

This time it's slightly simpler than the example in Section 45.15, because the default options all do what we want. Even so, it can be made even simpler; Section 45.17 shows how.

-- DJPH

Copyright © 2003 O'Reilly & Associates. All rights reserved.