Viewing Things on the Screen

If you are using an X-terminal, you will be able to view documents and images on the screen, with quality approaching that which you would see in a printed version. This is preferable to wasting paper if you don’t really need a permanent copy.

This page documents the following viewing programs:

  • xdvi – Display a Tex/Latex document in DVI format
  • ghostview – Display a PostScript document
  • acroread – Display a PDF document

xdvi – Display a Tex/Latex document in DVI format

When you run Tex or Latex successfully, the typeset form of the document will be left in a file whose name ends in “.dvi”. You can view this on the screen with the xdvi program. For example, if you started with a file mydoc.tex, and then ran latex to create mydoc.dvi, you could view the results with the command

xdvi mydoc

(Note that the .dvi suffix is optional.) This creates a new window in which the document is displayed. You can move through the document by hitting the space bar, or by clicking on the various buttons.
Alternatively, you can convert the DVI file to a Postscript file as follows:

dvi2ps mydoc

and then view the resulting .ps file, as described below.

ghostview – Display a PostScript document

Postscript files are produced by many typesetting and graphics programs, and is also commonly used to distribute documents such as technical reports.

You can view a Postscript file on the screen with the ghostview program. For example:

ghostview mydoc.ps

will display the Postscript file mydoc.ps It is common to give Postscript files names ending in .ps, and this suffix is automatically used by programs such as dvips, but you have to enter it explicitly when using ghostview.
Ghostview will create a new window on the screen in which it displays the document. For most documents, you will be able to move around by clicking on one of the page numbers at the side with the middle mouse button. You can also print the document using “Print” from the “File” menu. You can print just part of the document by marking pages with the left mouse button, and then using “Print marked pages”. You can exit ghostview by typing “q”.

For more details, see “man ghostview” There is also a ghostview web site with up-to-date information. It also has a version that you can download for your home computer.

 

acroread – Display a PDF document

Portable Document Format (PDF) files can be viewed on an X-terminal with the acroread command. For details, see “man acroread”, or start up acroread and use the “Help” menu.

Print Friendly