next up previous
Next: Printing but still Up: Running a Sample Previous: Stopping LaTeX When

Previewing and Printing DVI Files

Ok, so you've got a DVI file, now what do you do with it? Well, the best thing to do is to view it on your computer screen. You can do this with the xdvi(1) command. Much like LaTeX, xdvi will assume a .dvi extension if you don't provide one, so to view the file file.dvi (generated from file.tex) you can use either of the following commands:

xdvi file or xdvi file.dvi

Once you've previewed the file (and hopefully proofread it to fix any mistakes), if you really need a paper copy, you can print it with the print(1) command. Unlike the xdvi command, the print command needs the file extension, so to print the above file, file.dvi, you would need to enter the following command:

print file.dvi

  The print command will automatically determine that the file you're trying to print is a DVI file, and do the necessary tricks for you to translate that into a format (Postscript) that the printer understands. If you wish to do the Postscript translation first yourself, you will need to use the dvips(1) command. For example, to create the Postscript file test.ps from the DVI file test.dvi you need to enter the following command:

dvips -o test.ps test.dvi
You can then preview this Postscript file with the ghostview(1) command as follows:
ghostview test.ps


Brian Edmonds
Mon Jan 15 08:45:54 PST 1996