DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T u

⟦fa3a480fe⟧ TextFile

    Length: 39492 (0x9a44)
    Types: TextFile
    Names: »userguide.tex«

Derivation

└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./DVIware/crt-viewers/others/dvitovdu/doc/userguide.tex« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« 
        └─⟦ca79c7339⟧ 
            └─⟦this⟧ »DVIware/crt-viewers/others/dvitovdu/doc/userguide.tex« 

TextFile

% This is the TeX source file for the "DVItoVDU User Guide".
% Details peculiar to our site are indicated by the string "SYSDEP".
% Cross references are indicated by the string "XREF".
% Feel free to make modifications applicable to your site.
% Andrew Trevorrow, July 1986

\input guidemacs

% \centerline{\crest}         % SYSDEP: Adelaide University crest
\vfil
\centerline{\title \DVItoVDU\ \ User\ \ Guide}
\bigskip
\vskip\parskip
\centerline{\bigbf Version 1.0 for VAX/UNIX}
\smallskip
\centerline{\bigbf Andrew Trevorrow, July 1986}
\bigskip

\noindent
This document explains how to use {\DVItoVDU}, a \TeX\ page previewer.
The program allows you to look at \TeX-generated DVI pages on a variety
of commonly available VDUs.
% SYSDEP
% Some of the information in this user guide is also available on-line by
% typing `|man dv|'.
It is assumed you are already familiar with \TeX\ under VAX/UNIX\null.

\bigskip
\vskip\parskip
\centerline{\bigbf Contents}
\bigskip
% XREF: make sure the page numbers are correct!
\line{Introduction\leaders\hbox to .75em{\hss.\hss}\hfil 1}
\line{Command options\leaders\hbox to .75em{\hss.\hss}\hfil 1}
\line{The dialogue region\leaders\hbox to .75em{\hss.\hss}\hfil 4}
\line{The window region\leaders\hbox to .75em{\hss.\hss}\hfil 5}
\line{The commands\leaders\hbox to .75em{\hss.\hss}\hfil 6}
\line{An illustration\leaders\hbox to .75em{\hss.\hss}\hfil 9}
\line{Some examples\leaders\hbox to .75em{\hss.\hss}\hfil 10}

\vfil
\centerline{\smallrm University of Adelaide Computing Services}   % SYSDEP
\eject

% The above is the title page; let's make a few adjustments to some parameters:
\footline={\hss\rm\folio\hss}      % turn page numbers back on
\pageno=1                          % and restart numbering

\subhead{Introduction.}

Let's assume you've just run \TeX\ and created a file called |foo.dvi|.
Even if \TeX\ did not find any errors, you cannot be sure that
the document is formatted correctly.  There might be bad line breaks, bad
page breaks, alignment problems, pages too big for your printer's paper,
missing fonts---not to mention spelling mistakes.

The lack of visual feedback is one of the major disadvantages of
using a document compiler like \TeX\null.
Without a previewing program, the only way to check |foo.dvi| is to
continue through the \TeX\ cycle and look for errors in the printed output.
This can be time consuming and is a waste of paper.
Now you can use {\DVItoVDU} to look at |foo.dvi| on a variety of commonly
available terminals.

\DVItoVDU\ is an interactive program; you can enter commands to
select a particular page for display, look at the overall format of the entire
page and then request a smaller region for closer examination.
The manner in which the page is displayed can be varied from a full,
accurate representation to a terse, fast display for when fine details are
unimportant.
All the commands are described in detail in a later section.  % XREF

To look at |foo.dvi|, just type `|dv foo|'.
Some command options may be necessary if {\DVItoVDU} is to work properly.
In particular, the |-v| option must correctly describe the type of VDU
you are using.

\subhead{Command options.}

The |dv| command has a number of options, each of which
must be followed by a value.
If the same option appears more than once then the last value will be used.
If a particular option does not appear then a default value will be used:
\begindisplay
option&   default value&       meaning\cr
\noalign{\medskip}
|-v|&     value of |TERM|&     type of VDU\cr
|-r|&     |300|&               printer resolution in pixels per inch\cr
|-x|&     |8.3in|&             assumed paper width\cr
|-y|&     |11.7in|&            assumed paper height\cr
|-m|&     use the DVI magnification&
          replace the DVI magnification\cr
|-f|&     |/usr/local/lib/tex/fonts|&
          font directory containing |pxl| files\cr
|-d|&     |/usr/local/lib/tex/fonts/amr10.1500pxl|&
          dummy font used if one is missing\cr
|-h|&     |/usr/local/lib/dv/dvitovdu.hlp|&
          help file read by |?| command\cr
\enddisplay
% SYSDEP: take note system wizards! (see sysinterface.mod)
The last three options are really for system wizards; their default values
have been set up so that most users need never worry about changing them.

\vfil\eject

\noindent
Let's look at all the options in more detail.
Each option is followed by a value of a certain type:
{\it string\/} is a string of alphanumeric characters,
{\it i\/} is a positive integer, {\it file\/} is a file or directory, and
{\it dimen\/} is a positive integer or real number followed by a
two-letter unit: |in|, |cm|, |mm|, |pc|, |pt| or |px|.
(Most of these should be familiar from \TeX\null.  {\DVItoVDU} provides an
additional unit, |px|, which stands for ``paper pixels''.
These two-letter sequences can later be used as commands to
change the units of dimensions---see page 7 for details.)   % XREF

\bigskip
\noindent |-v| {\it string\/}

This option explicitly tells {\DVItoVDU} what type of VDU you are using.
The value of the |TERM| environment variable is used if |-v| is not given.
For example, if you're using a VISUAL 550 terminal and |TERM| does not equal
|vis550| then you'll need to type `|dv -v vis550 foo|'.

\noindent
The current version of {\DVItoVDU} will accept the following {\it string\/}
values in upper or lower case:
\begindisplay
|AED483|&    (AED 512 with 512 by 483 screen)\cr
|AED512|&    (AED 512 with 512 by 512 screen)\cr
|ANSI|&      (any ANSI compatible VDU; synonym = |VT100|)\cr
|REGIS|&     (any ReGIS compatible VDU; synonyms = |GIGI|, |VK100|,
                                                   |VT125|, |VT240|)\cr
|VIS240|&    (VISUAL 240; synonym = |VIS241|)\cr
|VIS500|&    (VISUAL 500)\cr
|VIS550|&    (VISUAL 550)\cr
|VT100132|&  (any VT100 compatible VDU in 132 column mode)\cr
|VT220|&     (VT220 using down-loaded chunky graphics)\cr
|VT640|&     (VT100 with Retro-Graphics)\cr
\enddisplay

\noindent
It is assumed your terminal has been set up to obey XON/XOFF flow control.
This is the normal setting for terminals connected to a VAX so don't worry
about it unless problems occur while {\DVItoVDU} is displaying a page.

\noindent
Some VDUs require special settings for {\DVItoVDU} to work properly:

\item{$\bullet$}
The |VIS500| and |VIS550| terminals have function keys which control how
information on the screen is to be displayed.  {\DVItoVDU}
assumes graphic images and alphanumeric text can be seen at the
same time.  To ensure that this is possible, you may need to

{\parskip=0pt
\smallskip
\itemitem{---} hit the |SET-UP| key
\itemitem{---} hit the |F6| function key until |F6=BOTH| appears
\itemitem{---} hit the |SET-UP| key to return to normal operating mode.
\smallskip
\item{} You can do these steps while {\DVItoVDU} is running.
Both terminal types should also have the Scale Factor set at 3\;:\;4.
\par
}   % \parskip back to normal

\item{$\bullet$}
The |REGIS| VDUs use ANSI escape sequences to update the dialogue region,
and the |VIS550| VDU is assumed to be emulating a VT100.
Change the appropriate |SET-UP| value if your screen becomes full of junk.

\item{$\bullet$}
If you want to select |VT100132| you have to switch to
132 column mode yourself.
The |VT220| VDU will, however, automatically switch to 132 columns
(and then to 80 columns when you quit).

\bigskip
\noindent |-r| {\it i\/}

{\DVItoVDU} treats the imaginary sheet of paper on which a DVI page will appear
as a two-dimensional array of tiny dots called paper pixels.
{\it i\/} is a positive integer that defines the number of paper pixels per inch
(horizontally {\it and\/} vertically).  This value should match the resolution
of the device that will be used to print your document.
% SYSDEP
The Apple LaserWriter, for instance, has a resolution of 300 dots per inch.

\vfil\eject
\noindent |-x| {\it dimen\/}~~and~~|-y| {\it dimen\/}

These two options define the width and height of the paper upon which your
document will eventually be printed.
% SYSDEP
Note that their default values specify A4 paper
(|8.3in| wide and |11.7in| high).
Every time you select a page, {\DVItoVDU} uses these values
to check that all the printed material will fit on the paper.

\bigskip
\noindent |-m| {\it i\/}

This option allows you to replace the magnification used
in the DVI file with some other value;
{\it i\/} is a positive integer 1000 $\times$ the desired magnification.
The given value should be chosen carefully so that the new font sizes
still correspond to existing PXL files.

Unless you know exactly what you are doing you should avoid changing
the DVI magnification,
especially if your \TeX\ source file uses |\magnification| {\it and\/} |true|
dimensions.
You should only supply a replacement magnification if you intend to
print the DVI file with the same override.

\bigskip
\noindent |-f| {\it file\/}

% SYSDEP
{\DVItoVDU} gets all its font information from PXL files.
These files should be kept within the directory specified by this option.

\bigskip
\noindent |-d| {\it file\/}

\TeX\ gets all its font information from TFM files.  For each TFM file there
are usually a number of corresponding PXL files, each of which
contains the character shapes for a font at a particular size.
Although \TeX\ allows you to scale a font to virtually any size,
it is obviously impossible to provide an infinite number of PXL files.
That is why it is best to
stick to the pre-defined |\magstep| values when scaling fonts---you're
much more likely to stay within the range of existing PXL files.

\DVItoVDU\ will warn you if your document attempts to use a
non-existent PXL file.
Rather than abort, it will load the PXL file specified after |-d| and continue
so you can look for more errors.
Paragraphs using this dummy font are likely to have ragged right margins.

The quickest way to check your DVI file for missing fonts is to type
the |S| command.  The resulting display will indicate any PXL files that do
not exist.  You should not attempt to print a DVI file using such fonts.

\bigskip
\noindent |-h| {\it file\/}

The |?| command reads the help file specified by this option.
The default help file contains a brief summary of all the commands.

% SYSDEP: Our site has a 300 dpi LaserWriter and we use dvi2ps.
%         A4 paper is 8.3" by 11.7".
\bigskip
\noindent
You might like to include some lines like these in your |.login| file:
\begintt
alias look500  'dv -v vis500'            # for use on a VISUAL 500
alias lookland 'dv -x 11.7in -y 8.3in'   # for rotated A4 paper
\endtt

\vfil\eject
\subhead{The dialogue region.}

If your command line is correct and if the |-v| value matches the type of
terminal you're actually using, then {\DVItoVDU} will clear the screen
and display
\begindisplay
|Total pages=|$n$|   DVI page=0   TeX page=[0]   Next=>   Terse|\cr
|Window at (|$h$|,|$v$|) |$wwd$| by |$wht
   $|   Page at (|$minh$|,|$minv$|) |$pwd$| by |$pht$|   IN|\cr
\strut\cr
|Command:|\cr
\enddisplay
These lines represent the ``dialogue region''; the rest of the screen is
called the ``window region'' and should be blank at this stage.

\noindent
The top two lines show status information.  The first status line shows:

\item{$\bullet$} $n$, the total number of pages in the DVI file.

\item{$\bullet$} The current DVI page and its corresponding \TeX\ page counters.
   Particular pages can be selected by their position in the DVI
   file (1 to $n$) or by the value of their \TeX\ counters.

\item{$\bullet$} The direction in which the |N| command will select consecutive
   pages; initially |>|.  The |>| and |<| commands allow you to move forwards or
   backwards through the DVI file.

\item{$\bullet$} The current display mode; initially |Terse|.
   The |T|, |B| and |F| commands allow you to switch between |Terse|, |Box| and
   |Full| display modes.

\noindent
The second status line shows:

\item{$\bullet$} The current location and size of the window.
   $h$ and $v$ are horizontal and vertical coordinates that define
   the current paper position of the top left corner of the window region.
   The following section has details on the coordinate scheme used
   by {\DVItoVDU}\null.  The |W| command allows you to move the window to an
   absolute position; the |U|, |D|, |L| and |R| commands allow relative
   positioning.
   $wwd$ and $wht$ represent the current width and height of the window region;
   their values are changed by the |H| and |V| commands.
   The initial window size depends on the |-r| value and the size and
   resolution of your VDU screen.

\item{$\bullet$} The location and size of the ``page rectangle''.
   $minh$, $minv$, $maxh$ and $maxv$ define the smallest rectangle containing
   all the rules and characters in the current page.
   $(minh{,}minv)$ is the top left corner of this rectangle; it is
   $pwd$ units wide and $pht$ units high.

\item{$\bullet$} The current units; initially inches.
   All numbers shown in this line are dimensions in terms of these units.
   The two letters shown at the end of the line correspond to the commands
   that allow you to switch between inches (|IN|),
   centimetres (|CM|), millimetres (|MM|), points (|PT|), picas (|PC|)
   and pixels (|PX|).
   Pixel values are shown as integral numbers and represent exact dimensions;
   all other values are shown as real numbers rounded to one decimal place.

\noindent
Until a page is selected, most of the status values are
meaningless and set to zero.

The third line is initially blank.  {\DVItoVDU} displays messages of various
kinds in this line.  Some of these messages appear only briefly but may convey
helpful information.
Others are more important and indicate some sort of problem, such as
an invalid command or a page that won't fit on the paper;
in these cases {\DVItoVDU} will prompt you to hit the |RETURN| key
before continuing.

The last line in the dialogue region is for entering commands.  The first
thing you normally want to do is choose a particular page for display.
For example, typing `|1|' will select the first page in the DVI file.
Many commands can be entered in the one command line.  Hit |RETURN| to
execute the command(s).

\vfil\eject
\subhead{The window region.}

The number of paper pixels per inch is given by the |-r| option.
A pixel can be either black (corresponding to a tiny blob of ink) or white
(no ink).
A typical DVI page contains characters from one or more fonts, and
perhaps a few rules.
A rule is simply a rectangular region of black pixels, usually in the shape of
a thin horizontal or vertical line.
A character is usually a more complicated pattern of black and white pixels.
Every character and rule has a
paper position---or ``reference point''---defined
by a pair of pixel values $(h{,}v)$
where $h$ is the horizontal coordinate and $v$ is the vertical coordinate.
{\DVItoVDU} uses a coordinate scheme in which the
position $(0{,}0)$ is a pixel one inch in from the top and left edges of
the paper.  Vertical coordinates increase down the paper,
horizontal coordinates increase to the right.
Confused?  The illustration on page 9 may help clear things up.  % XREF

The window region is used to view the current DVI page.
{\DVItoVDU} treats this region of the VDU screen as a two-dimensional array
of dots called ``screen pixels'' (to distinguish them
from the paper pixels described above).
A screen pixel is the smallest possible area on a VDU screen that
can be drawn or erased; the greater the number of screen pixels in a given area,
the higher the resolution of the VDU.

The initial size of the window region depends on the VDU; the width and height
are set so that each paper pixel corresponds to exactly one screen pixel.
The most accurate representation of a page will occur at these values since
neither horizontal nor vertical scaling is necessary:
\begindisplay
VDU&                 initial window size (width by height in pixels)\cr
\noalign{\smallskip}
|AED483|&            \enskip 512 by 442\cr
|AED512|&            \enskip 512 by 471\cr
|ANSI|&              \quad    80 by \enskip20\cr
|REGIS|&             \enskip 768 by 400\cr
|VIS240|&            \enskip 800 by 500\cr
|VIS500|, |VIS550|&         1024 by 688\cr
|VT100132|&          \enskip 132 by \enskip20\cr
|VT220|&             \enskip 132 by 100\cr
|VT640|&                    1024 by 650\cr
\enddisplay
Use the |H| command to change the width (the Horizontal size), and the
and |V| command to change the height (the Vertical size).
Try to avoid weird aspect ratios: `|H0.1 V100|' is a perfectly legal
command string, but produces a very distorted display!
The higher the resolution of the VDU,
the greater the accuracy of such scaled displays.
The command string `|HV|' will restore the window size to the above unscaled
dimensions.

Note the very low resolution of the |ANSI| and |VT100132| VDUs.
Since the individual dots making up their screens cannot be turned on and off,
{\DVItoVDU} has to define a screen pixel to be an entire character position.
An |ANSI| screen typically consists of 24 lines of 80 characters,
therefore the initial window region is 80 pixels wide and 20 pixels high
(the top 4 lines are used for the dialogue region).
At more useful window sizes the resulting displays will be extremely crude.
Nevertheless, a variety of formatting errors can still be detected on such
terminals---just don't try proofreading your document!

The size and location of the window region are automatically set
every time a page is selected.
{\DVItoVDU} tries to show as much of the
paper (and presumably the page) as possible, but without too much distortion.
After comparing the shape of the paper with the shape of your
VDU's {\it initial\/} window region, and depending on the location of the
page, {\DVItoVDU} may show the entire paper,
or the top or bottom half, or the left or right half.
If any part of the page is off the paper then the entire paper {\it and\/} the
entire page will be shown.
Since most paper sizes have portrait dimensions (width $<$ height), and most
VDU screens have landscape dimensions (width $>$ height), {\DVItoVDU} will
normally show the top half of a sheet of paper containing the selected page.

\vfil\eject
\subhead{The commands.}

In response to the `|Command:|' prompt you can enter one or more of the
following commands in upper or lower case.  Multiple commands are
processed in the order given but the window region is only updated,
if necessary, at the end.  For example,
if you type `|NFD|' then {\DVItoVDU} will get the Next page, switch to
Full display mode, move the window Down, and only then display the page.
If an illegal command is detected, any further commands are ignored.
Most commands consist of only one or two characters; some can be followed by
parameters.  Spaces before and after commands and parameters are optional.

\parskip=0pt    % TURN OFF FROM HERE ON.

\medskip
\bigskip
\leftline{MISCELLANEOUS.}
\bigskip

\item{} \hskip -\the\parindent \hbox to \parindent{|?|\hfil}\null
Display brief help on the available commands.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|S|\hfil}\null
Show the option values being used, as well as statistics about the number of
fonts, characters and rules used on the current page.
You'll also be warned about any PXL files that don't exist.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|Q|\hfil}\null
Quit from {\DVItoVDU}\null.
(|^C| will return you to the `|Command:|' level and |^Z| will suspend |dv|.)

\medskip
\bigskip
\leftline{SELECTING A PAGE.}
\bigskip

\item{} \hskip -\the\parindent \hbox to \parindent{$i$\hfil}\null
Select the $i$th DVI page.  $i$ must be a positive integer from
1 to $n$ where $n$ is the total number of pages in the DVI file.

\bigskip
\noindent |[|$i_0$|.|$i_1$|.| $\scriptstyle\cdots$ |.|$i_9$|]|
\item{}
Select the DVI page whose \TeX\ page counters match the given specification.
$i_0$ to $i_9$ are integers separated by periods.  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.
If more than one DVI page matches, the lowest will be chosen.
E.g., |[]| is equivalent to |[.........]| and will select the first DVI page,
even though the request matches every possible page.
\medskip
\item{}
\TeX\ stores the values of |\count0,\count1,...,\count9| in each DVI page.
Plain \TeX\ only uses |\count0| to control page numbering; the remaining
counters are set to zero.
Some macro packages may use the other counters for section or chapter
numbering; e.g., |[2.5]| might mean ``select page~2 from chapter~5''.
When showing the current \TeX\ page in the top status line, {\DVItoVDU}
always shows the value of |\count0|, but trailing counters with zero values are
not shown.
Note that plain \TeX\ uses negative values in |\count0| to indicate page
numbers in roman numerals (such as in a preface).
In most documents, the $i$th DVI page will be the same as \TeX\ page |[|$i$|]|.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|N|\hfil}\null
Select the Next DVI page according to the current direction (|>| or |<|).
Before any page has been requested,
|N| will select the first DVI page if the current direction is |>|, or
the last DVI page if the current direction is |<|.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|>|\hfil}\null
Future |N| commands will now select DVI pages in ascending order.
If $i$ is the current DVI page,
an |N| command will get page $i+1$ (unless $i$ is the last DVI page).

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|<|\hfil}\null
Future |N| commands will now select DVI pages in descending order.
If $i$ is the current DVI page,
an |N| command will get page $i-1$ (unless $i$ is 1).

\vfil\eject
\leftline{CHANGING THE WAY A PAGE IS DISPLAYED.}
\bigskip

\noindent
The |T|, |B| and |F| commands provide three different ways of displaying a
page.  The choice of display mode depends on the capabilities of your VDU
and the level of detail you wish to see.
Whatever the display mode, the window region
is always updated in the following manner:
Visible paper edges are drawn first, followed by visible rules.
Visible characters are then shown on a font by font basis; those fonts
with the least number of characters on the page are drawn first.
\medskip
\noindent
While the window region is being updated, {\DVItoVDU} will check to see if
you've typed something at the keyboard.
You can hit the |RETURN| key to abort the display,
or you can change the display mode by hitting the |T|, |B| or |F| keys
(without hitting |RETURN|).  There might be a slight delay between the time
you hit a key and the time something actually happens.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|T|\hfil}\null
Display a Terse representation of characters.
On high resolution VDUs the \TeX\ text fonts should be quite readable;
characters will be in
approximately the right position and may even be about the right size.
The display on low resolution VDUs can be a bit confusing; characters get
overwritten if they are too close together.  Don't worry too much
if you suddenly see many more spelling mistakes than usual!
Note that the text fonts will all look alike.
The only way to distinguish between different fonts is to note the
order in which characters are displayed (the less used fonts are drawn first).
Most VDUs assume all characters come from a \TeX\ text font and then attempt
to map them into similar-looking ASCII characters.
Characters from non-text fonts, such as math symbols, will usually appear
incorrect.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|B|\hfil}\null
Display Box outlines of the smallest rectangles containing all
black pixels in characters.
The reference point of a \TeX\ character is usually located near
the bottom left corner of one of these boxes.
Box mode is intermediate in speed between Terse and Full modes;
it is a quick and accurate way of checking
the alignment of entries in a table, for example.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|F|\hfil}\null
Display a Full representation of all pixels in characters.
This display is the most accurate but may take some time;
hit |RETURN| or switch to Terse or Box mode if you get bored.
The fact that the display mode can be changed {\it while the window is
being updated\/} can be very useful.
A good compromise between speed and accuracy is
to start off in Full mode so that math symbols and any other special
characters are displayed correctly, and to switch to Terse mode (by hitting |T|)
when the bulk of the text begins.

\medskip
\bigskip
\leftline{CHANGING THE UNITS OF DIMENSIONS.}
\bigskip

\noindent
All the numbers in the second line of the dialogue region are dimensions in
terms of the units shown at the end of the line.
The parameters following some commands are also dimensions in terms of
these units.
Unlike the dimensions in \TeX, you don't explicitly type the units when you
need to specify a dimension after a \DVItoVDU\ command---simply
enter an integer value or real value.
This value is rounded up internally to the nearest paper pixel based on the
current units and the conversion factors shown below.
For example, `|CM H5 V3.4|' will change the units to centimetres and set the
window size to be 5\;cm wide and 3.4\;cm high.

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|IN|\hfil}\null
Dimensions are assumed to be in terms of inches
(|-r| defines the number of paper pixels per inch).

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|CM|\hfil}\null
Dimensions are assumed to be in terms of centimetres
(2.54\;cm $=$ 1\;in).

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|MM|\hfil}\null
Dimensions are assumed to be in terms of millimetres
(10\;mm $=$ 1\;cm).

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|PC|\hfil}\null
Dimensions are assumed to be in terms of picas
(1\;pc $=$ 12\;pt).

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|PT|\hfil}\null
Dimensions are assumed to be in terms of points
(72.27\;pt $=$ 1\;in).

\bigskip
\item{} \hskip -\the\parindent \hbox to \parindent{|PX|\hfil}\null
Dimensions are assumed to be in terms of paper pixels.

\vfil\eject
\leftline{MOVING THE WINDOW.}
\bigskip

\noindent
The window region can be moved to any position over the current page.
You will be told if the window moves entirely outside the page rectangle
defined by $minh$, $minv$, $maxh$ and $maxv$.  If this does happen, movement
is restricted to {\it just outside\/} the edges to make it easier to get back
over the page using only the |U|, |D|, |L| and |R| commands.
Note that the location of the window is automatically set every time a
page is selected.  This position will normally be
the top left corner of the paper; i.e., $(-1,-1)$ in inches.
The parameters $h$ and $v$ are dimensions ranging from $-480$ inches to
$+480$ inches (for those of you \TeX ing billboards).

\bigskip
\noindent |W| $h$|,|$v$
\item{}
Move the Window region's top left corner to the given paper position.
$h$ is the horizontal coordinate, $v$ is the vertical coordinate.
If $h$ and $v$ are absent then the window is moved to $(minh{,}minv)$,
the top left corner of the page rectangle.

\bigskip
\noindent |U| $v$
\item{}
Move the window Up $v$ units.
If $v$ is absent then move up an amount equal to the window's current height.

\bigskip
\noindent |D| $v$
\item{}
Move the window Down $v$ units.
If $v$ is absent then move down an amount equal to the window's current height.

\bigskip
\noindent |L| $h$
\item{}
Move the window Left $h$ units.
If $h$ is absent then move left an amount equal to the window's current width.

\bigskip
\noindent |R| $h$
\item{}
Move the window Right $h$ units.
If $h$ is absent then move right an amount equal to the window's current width.

\medskip
\bigskip
\leftline{CHANGING THE SIZE OF THE WINDOW.}
\bigskip

\noindent
The |H| and |V| commands are used to change the
width and height of the window region.
It is up to you to maintain a sensible aspect ratio.
The location of the window will not change unless the page becomes invisible.
Note that the width and height of the window are automatically set every time a
page is selected; the values chosen will depend on the paper dimensions.
The parameters $wd$ and $ht$ are dimensions ranging from 1 pixel to 480 inches.

\bigskip
\noindent |H| $wd$
\item{}
Set the Horizontal size of the window to the given width.
If $wd$ is absent then set window width to its initial, unscaled value.

\bigskip
\noindent |V| $ht$
\item{}
Set the Vertical size of the window to the given height.
If $ht$ is absent then set window height to its initial, unscaled value.

\vfil\eject

\subhead{An illustration.}

% MACROS FOR DIAGRAM.
% \plot is based on \point macro described on page 389 of TeXbook.

\newdimen\unit
\unit=1truein

\def\plot            % #1 is down, #2 is right, #3 is stuff to plot
       #1 #2 #3\endplot
   {\rlap{\kern#2\unit
    \vbox to 0pt{\parindent=0pt\offinterlineskip\kern#1\unit#3}}}

\newdimen\pix
\pix=.003truein   % SYSDEP: .003" is approx 1 pixel for a 300dpi device

\def\bigdot{\hbox to 0pt{\hss\kern3\pix$\scriptstyle\bullet$\hss}}
\def\dot{\chlap{$\cdot$}}

\def\ulap#1{\vbox to 0pt{\vss#1}}      % vertical analog of \llap
\def\dlap#1{\vbox to 0pt{#1\vss}}      % vertical analog of \rlap

\def\cvlap#1{\vbox to 0pt{\vss#1\vss}} % centre vertically
\def\chlap#1{\hbox to 0pt{\hss#1\hss}} % centre horizontally

\def\vleaders{\leaders\vbox to .1\unit
                         {\vss\hrule width1sp height.05\unit\vss}\vfil}
\def\hleaders{\leaders\hbox to .1\unit
                         {\hss\vrule height1sp width.05\unit\hss}\hfil}

\def\cornervrule{\hbox{\vrule width1sp height.075\unit}}
\def\cornerhrule{\vrule width.075\unit height1sp}

\newdimen\paperwd  \paperwd  =\hsize
\newdimen\paperht  \paperht  =8.0\unit
\newdimen\pagewd   \pagewd   =3.0\unit
\newdimen\pageht   \pageht   =4.0\unit
\newdimen\windowwd \windowwd =2.5\unit
\newdimen\windowht \windowht =2.6\unit

\def\draworiginbox
   {\plot 0 0
       \cvlap{\bigdot}
       \ulap{\vbox to 1\unit
                {\kern.25truemm
                 \leaders\vbox to 1truemm{\vss\moveright1\pix\dot\vss}\vfil
                 \kern.75truemm
                }
            }
       \cvlap{\kern2\pix                 % shift dots down slightly
              \llap{\hbox to 1\unit
                       {\kern.25truemm
                        \leaders\hbox to 1truemm{\hss\dot\hss}\hfil
                        \kern.75truemm
                        }}
             }
       \ulap{\vbox to 1\unit
                {\vfil
                 \rlap{~~\rlap{$1''$}~~~~~~The number of pixels per inch
                                           is set by |-r| option.}
                 \vfil
                }
            }
       \ulap{\llap{$(0{,}0)$~~}
             \medskip
            }
       \cvlap{\rlap{~~\rlap{$\rightarrow$}~~~~~~increasing $h$ coordinates}}
       \dlap{\kern 1ex
             \llap{\strut \hbox to 1\unit{\hfil$1''$\hfil}}
            }
       \dlap{\kern 1ex
             \chlap{\strut $\downarrow$}
             \chlap{\strut increasing}
             \chlap{\strut $v$ coordinates}
            }
    \endplot
   }

\def\drawpaperbox
   {\plot -1 -1                   % top left corner of paper box
       \vbox
          {\hsize=\paperwd        % width of paper box
           \ulap
              {\line{\rlap{$(-1,-1)$ in inches}\hss
                     Paper edges will be displayed if visible.\hss}
               \medskip
              }
           \cvlap{\bigdot}
           \hrule height 1sp
           \hbox to \hsize
              {\vrule height \paperht width 1sp   % height of paper box
               \vbox to \paperht
                  {\vfil
                   \rlap{ \strut Paper height is set}
                   \rlap{ \strut by |-y| option.}
                   \vfil
                  }\hfil
               \vrule height \paperht width 1sp
              }
           \hrule height 1sp
           \medskip
           \centerline{Paper width is set by |-x| option.}
          }
       \vss
    \endplot
   }

\def\drawpagebox
   {\plot 2.2 0.6                 % top left corner of page box
       \vbox
          {\hsize=\pagewd         % width of page box
           \cvlap{\llap{Page at $(minh{,}minv)$~~}}
           \cvlap{\bigdot}
           \cvlap{\rlap{\hbox to \pagewd
                           {\cornerhrule\hleaders\cornerhrule}}}
           \dlap{\vbox to \pageht
                    {\centerline{\title Chapter 56}
                     \vskip1.175\unit
                     {\advance\hsize by 6\pix  % get N touching maxh
                      \line{\title How\hfil to\hfil LOGIN}
                     }
                     \vfil
                     \setbox0=\hbox{\bigbf g}
                     \setbox1=\copy0
                     \dp0=0sp
                     \centerline
                        {\bigbf HAL\thinspace9000 Be\copy0inner's Guide}
                     \kern\dp1            % get g touching maxv
                    }
                }
           \hbox to \hsize
              {\vbox to \pageht           % height of page box
                  {\cornervrule\vleaders\cornervrule}%
               \vbox to \pageht
                  {\vfil
                   \llap{Page height. }
                   \vfil
                  }%
               \hfil
               \vbox to \pageht
                  {\cornervrule\vleaders\cornervrule}%
              }
           \cvlap{\rlap{\hbox to \pagewd
                           {\cornerhrule\hleaders\cornerhrule}}}
           \cvlap{\rightline{\bigdot}}
           \cvlap{\rightline{\rlap{~~$(maxh{,}maxv)$}}}
           \medskip
           \centerline{Page width.}
          }
       \vss
    \endplot
   }

\def\drawwindowbox
   {\plot 1.2  1.6                % top left corner of window box
       \vbox
          {\hsize=\windowwd       % width of window box
           \ulap
              {\centerline{Window width is set by |H| command.}
               \medskip
              }
           \cvlap{\llap{Window at $(h{,}v)$~~}}
           \cvlap{\bigdot}
           \cvlap{\rlap{\hbox to \windowwd
                           {\cornerhrule\hleaders\cornerhrule}}}
           \dlap{\medskip
                 \centerline{\strut Use |U|, |D|, |L|, |R| and |W| commands}
                 \centerline{\strut to move the window.}
                }
           \dlap{\kern1\unit
                 \vbox to 1.6\unit
                    {\hsize=2\unit
                     \vfil
                     \centerline{\strut Only this portion of the}
                     \centerline{\strut page is currently visible.}
                     \vfil
                    }
                }
           \hbox to \hsize
              {\vbox to \windowht                     % height of window box
                  {\cornervrule\vleaders\cornervrule}%
               \hfil
               \vbox to \windowht
                  {\cornervrule\vleaders\cornervrule}%
               \vbox to \windowht
                  {\vfil
                   \rlap{ \strut Window height is}
                   \rlap{ \strut set by |V| command.}
                   \vfil
                  }\relax
              }
           \cvlap{\rlap{\hbox to \windowwd
                           {\cornerhrule\hleaders\cornerhrule}}}
          }
       \vss
    \endplot
   }

% SWITCH TO SMALLER FONT, MOVE TO 0,0 AND START PLOTTING.

\smallrm

\vskip 1.5\unit
\hbox
   {\kern 1\unit      % 0,0 is 1\unit in from left margin
    \draworiginbox
    \drawpaperbox
    \drawpagebox
    \drawwindowbox
   }

\rm                   % back to normal text

\vfil\eject

\subhead{Some examples.}

\medskip
\noindent
For clarity, commands are separated by spaces and typed
in upper case; neither condition is mandatory.

\bigskip\noindent
|< N N N|
\item{}
If these commands are given before a page has been requested, they will select
the 3rd last page for display (assuming there are at least 3 pages).
|<|~tells {\DVItoVDU} to select pages in reverse order;
the following |N| selects the last page;
the remaining |N|s go back another 2 pages.
Note that only the 3rd last page will be displayed.  The intervening pages are
still processed though, and you'll be warned about any problems with them
(such as a page off the paper).

\bigskip\noindent
|1 F W H V|
\item{}
This command sequence is very useful for looking carefully at the results of
a small \TeX\ experiment.  You might, for instance, want to look closely
at the appearance of two characters separated by a small |\kern|.
|1|~selects the first DVI page (usually the only page in such experiments);
|F|~sets the display mode to full;
|W|~moves the window to the top left corner of the page;
|H|~sets the horizontal size of the window to its unscaled value and
|V|~sets the vertical size of the window to its unscaled value.
Remember that this unscaled window size produces the most accurate display,
since each screen pixel corresponds to exactly one paper pixel.

\bigskip\noindent
|R9999 L D9999 U|
\item{}
Sometimes you want to move quickly to the right edge of the page to have a
look at line breaks, or you might want to go to the bottom and look at where
the page was broken.
This particular command sequence will move the window's {\it bottom right\/}
corner to the bottom right corner of the current page; i.e., $(maxh{,}maxv)$.
|R9999|~moves the entire window to the right of the page, but only just;
|L|~then moves the window left by its current width so that the {\it right\/}
edges of the window and the page coincide;
|D9999|~moves the entire window below the page, but only just;
|U|~then moves the window up by its current height so that the {\it bottom\/}
edges of the window and page also coincide.

% SYSDEP: other sites might have a different default paper size
\bigskip\noindent
|IN W-1,-1 V12 H16 T|
\item{}
It is often useful to get an overview of the positioning of the page within
the entire paper.  These commands will do just that on all the VDUs currently
implemented, assuming the default A4 paper size.   % SYSDEP
(The |S| command shows the paper dimensions if you can't remember them.)
|IN|~sets the current units to inches just in case they were something else;
|W-1,-1|~moves the window to the top left corner of the paper (recall that
$(0{,}0)$ is one inch in from the top and left paper edges);
|V12|~sets the window height to slightly more than the default paper height;
|H16|~sets the window width to a value that will ensure the paper shape
has roughly the right proportions (most VDUs have screens with widths
greater than their heights);
|T|~sets the display mode to terse since you're probably not concerned with
finer details when looking at the entire paper.

\bigskip\noindent
|[.56] W IN H2.5 V2.6 R1 U1 F|
\item{}
This is the likely command sequence that led to the window display shown in the
illustration on the previous page.  % XREF
The author has been clever enough to define
a |\chapter| macro that sets |\count1| to the given chapter number.
|[.56]|~will thus select the appropriate DVI page (|\count0| is ignored);
|W|~moves the window to the top left corner of the page;
|IN|~sets the current units to inches;
|H2.5|~and |V2.6|~set the window dimensions;
|R1|~moves the window right 1 inch;
|U1|~moves the window up 1 inch;
|F|~sets the display mode to full.

\finishline
\bye