"Linux Gazette...making Linux just a little more fun!"


The Answer Guy


By James T. Dennis, linux-questions-only@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?)How to read DVI files?

From Gregory F.I. Sewbalak on 20 Aug 1998

Dear Answer Guy,

A few weeks ago I've purchased the S.u.S.e. 5.2.

With this 6 CD-Box there was no user manual available, therefore I tried to read the "books.dvi" on the CD. However, I don't seem to succeed in opening this file, because I don't know which program I need to do so! So, with which program can I read the dvi-files and the psz-files?

Reminder: I used to be a Microsoft fan, but since I've tried RedHat 5.0 I've completely switched to Linux! How about that?!!

Yours Sincerely,
Gregory F.I. Sewbalak

(!).dvi files are created by the TeX and LaTeX typesetting (desktop publishing) packages. These are in a "device independent" format --- and are normally processed further by printer drive like 'dvips' or 'dvilj' (for PostScript and LaserJet printers respectively).
If you have the X Window System up and running you can use 'xdvi' to "preview" these (view them on screen). You could also use 'dvips' to generate a Postscript file and use 'ghostview' or 'gv' (both are PostScript viewers for X) to view them.
When you have questions of this sort it's often helpful to use the 'apropos' or 'man -k' command to get a list of commands and man pages that may related to some key word. Thus, on my S.u.S.E. 5.1 system typing the command: man -k dvi gives me:
dvi2tty (1)          - preview a TeX DVI-file on an ordinary ascii terminal
dvibook (1)          - rearrange pages in DVI file into signatures
dviconcat (1)        - concatenate DVI files
dvilj (1)            - convert dvi files to PCL, for HP LaserJet printers
dvips (1)            - convert a TeX DVI file to PostScript
dvired (1)           - print dvi-files
dviselect (1)        - extract pages from DVI files
dvitodvi (1)         - rearrange pages in a DVI file
dvitype (1)          - translate a dvi file for humans
grodvi (1)           - convert groff output to TeX dvi format
xdvi (1)             - DVI Previewer for the X Window System
... and reading those would give me some cross references.
Allegedly there are also SVGAlib dvi and PostScript viewers --- though I've never used one. One of these day I'll hunt one down and play with it. Although my wife doesn't mind running X on the old 386 --- it seems too slow to me (I finally changed to this 150Mhz Pentium system that I built because I've been using xdvi and Gnus so much)..
[In fact, I'm using it right now, very effectively. But I'm cheating... I'm really using the networking power of X. Betel, our VarStation II, is running Netscape and two sterms for me, and Antares is just serving display, keyboard and pointer functions to my desktop.
-- Heather]
The TeX typesetting language, and the LaTeX set of macros for it, are very popular among academic and technical publishers. The system was orginally created by Donald Knuth --- the most respected professor in the field of programming. He designed it and the the WEB "Literate Programming" system while he was writing the first editions of his "Art of Computer Programming" series (between the 2nd and 3rd volumes, if I recall correctly).
TeX is not just a typesetting language like troff --- it is an extensible programming language for creating typesetting commands. Leslie Lamport used this facet of the system to create a set of macros, LaTeX, to allow people to focus on a document's structure and let his macros and the TeX system do almost all of the page layout.
Thus a bit of plain text like the following:
% Template for a LaTeX Letter
\documentclass{letter}

\name{Jim Dennis}
\address{903 Harriet Ave.\ \\Campbell, CA 95008-5119}
\makelabels
\begin{document}
%% for each letter do:

\begin{letter} {%
\\ % full name and title

\\ % address

} % city, state, zip-code

\vfill

\opening{Dear %
% greeting name
,} 

\vfill
\closing{Sincerely,}
\vspace{
\signature{Jim Dennis,}

\vfill
\end{letter}
%% end letter  (Repeat as necessary)
\end{document}
... is all you need to create nicely typeset letters. Basically you just fill in the blanks, run a command like:
latex myletter.tex
.. and (if all goes well) send the .dvi file to the printer (or run it through the 'dvips' command and then to the printer).
If you've been hearing about XML (the next generation "extensible" enhancements to HTML) then this should give you an idea of what they're doing. LaTeX and TeX are extensible --- and there are packages to do all kinds of interesting and specialized typesetting and layout with them (things like "chess" and "backgammon" diagramming and all sorts of scientific and technical diagrams, tables and bibliographies).
(Frankly XML sounds like a bit of a mess --- something like the old LU6.2 and APPC morass that my mainframer friends used to describe).
The problem for many people is that this mode of thinking and working is totally alien. They're used to WYSIWIG interfaces and manual/visual layout (make it "look right" rather than "make it clear what you mean").
There are some efforts to provide a friendlier interface to LaTeX --- the most notable is "LyX" (pronounced "licks") and the KDE variant called KLyX). You can read more about LyX at its own web site: http://www.lyx.org
Anyway, I hope that helps.


(?)How to read DVI files?

From Gregory F.I. Sewbalak on 22 Aug 1998

Thanks for the explanation!


Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 32 September 1998


[ Answer Guy Index ] phreak abandon javaterm BBS flaws doslinux resume
softwindows convert apache emulate database distrib proxy
disable DVI superblock serial permission detach cdr
rs422 modem notfound tuning libc5 startup clock ping
accounts lilo NDS 95slow nonlinux progenv cluster ftpd


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]