DVI2PS(1)

✨ DVI2PS πŸ’… (that's the dvi2ps command, bestie)

ok so real quick β€” this is from the General Commands Manual section, and it's your girl dvi2ps, here to turn your DVI files into PostScript. slay. let's get into it πŸŽ€


🌸 NAME 🌸

dvi2ps β€” convert a DVI file to PostScript πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

dvi2ps [-D var=val] [-F fontdesc] [-K] [-R n] [-S]
     [-c output-file] [-d] [-f n] [-i file] [-m n] [-n n]
     [-o str] [-q] [-r] [-s file] [-t n] [-w]
     [dvifile[.dvi]]

πŸ‘‘ DESCRIPTION πŸ‘‘

ok so basically? this program takes a DVI file and converts it to PostScript, and then writes the result straight to standard output. no cap. ✨

if you don't give it a dvifile, it just reads from standard input, nbd.

the setting for the printer comes from the fontdesc file. that's the vibe. πŸ–¨οΈ


πŸ’… OPTIONS πŸ’…

  • -D var=val β€” set a value of a variable var to val. simple as that.
  • -F fontdesc β€” pick which fontdesc file to use. main character choice tbh.
  • -K β€” remove comments from included PS files. decluttering, we love to see it 🧹
  • -R n β€” set the resolution of the printer, in n dpi. crisp.
  • -S β€” turn on printing of statistics. heads up: some versions of dvi2ps will optionally print stats about font usage and some other info that's generally only interesting to developers. on those systems, -S turns the statistics printing on.
  • -c output-file β€” write the output to output-file instead of standard output.
  • -d β€” select debugging output. you probably don't want to. fr fr. πŸ™ˆ
  • -f n β€” set a starting page number. and like, this is a TeX page number β€” \count0, specifically.
  • -i file β€” copy the named file to the output. the contents of the file you name get copied to the Prolog-part (cf. PostScript Document Structuring Convention) of the output. ✨
  • -m0 | -mh | -m1 | -m2 | -m3 | -m4 | -m5 β€” specify a magstep to use to print the document. this overrides whatever might be in the DVI file. it said what it said.
  • -m n β€” specify a magnification to use to print the document. the magic numbers 1000, 1095, 1200, 1440, 1728, 2074 or 2488 correspond to the magsteps above. πŸ”’
  • -n n β€” specify the number of copies to print.
  • -o str β€” specify a printing option. the valid options are letter, note, legal, tabloid, a3, a4, a5, b4, b5, landscape, letterlandscape, notelandscape, legalenvelope, tabloidlandscape, a3landscape, a4landscape, a5landscape, b4landscape, b5landscape, envelope, large, small, and manualfeed. you can repeat this argument several times if you're feeling extra. also envelope is a variant of landscape that selects manual feed and does proper positioning for regular envelopes. iconic.
  • -q β€” be quiet. don't chatter about pages converted, etc. 🀫
  • -r β€” stack pages in reverse order. so normally the DVI pages are processed in reverse order, and the result is that they're stacked in the correct order in the output tray. this option reverses that. chaos, respectfully.
  • -s file β€” copy the named file to the output. the contents of the file you name get copied to the Setup-part (cf. PostScript Document Structuring Convention) of the output. πŸ’–
  • -t n β€” specify an ending page number.
  • -w β€” don't print out warnings. ignorance is bliss, we guess.

πŸ“ NOTES πŸ“

this is a bare bones DVI-to-PostScript program. minimal error checking is done. that's the whole vibe.

not all fonts are available in the resolution needed to display on the laser printer. when a missing font shows up, dvi2ps will keep processing your DVI file, and will log a warning message. gaps will appear in the document where the missing characters should have been. so like... you'll see the holes. 😭

also, it can take up to 60 seconds for the first page to be output. after a head of steam has been built up, it can roll along at 5-10 seconds per page. patience is a virtue, bestie. ⏳


🌈 PostScript ILLUSTRATIONS 🌈

this program supports use of the \special command in TeX to include special PostScript code for graphics, etc. so if you specify \special{psfile=foo.ps} in the TeX source, the contents of file foo.ps (which is assumed to contain PostScript code) will be copied into the output at that point. 🎨

for most included graphics, the user's (0,0) point will be set to the point of the \special command, with x and y coordinates increasing up and to the right, and in units of PostScript points (72/inch) β€” so you must explicitly leave space above the \special command for most graphics. periodt.

for graphics produced by Apple Macintoshes (i.e., MacDraw, MacPaint, etc.), the top left corner of the drawing will be at the point of the \special command; in this case you must leave the required space below the \special. different rules, same energy. 🍎

the \special string can contain any number of the following keyword=value pairs, separated by blanks:

dimensions are in points: 72 pt = 1 in πŸ“
  • psfile β€” value type: string β€” PostScript file to include
  • epsfile β€” value type: string β€” Encapsulated PostScript file to include
  • hsize β€” value type: dimension β€” maximum horizontal size (for clipping)
  • vsize β€” value type: dimension β€” maximum vertical size (for clipping). use negative values to specify a clipping region below the current position.
  • hoffset β€” value type: dimension β€” amount to shift right
  • voffset β€” value type: dimension β€” amount to shift up
  • hscale β€” value type: number β€” scale factor in x-dimension
  • vscale β€” value type: number β€” scale factor in y-dimension
  • rotation β€” value type: number β€” counter-clockwise rotation angle

so like, thus:

\special{psfile=foo.ps hoffset=72 hscale=0.9 vscale=0.9}

will shift the graphics produced by file foo.ps right by 1", and will draw it at 0.9 normal size. ate. πŸ’…

couple more deets:

  • hsize and vsize are given relative to the (0,0) point of the drawing and are unaffected by offsets and scales.
  • offsets are given relative to the point of the \special command, and are unaffected by scales.
  • if Macintosh drawings are to be included, the proper LaserPrep file must be downloaded to the printer, either permanently or as another header file in addition to the standard tex.ps header file.

πŸ—‚οΈ FILES πŸ—‚οΈ

  • *.dvi β€” TeX DeVice Independent output file
  • /usr/local/share/texmf/fonts/.../ β€” default font file directories
  • /usr/local/lib/dvi2ps/fontdesc β€” default fontdesc file

πŸ” SEE ALSO πŸ”


πŸ’€ BUGS πŸ’€

there is likely a limit to the size of documents that can be printed (at least, on the Apple LaserWriter). if you get VMerrors reported when printing, use the -f and -t options to select a range of pages. the exact limit is unknown, but is probably well in excess of 50 pages for normal documents, decreasing with number of different fonts used, size of fonts, etc. so like... be mindful. 🫠


🫢 AUTHORS 🫢

Mark Senn wrote the early versions of this program for the BBN BitGraph. Stephan Bechtolsheim, Bob Brown, Richard Furuta, James Schaad and Robert Wells improved it. Norm Hutchinson ported the program to the Sun. Neal Holtz ported it to the Apollo, and then to produce PostScript. Jean-Francois Lamy fixed the interface for PostScript illustrations. the whole squad really showed up for this one. πŸ‘‘

(PostScript is a trademark of Adobe Systems, Inc.)


ok that's the whole page, no notes left behind πŸ’– this version is dated 4 September 2000, and it lives in the General Commands Manual β€” so like, shoutout to that whole era of Unix lore. go convert something iconic, bestie πŸ¦‹βœ¨