Document Formatting with Tex

  1. Create an ASCII document containing the embedded control codes with <your favorite text editor>. By convention, these documents are stored with a .tex extension.

  2. Compile the document into a device-independent intermediate file with tex (or latex).

  3. View and print the resulting .dvi file with xdvi.

  4. Depending on your printer type, use one of the dvi printer commands (dvips, dvilj) to print the dvi file.

If you're so inclined, you can type in the sample file that follows to get a feel for how TeX works. If not, pretend you did, as the file is used repeatedly in the next several examples (see Figure 20-1).

Figure 20-1. The file example.tex

The preceding document first needs to be compiled into a deviced independent format ...

Get Linux® Desk Reference, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.