Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

Appendix C: Commands, errors, and viewing

Section 5: Printer output

TEX systems print on almost anything from portable and domestic dot-matrix printers through normal office ink-jet and laser printers up to the biggest commercial phototypesetters, including a host of other devices in between (numerically-controlled stencil-cutters, knitting machines, and ink-jet cake-decorators, to name but a few).

When using a previewer, printing works in the normal manner through your system’s printer drivers: you just click on the Print icon in your preview. However, TEX’s ancillary programs are capable of creating highly-optimised printfiles for almost any printer or typesetter, allowing you to send printout to printers that are not connected to your computer.

The rest of this section deals with how to print on older systems without a print management converter, where the procedure may vary slightly according to how you do your typesetting and previewing.

If you are using DVI

and you have a previewer which has a Print function configured for your printer, you can use that. If not, create a PostScript file and use GSview instead.

If you are using PDF

you can print directly from your PDF viewer. Be careful about using Adobe Acrobat Reader’s ‘Shrink to fit’ option, as it will change the size of your document so all your measurements will be different. Turn it off.

Non-PostScript printers

You can create a PostScript file with dvips (see § C.4.2) and use GSview to print it (GSview can print PostScript files to almost any make or model of non-PostScript printer).

If you have a real PostScript printer

or you are using a system with built-in PostScript printing support (such as Linux or Mac), you can create and send PostScript output directly from your editor to the printer without the need to open it in a previewer first. In Emacs, for example, this is what happens when you use the TEXTEX Print menu item.

Both the dvips program and all the previewers that print tend to have facilities for printing selected pages, printing in reverse, scaling the page size, and printing only odd or even pages for two-sided work. If you are using PostScript there are programs for manipulating the output (pstops), for example to perform page imposition to get 4, 8, or 16 pages to a sheet for making booklets (psnup).

Exercise 18: Print it!

Show that you have understood the process of typesetting, previewing, and printing, by displaying your document and printing it.

If you need a non-PostScript/Ghostscript solution, install a separate TEX print driver for your printer. Some may be supplied with your TEX installation, and there are dozens more on CTAN. Their names all start with dvi and are followed by an abbreviation for the printer make or model like dvieps for Epson, dvihp for Hewlett-Packard, dvialw for Apple LaserWriters, etc. Configure the driver to print directly to the print queue, or pipe it to the print queue manually. On Linux with an HP printer, for example, this would be

dvihp quickstart | lpr 
      

Microsoft Windows has no easy way to bypass the print spool, but you can do it from an MS-DOS command window with (using a HP printer as an example):

dvihp quickstart -o quickstart.hp
copy /b quickstart.hp LPT1:
      

Read the documentation for the driver, as the options and defaults vary.