28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

232 Chapter 10. PostScript <strong>and</strong> PDF<br />

Its two most significant features are the inclusion of graphics as encapsulated<br />

PostScript images, as described in Chapter 6, <strong>and</strong> the capability of<br />

making use of PostScript fonts in place of the Computer Modern ones (Section<br />

G.5). There are also enhanced drawing capabilities, as demonstrated<br />

in Sections 13.2.2 <strong>and</strong> 13.3.2.<br />

10.1.1 The dvips driver<br />

The dvips driver program operates on the DVI result from T E X, with or<br />

without L AT E X, <strong>to</strong> generate PostScript output, which may be written <strong>to</strong> a<br />

file or sent directly <strong>to</strong> a printer. One either clicks the appropriate icon in<br />

the edi<strong>to</strong>r shell, or issues the comm<strong>and</strong> from a comm<strong>and</strong> line prompt:<br />

dvips myfile<br />

<strong>to</strong> process myfile.dvi <strong>and</strong> generate myfile.ps. (The L AT E X source text<br />

was of course in myfile.tex.) The PostScript file may be viewed with<br />

a PostScript viewer like GhostView or sent <strong>to</strong> a PostScript printer, or<br />

included in an email.<br />

There are many options that may be included in the comm<strong>and</strong> line,<br />

appearing between dvips <strong>and</strong> the file name. For example, <strong>to</strong> output five<br />

pages only starting at the 10th, sending them <strong>to</strong> a file named p5-15.ps,<br />

give<br />

dvips -p 10 -n 5 -o p5-15 myfile<br />

You may also specify the first (-p) <strong>and</strong> last (-l) page numbers, whether<br />

only odd (-A) or even (-B) pages are <strong>to</strong> be printed, or in reverse order (-r).<br />

The page numbers with -p <strong>and</strong> -l refer <strong>to</strong> the actual page numbers in<br />

the document, or rather <strong>to</strong> its first occurrence. Hence -p 8 might start<br />

with page viii rather than page 8. Specifying -p =8 will start with the 8th<br />

page, regardless of its actual number. The list of options can be printed<br />

<strong>to</strong> the moni<strong>to</strong>r with dvips --help.<br />

One useful option is t l<strong>and</strong>scape <strong>to</strong> rotate the output in<strong>to</strong> l<strong>and</strong>scape<br />

mode, which should be done if the document has been processed with<br />

the l<strong>and</strong>scape option in \documentclass. However, dvips has another<br />

way of accomplishing this: add the driver-specific comm<strong>and</strong><br />

\special{l<strong>and</strong>scape}<br />

in the source text itself <strong>and</strong> dvips will au<strong>to</strong>matically print in l<strong>and</strong>scape<br />

mode.<br />

The output is written <strong>to</strong> a file with the same root name as the input,<br />

but with extension .ps, unless the option -o filename is given. To send<br />

the output directly <strong>to</strong> a printer, specify that printer as the output ‘file’, as<br />

-o \lpt1. Beware, if that printer is not a PostScript printer, it will simply<br />

output the PostScript code directly as text, something that normally uses<br />

a considerable amount of paper.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!