PSPRINT can be used to print a DVI file produced by TeX (or LaTeX), a raw PostScript file, or an ordinary text file, on a variety of PostScript printers. The currently supported devices include the Apple LaserWriter, the Linotronic 300 and DEC's PrintServer 40. USAGE: psprint file [-dev[ice] printer_type] [-dvi] [-ps] [-text] [-two] [-wide] [-o file] [-q queue] [-n note] [-c copies] [-l] [-low[res]] [-[no]cut[marks]] [-size page_setup] [-man[ual]] [-[no]f[lag]] [-m magnification] [-u units] [-s] [-[no]rev[erse]] [-[no]con[serve]] [-p first:final] [-i increment] [-ho dimension] [-vo dimension] TeX Output ---------- PSPRINT looks for a DVI file by default. To print foo.dvi, simply type: psprint foo PSPRINT translates foo.dvi into a temporary PostScript file. The order in which pages are translated depends on the type of printer. (The default order can be overridden by -reverse or -noreverse.) If no errors are found, the temporary file is sent to an appropriate print queue and then deleted. PostScript Output ----------------- PostScript is a complete programming language with a powerful set of operators for manipulating text and graphics. A PostScript program is an ordinary text file. If you give it a name like foo.ps then sending it to the printer is simple: psprint foo.ps If you decide to use some other file extension you'll have to add the -ps option. The PSPRINT User Guide explains how to include PostScript graphics in a TeX or LaTeX document. People who want to write PostScript programs will need to get the PostScript Language Reference Manual and PostScript Language Tutorial and Cookbook. Both books are by Adobe Systems Incorporated and published by Addison-Wesley. Text Output ----------- To print a normal text file, just use any file type except .dvi or .ps: psprint foo.lis Your output will have 66 lines per page, and any lines more than 80 characters long will be truncated. Use the -l option to rotate the paper so that you can have lines up to 132 characters long (but only 50 lines per page). Type "psprint foo.ps -text" if you want to print a PostScript program rather than have it interpreted. You'll also have to use -text if you want to print a text file called foo but foo.dvi also exists. The -two and -wide options also print text files but format the output so that two "pages" appear on each sheet of paper. In both cases there will be 60 lines per page, but for -two each line can be up to 80 characters long, or up to 132 characters for -wide. These text file facilities may not be available on all types of printers, especially the Linotronic. Options ------- -device printer_type This option tells PSPRINT which type of PostScript printer is to be used. The currently supported devices are: lw --- for an Apple LaserWriter (the default) lino --- for a Linotronic 300 ps40 --- for DEC's PrintServer 40 -dvi Force PSPRINT to assume the input file is a DVI file. -ps Force PSPRINT to assume the input file is a PostScript program. -text Force PSPRINT to assume the input file is an ordinary text file. -two Like -text but the output is formatted so that two "pages" (both 60 lines by 80 columns) appear on each sheet of paper. -wide Like -text but the output is formatted so that two wide "pages" (both 60 lines by 132 columns) appear on each sheet of paper. -flag or -noflag (only if LaserWriter) By default PSPRINT produces a flag page for each job sent to a LaserWriter. Use -noflag if you don't want such a page. -manual (only if LaserWriter) Use this option if you want to manually feed paper into the LaserWriter. As soon as the printer sees your job it will wait for you to feed in each sheet of paper (it will normally wait up to a minute). -lowres (only for a DVI file and if Linotronic) By default, TeX output on the Linotronic is printed at 1270 dots per inch. The temporary file created by PSPRINT will typically be very large. If -lowres is given then 635 dots per inch will be used, reducing both the size of the temporary file (by roughly three quarters) and the likelihood of memory problems. The print quality will of course be poorer but you'll probably need a magnifying glass to clearly see the difference. -size page_setup (only if Linotronic) This option specifies the page image size and orientation. Possible values are a4p (the default), a4l, a5p, a5l, b5p, b5l and a3l. The "p" stands for portrait and the "l" for landscape. (Don't confuse the landscape orientation with the -l option which rotates the output within the page image, regardless of the -size value.) -cutmarks or -nocutmarks (only if Linotronic) This option controls the appearance of cut marks on Linotronic output. These marks define the edges of the page image. -cutmarks is the default; use -nocutmarks to suppress them. -p first:final (only for a DVI file) Print a selected subrange of pages from the DVI file. "first" and "final" can select either DVI page numbers (positive integers) or TeX page numbers. Assuming TeX generated the pages "[0] [1] [2.1] [2.2] [3]" (DVI pages 1 to 5), here are some examples of how you could use -p: psprint foo -p 2 --- prints the 2nd DVI page (=[1]) psprint foo -p '[2]' --- prints [2.1] and [2.2] psprint foo -p :4 --- prints the first four pages psprint foo -p '1:[2]' --- also prints the first four pages psprint foo -p 4: --- prints the last two pages psprint foo -p '[2.2]:' --- also prints the last two pages Note the need to enclose a TeX page specification in single quotes. Note also that "first" and "final" are optional; they default to the first and last DVI pages respectively. Omitting ":final" entirely sets "final" equal to "first". A TeX page specification is of the form [i0.i1...i9]. i0 to i9 are integers separated by periods and represent the 10 counter values that TeX stores with each DVI page. Any number of these integers may be absent and trailing periods may be omitted. An absent integer will match any value in the corresponding counter. Note that more than one DVI page may match a particular TeX page specification. If "first" is a TeX page then the LOWEST matching DVI page is selected, and if "final" then the HIGHEST matching page is selected. -i increment (only for a DVI file) Assuming f is the first DVI page selected (where f is either 1 or the start of a -p subrange) then an increment of i tells PSPRINT to print pages f, f+i, f+2i, f+3i, ... , f+ni, where f+ni is <= the final DVI page selected. The primary use of -i is to simplify the printing of a document on both sides of the paper. For example, if foo.dvi has 8 pages then the following steps will produce a two-sided document on a LaserWriter: 1. psprint foo -i 2 -noflag # prints DVI pages 7, 5, 3, 1 Note that -reverse is the default printing order for a LaserWriter. 2. Remove the 4 pages from the output tray and carefully put them back into the input cassette so that page 1 remains face up and its top edge goes into the printer first. (If foo.dvi had 7 pages then you would only need to remove the top 3 pages from the output tray.) 3. psprint foo -i 2 -p 2: -norev # prints DVI pages 2, 4, 6, 8 Note that the use of -rev or -norev with -i has no effect on WHICH pages are printed; it simply changes the ORDER in which they are done. -reverse or -noreverse (only for a DVI file) Use -reverse to force PSPRINT to print pages in descending order, or -noreverse to force PSPRINT to print pages in ascending order. By default PSPRINT prints DVI pages in an order determined by the type of printer you are using. The Apple LaserWriter stacks output sheets face up, so PSPRINT normally prints pages in reverse order so that your output will be automatically collated. The PrintServer 40 stacks the output face down, so PSPRINT normally prints pages in ascending order. The default order on the Linotronic is largely irrelevant, since this printer produces pages on a continuous roll of paper (the default used is ascending order). -conserve or -noconserve (only for a DVI file) Use -conserve to force PSPRINT to conserve the printer's virtual memory at the expense of creating a larger output file (character bitmaps will be downloaded more often). On a Linotronic -conserve is the default; on a LaserWriter or PrintServer -noconserve is the default. -ho dimension and -vo dimension (only for a DVI file) These options allow you to shift the printed location of each page according to the given dimensions. For example, "-ho -.5in" would move each printed page half an inch to the left. A "dimension" is any integer or real number (possibly negative) followed by a two-letter unit: in,cm,mm,pc,pt,bp,px (same as those for -u). -m number (only for a DVI file) Override the DVI magnification with a number 1000 times the desired magnification. The given number should correspond to one of TeX's \magstep values; see chapter 4 of The TeXbook. -u units (only for a DVI file) Set the units of dimensions displayed in some PSPRINT messages (e.g., if the page is off the paper). Legal units are: in for inches (the default) cm for centimetres (2.54cm = 1in) mm for millimetres (25.4mm = 1in) pt for points (72.27pt = 1in) pc for picas (12pc = 1pt) bp for big points (72bp = 1in) px for pixels (the Apple LaserWriter has 300 pixels per inch) -s (only for a DVI file) Display statistics on the number of rules/fonts/characters on each page. -l To get "landscaped" output instead of the normal "portrait" output. If given a DVI file, PSPRINT will check each page to make sure it fits within the rotated paper. -c number To specify up to 25 copies. Use of this facility is not encouraged. Note in particular that copies of a multiple-page document will NOT be collated. -n string (only if LaserWriter or Linotronic) To include the given string on your flag page. -q string To override the default queue used by PSPRINT. (Some sites may have more than one printer of the same type.) -o file To send the PostScript code generated by PSPRINT to a file rather than to a printer. Since PSPRINT generates device-specific PostScript code you should only send this file to a PostScript printer of the type that PSPRINT intended to use. Errors ------ PSPRINT may detect certain errors while translating a DVI file. The sort of errors you are most likely to see include: Page off paper (paper is ... The current page contains material beyond one or more paper edges. Use DVItoVDU to see where the problem lies. Couldn't open font file: ... Your DVI file uses a font at a non-existent magnification. Try a different font magnification in your source file. Couldn't open \special file: ... PSPRINT could not locate the given \special file. Check the file's spelling and/or directory location. Error messages apply to the most recently displayed DVI/TeX page. Any message that does not make sense probably indicates some sort of bug. Please save a copy of the input file and report the problem to your local TeXnician. If a DVI file uses a large number of fonts (or a few very large fonts) then you might get an error page with the message "VMerror". This indicates that PostScript's "virtual memory" has been exhausted, and the rest of your job will be flushed. This problem is unlikely to worry most people, particularly on the PrintServer 40 which has much more VM than the LaserWriter or Linotronic. If the problem does occur, there are a few things you can try: --- On a LaserWriter or PrintServer 40, try printing a few pages at a time, or use -conserve. --- On a Linotronic, try using -lowres. (Note that -conserve is the default for this device.) An error in a PostScript program should produce some sort of message on your printed output. If this happens a lot, go back and read the PostScript Reference Manual more carefully. PostScript Fonts ---------------- PSPRINT allows the use of PostScript fonts in a TeX or LaTeX document. Such fonts can be used at any desired size and no character bitmaps need to be downloaded since the shape information is resident in the printer. The necessary typesetting information required by PSPRINT is extracted from TFM files (TeX Font Metric files). A TFM file name beginning with "ps-" is used to indicate a resident PostScript font. Each type of PostScript printer provides a different set of fonts. To be able to use a particular PostScript font you need to know the name of its corresponding TFM file and whether it actually exists in the printer you want to use. For each PostScript printer currently supported there exists a file containing just such information: $tex_ps/lw_fonts.ps --- converts TFM names into LaserWriter fonts $tex_ps/lino_fonts.ps --- converts TFM names into Linotronic 300 fonts $tex_ps/ps40_fonts.ps --- converts TFM names into PrintServer 40 fonts PSPRINT also uses these files, so you can be reasonably confident about the validity of their contents. (The above file names assume that the environment variable tex_ps points to the public directory in which various PSPRINT-related files reside. To discover what tex_ps is at your site, type "which psprint" and examine the first few lines of the indicated file.) There are some important differences between PostScript fonts and the Computer Modern fonts normally used with TeX: --- PostScript fonts usually contain up to 256 characters, with many empty locations. Computer Modern fonts also have up to 256 characters but typically use only the first 128 locations (with very few empty). --- When a PostScript font is scaled to the same design size as a CM font it tends to look darker and larger. You need to be a bit careful when mixing the two font designs. --- The standard TeX commands for accents and foreign letters need to be redefined for a PostScript text font. The file $tex_ps/pstext.tex contains the required macro definitions; note that a few commands (\j, \aa, \AA, \t) cannot be used at all. Another file, $tex_ps/psfonts.tex, inputs these macros and illustrates the use (and abuse) of PostScript fonts in a TeX document. PostScript Graphics ------------------- PSPRINT allows the inclusion of PostScript graphics using TeX's \special command. The \special argument is interpreted as a file name, possibly followed by a space and additional PostScript text that will be treated as a separate line at the start of the given file. For example, "\special{figure.ps 2 1 scale}" will cause PSPRINT to copy a line containing "2 1 scale" to the temporary output file, followed by the contents of figure.ps, a file assumed to be in your current directory and containing some sort of PostScript program. (The figure will be twice as wide as one included by \special{figure.ps}.) The PSPRINT User Guide has more details.