A sample DVI file for dviout

Toshio OSHIMA

December 18, 2005

Contents

1 Preview by dviout for windows  3

1.1 A TEX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Preview window . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Using keys and a mouse . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Search a string . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.5 Using Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Specials 5 2.1 HyperTEX specials . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 tpic specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 color specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.4 Graphic specials . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.5 dviout specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.6 source specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7 Other specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.8 Ignore specials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.9 A sample of dviout special . . . . . . . . . . . . . . . . . . . . . . 18

3 Presentation 19 3.1 Presentation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 Region to be shown . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.3 Draw lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.4 Seamless scroll . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.5 Cover sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.7 Display control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.8 Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4 Embedding and Packing 25 4.1 tar and gzip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.2 Embedding into a DVI file . . . . . . . . . . . . . . . . . . . . . . 25 4.3 Font/Image Embedding . . . . . . . . . . . . . . . . . . . . . . . 25 4.4 special path to files . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5 Output by dviout for Windows  26

5.1 Output to a printer . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.2 Output to a graphic image file . . . . . . . . . . . . . . . . . . . 27 5.3 Transformation into a PDF file . . . . . . . . . . . . . . . . . . . 27 5.4 Transformation into a readable text . . . . . . . . . . . . . . . . 28 5.5 Output informations . . . . . . . . . . . . . . . . . . . . . . . . . 28

6 Will be continued… 28

1 Preview by dviout for windows

1.1 A TEX system

Personal computers with a current OS^{1} are now so powerful that TEX works in the OS similarly as in other OS, such as UNIX, without any special invention.

It is recommended to use a TEX system supporting mktexpk^{2} with a standard directory configuration. Then the environment variable TEXMF indicates the location of the TEX system. Such a system for Windows95/98/NT can be obtained from here^{3}, which supports pTEX^{4} and source specials together with a usual TEX.

1.2 Preview window

• Select [D̄isplay → S̄ize → M̄agnify/R̄educe] on the menu bar located at the top part in the preview window or the tool button or to change the scale for the display of a page.

• The contrast of the preview window can be adjusted by selecting [D̄isplay →C̄ontrast → B̄lacker/W̄hiter]. More precise setting can be done by

[Ōption → S̄etup Parameters. . . or  → Display] and moreover the

current setting is kept by pushing the button [S̄ave].

• Check [V̄iew → T̄ool Bar, S̄tatus Bar, P̄age Slider, Scr̄oll Bar]

to hide or recover the bars on the preview window.

• Click [V̄iew → Glid̄ → Ōn] to display a grid.

• Select [V̄iew → C̄hange Tool Buttons, Show Move B̄utton] to change

some buttons on the tool bar.

• One can define any functions on some of tool buttons such as or keys

by [Ōption → S̄etup Parameters. . . or  → Key]. By [H̄elp → K̄ey

table] the current definition is shown in Information Window. The height of the Window can be changed by [V̄iew → Īnformation Window].

1Operating system, Windows95/98/NT/2000 are for dviout for Windows 2A utility to make fonts by METAFONT.

3Click the colored part (which is blue with an underline in default) by the left button on the mouse to access:

http://jupiter.fsci.fuk.kindai.ac.jp/~kakuto/win32-ptex/index-e.html 4pTEX, a Japanized TEX developed by ASCII corp. Another popular Japanized TEX is called NTTJTEX, which is also supported by dviout.

1.3 Using keys and a mouse

• The arrow keys and [Home], [End] and scroll bars are used to scroll the preview window within a page.

• To scroll pages, one can use the keys [PageUp], [PageDown], [N], [P], [Space], [BackSpace] etc. or the menu in [J̄ump] on the menu bar or the page slider on the right side of the window or the buttons and

. The buttons to move pages can be hidden by [V̄iew → Show Move

B̄utton].

• In the page window on the tool bar or after pushing the key [/] in the default key setting, one can jump to any page by the input of the page number. If [+] or [-] is given preceding the number, the page is counted relatively from the current page. If [.] is given preceding the number, the page is counted from the last. If [Shift] or [Ctrl] is pressed when [Enter] is hit to execute, the nombre page is specified. For example, input [/][.][Enter] means to jump to the last page.

• Click the right button on the mouse. Then a loupe will appear. Move the mouse while pressing the right button to move the loupe. The loupe can be modified by [D̄isplay → L̄oupe] on the menu bar at the top of the preview window of dviout. More precise setting is possible

by [Ōption → S̄etup Parameters. . . or  → Common].

If [Ctrl] key is also pressed, a different kind of loupe will appear.

• When the mouse cursor is of the shape of a hand, move the mouse while pressing the left button to scroll in a page. If the shape of mouse cursor is an arrow, select [D̄isplay → Mouse sh̄ape] or to change it.

• Click the left button on the mouse while [Shift] key is pressed to acquire the character string under the mouse pointer for copying to clipboard. Then more strings are picked up by pressing [Ādd] or [F̄ull] button.

• Click an arrow button while both [Shift] key and [Ctrl] key are pressed, then the displayed area in a sheet is slightly adjusted.

• Click the left button on the mouse while both [Shift] key and [Ctrl] key are pressed, then the information of the pointed position and the character is displayed.

• In displaying 4 or 16 pages in a reduced size ([D̄isplay → cros̄s pages/1¯6 pages]), the pointed page will be displayed in a normal size by clicking the right button on the mouse.

• Turn the central wheel of IntelliMouse to scroll up/down. Press the wheel or [Shift] key at the same time to move to another page. Press the [Ctrl] key with the turn to magnify/reduce a page. Click the side buttons of IntelliMouse Explorer for Backward/Forward History.

1.4 Search a string

One can search a string in the DVI file by [S̄earch] on menu bar. For example,

1. Move the mouse cursor on the string of the next line:

          tpic

2. Click the left button of the mouse while pressing the [Shift] key. If the string “tpic” is picked up, press [Cop̄y] in the window appeared.

3. Select [S̄earch → F̄ind] on the menu bar or the tool button and paste the string to set it as the target string by clicking the right button on the mouse.

4. Choose downward search, press a button to search it and close the dialog window.

  5. Select [S̄earch → Ūpward/D̄ownward] or [F3]/[Shift]+[F3] or the tool

buttons , for the further search.

One may directly paste, write or choose the target string on the search window on the tool bar.

Indicating a string following after one space character, one can search the location in the current DVI file by HyperTEX or source specials.

1.5 Using Help

One can find more information from [H̄elp → H̄elp Topics] and [H̄elp → T̄ips on dviout] on the menu bar. If you have a question in using dviout, you may find an answer from [Q&A] in this Help Topics.

If Japanese language is supported by Windows, the selection [H̄elp → Use Ēnglish Help] is the toggle switch between Help in English and that in Japanese.

Through [Ōption → S̄etup Parameters…] or the tool button , a precise setting for dviout can be done. If you change the setting, you should push [OK] to validate it in the current session. If you want to validate it for the following sessions, push [S̄ave] before [OK].

It may be difficult for you to do such setting but use [Help] on each property sheet or click the button [?] and then push the left button on the mouse pointing the spot where you want to have the explanation.

2 Specials

2.1 HyperTEX specials

Please click by the left button on the mouse at the colored part of the following lines. Also note the change of the cursor and the Status Bar.

What is the version number of dviout for MS-DOS from which dviout for Windows was created and what is the date when this document was written?

2.33  2.43.1  2.43.2  2.43.3  2.43.4

Using myhyper.sty in the package of dviout, the result of following TEX source

If you click \href{#foo}{here}, you will jump to \name{foo}{this}
place.

is “If you click here, you will jump to this place”, which corresponds to

If you click <a href="#foo">here</a>, you will jump to
<a name="foo">this</a> place.

in HTML(Hyper Text Markup Language).

In myhyper.sty, these macros are defined as follows:

\def\href{\leavevmode\begingroup \@sanitize \@href}
\def\@href#1{\special{html:<a href="#1">}\endgroup \@@href}
\def\@@href#1{#1\special{html:</a>}}
\def\name{\leavevmode\begingroup \@sanitize \@name}
\def\@name#1{\special{html:<a name="#1">}\endgroup \@@name}
\def\@@name#1{#1\special{html:</a>}}

Then the result of

The current information on {\tt dviout} can be obtained from
\href{http://akagi.ms.u-tokyo.ac.jp/ftp.html#TeX}{here}.

is “The current information on dviout can be obtained from here^{5}”. Similarly

{\tt dviout} can be obtained from
\href{ftp://akagi.ms.u-tokyo.ac.jp/pub/TeX/dviout/}{here}.

becomes “dviout can be obtained from here”. One can even write as

\href{file:notepad.exe}{Execute Notepad} or
\href{file:dviout.doc}{dviout.doc}

and then “Execute Notepad or dviout.doc”. Here dviout.doc is embedded in this DVI file.

dviout specials can be written in place of URL of HyperTEX by

\href{dviout:.....}{...}

so that the click of the corresponding spot implies desired operations of dviout.

5http://akagi.ms.u-tokyo.ac.jp/ftp.html#TeX

2.2 tpic specials

documenttpic  TEX dvi drivertpic printer

The figure is taken from the document on tpic specials written by Oh-Yeah?.

Some information on tpic specials with original extensions for dviout may be obtained from [Help] on the menu bar of the preview window of dviout.

tpic specials can be used combining together with color specials.

2.3 color specials

Using graphics package of L^{A}TEX 2ε by indicating

\usepackage{graphicx, color}

at the head of the source file of L^{A}TEX, one can easily write the colored text:

rotate 15 degree,  rotate 180 degree , Low, High , High,  reflect : reflect, I+V=IV,

Red, Green, Blue, Magenta, Brown, Gray, White , etc. See 68 colors

The source text for the above is as follows:

\rotatebox{15}{rotate 15 degree},
\rotatebox[origin=c]{180}{rotate 180 degree},
\scalebox{1}[.5]{Low},
\rotatebox[origin=c]{-15}{\scalebox{1}[2]{High}},
\scalebox{1}[2]{\rotatebox[origin=c]{-15}{High}},
\reflectbox{reflect} : reflect,
\scalebox{.46}[1]{I}+\scalebox{.64}[1]{V}=%
\scalebox{.46}[1]{I}\hskip-.5pt\scalebox{.64}[1]{V},
{\color{red}Red}, {\color{green}Green}, {\color{blue}Blue},
\rotatebox[origin=c]{30}{\color{magenta}Magenta},
\textcolor[rgb]{0.8,0.4,0.2}{Blown}, \textcolor[gray]{0.5}{Gray},
\colorbox{black}{\color{white}White},
\rotatebox{15}{\fcolorbox{red}{yellow}{etc.}}

2.4 Graphic specials

dviout can read BMP/BMC/PBM/WMF/EMF files.

The following figure is taken from tool buttons of dviout for Windows. To include the figure, we may write in the text as follows.

\special{bmpfile=toolbar vsize=4.95mm}

A sample figure using a WMF file

is included by

\special{bmpfile=sample.wmf vsize=3cm hsize=10cm}

Under the graphics package of L^{A}TEX 2ε with dviout.def^{6} , these can be written as

\includegraphics*[height=4.95mm]{toolbar.bmp}
\includegraphics*[height=3cm,width=10cm]{sample.wmf}

• If Ghostscript is installed and the parameter [gsx:] in [Ōption → S̄etup Parameters… or → Graphic] is correctly set, click here to preview a DVI file including graphics in EPSF(Encapsilated PostScript).

• In the case when Ghostscript is used for EPSF, one can indicate the format of an intermediate graphic file which determines the number of colors to be used. To do so, select [Ōption → S̄etup Parameters… or

    → Graphic → GIF:] and choose, for example, [BMP(256 colors)].

• dviout for Windows can understand the DVI file which is specially made for dvips using dvips.def under graphics package of L^{A}TEX 2ε or using \psflag or \epsflag, except for the rotation of a colored figure by a non-integer multiple of 90 degree.

• PSfrag is supported if the files ps2frag.ps in the PSfrag package (Version 2) and psfrag.pro exist in the search path of Ghostscript defined by the environment variable GS_LIB.

6contained in the package of dviout and having a strong compatibility with dvips.def. To use it, put dviout.def, graphics.cfg and color.cfg in texmf\tex\latex\config if it exists and otherwise in the directory where the graphics package of L^{A}TEX 2ε exists.

• graphic files may be gzipped if gzip works in the system. Then the following is possible under graphicx.sty.

\includegrphuics*[height=5cm,width=4cm]{images/fig.ps.gz}

Here the character / represents the separator of directories and the location of the graphic file is relative to the DVI file.

• If Susie plug-in's are installed, dviout can read figures in various formats such as jpeg/tiff/png etc. In this case, the directory where Susie

plug-in's exist should be set in [Ōption → S̄etup parameters. . . or

→Graphic → spi:] in the short format. Then, for example, the following is valid.

\special{bmpfile=foo.jpg vsize=4cm}

• dviout.def should be used if figures not in the format of EPSF are included under the graphics package of L^{A}TEX 2ε. In this case, you can use bmc in the package of dviout to get the BoundingBox:

bmc -b foo.jpg

Windows GUI interface for bmc is available from here.

• BMC is an original format used by dviout, which is made by a simple compression from the BMP format.

If a file foo.bmp of BMP format is not found, dviout automatically searches foo.bmc of BMC format.

After creating an intermediate graphic file of BMP format by Ghostscript, dviout changes it in BMC format to keep it.

The program bmc can transform one format to the other.

• The graphic files which are used in a DVI file can be embedded in the DVI file by using dviadd. For example, the command

dviadd foo1.bmc foo2.ps foo3.jpg foo
implies to embed foo1.bmc, foo2.ps and foo3.jpg into foo.dvi. Then

dviout can read them. Note that other DVI wares cannot read the embedded files but just ignore them.

• If a DVI file is packed (and gzipped) in a UNIX tar format with graphic files, then dviout can directly read the packed file and recognize all files.

• dviout supports the following graphic special used by emTEX and MykTEX:

\special{em: <file>,<width>,<height>}

2.5 dviout specials

dviout specials are invented to control dviout, such as to change parameters of dviout or to simulate key operations. In general, they have the format

\special{dviout <macro>}

The dviout specials are only valid in the usual previewing and not valid in printing nor in displaying 4 pages at a time etc. The current dviout has the following dviout specials.

• <macro> is the parameter setting or the key input or their combination, which is the same format as in the key macro of dviout. If the key input changes the display, it should sometimes be written in small letters and then it is reserved to be executed after the interpretation of the page and the other dviout specials.

For example

\special{dviout -y=A5L df}

implies to change the size of the paper into A5 style in the landscape mode and display it to fit [D̄isplay → Siz̄e → F̄it] the preview window.

One can get the list of the functions of the key inputs and parameters by [H̄elp → K̄ey table, P̄rameters]. The two letters corresponding to the key input are indicated by surrounding by [ and ] in the list.

• If \special{dviout `wait} and then another dviout special follow after \special{dviout <macro>}, they can be combined one dviout special separated by the character ;. For example,

\special{dviout -y=A4P !AN2N5!p;!bdf}

or

\special{dviout -y=A4P !AN2N5!p ; !bdf}

is equivalent to

\special{dviout -y=A4P !AN2N5!p}
\special{dviout `wait}
\special{dviout !bdf}

Other dviout specials are of the form

\special{dviout `<key> <parameter>}
Here <key> is timer, wait, href, keep, restore, message, ask, sp or initialize.

• timer, wait: The dviout special

\special{dviout `timer <number>}

means to wait <number>/1000 seconds to execute the following dviout specials. If the user changes the page of the DVI file in preview, under waiting this timer, it means that the timer and the following dviout specials, which may be written after <number> separated by a space, are cancelled. If <number> is 0, then the successive dviout specials will be interpreted after the former dviout specials will have been completed.

\special{dviout `wait} is equal to \special{dviout `timer 0}.

• href: The dviout special

\special{dviout `href [parameter]}

is to simulate the HyperTEX special

\special{html:<a href="[parameter]">}

One can jump to other DVI file or execute a program by this special. For example

\special{dviout `href file:foo.mid}
\special{dviout `timer 180000 je}

means to play foo.mid, which may be included in the DVI file, and to jump to the next page after 3 minutes.

• keep, restore: The current values of parameters can be reserved by

\special{dviout `keep <parameter list>}

For example,

\special{dviout `keep cmode y}

They are automatically recovered if the DVI file currently displayed is changed to another DVI file. They can be also recovered by

\special{dviout `restore}

The values have been kept and another \special{dviout `keep ...} is ignored until they are recovered.

• +<levels>: Control dislay according to <levels> hereafter in this page. Here <levels> is a set of certain non-negative integers attached to every part of a DVI file. If the level of the current diplay is not contained in <levels> of a part, the part is not displayed. The level of a display starts from 0 and it inceases by clicking [Space] key. If the level goes beyond the maximal level defined in the page, the following page is displayed with the level 0. Hence this special is useful for Presentation with the following <levels>.

<num1>-<num2> : From <num1> to <num2>. 2-4 means 2,3,4.

<num>- : The integers larger than or equals to <num>.

2- means 2,3,…

-<num> : The integers from 0 to <num>. -2 means 0,1,2.

- : All integers, which is the default <levels>. m : The maximal integer already appeared in this page. mm : (The above integer) −1. mm⋯m : (The above integer) −n + 1 for n succesive m. M : (The above integer) +1. MM : (The above integer) +2. MM⋯M : (The above integer) +n for n succesive M. -2,4-5,7,9- : 0,1,2,4,5,7,9,10,11,… 1,M- : 1,(the above integer)+1,(the above integer)+2,…

If the contents of a page of a TEX file is

  part1
  \special{dviout `+M-}
  part2
  \special{dviout `+M-}
  part3

then only part1 is first displayed. Then if [Space] is clicked, part2 is also displayed and the successive click of [Space] implies that the whole contents are displayed and then the following page is displayed. In this example, the first \special{dviout `+M-} equals to

\special{dviout `+1-} and the second to \special{dviout `+2-}. This

corressponds to the example using pause special but they do not exacltly lead the same result.

  I am a \special{dviout `+0}dog.%
  \llap{\special{dviout `+1-}cat.}\special{dviout `+0-}
  You are ...

implies that the sentence “I am a dog. You are...” is first displayed and it changes into “I am a cat. You are ...” by clicking [Space]. Try a sample using ths special.

• input, in, in*: <string> is copied to the clipboard by

\special{dviout `input <string>}

If in is used in place of input, the following replacement of <string> is performed:

A space followed by two hexa-decimal characters in <string> is replaced by one character with the corresponding code. If the top character of the string is ‘.’ followed by two hexadecimal characters, they are replaced one character in the same way. The top two characters of the string are ‘..’, they are replaced by ‘.’.

If in* is used in place of in, <string> is not displayed in the preview window.

These dviout specials usually used with HyperTEX specials as follows.

\special{html:<a href="dviout:`input \string\alpha">}$\alpha$
\special{html:</a>}

When a TEX file is edited, it is helpful to use [H̄elp → Help TeX̄] because by clicking the displayed string on the screen the corresponding key word for TEX is copied to the clipboard, which will be pasted in an editor.

Please try this [ α ] as in the following.

- If [ALT] is pressed under the click, the key word is appended to the clipboard.

- If [CTRL] is pressed under the click, the key word is copied to an editor and the clipboard. The editor is determined at this first click.

- If [CTRL]+[ALT] are pressed under the click, the key word is copied to a new editor and the clipboard.

This is an application of this dviout special and it is easily extended since the source file of this Help is in the package of dviout.

• sp: TEX special <special> is performed by

\special{dviout `sp <special>}

• initialize: <macro> is performed when dviout starts to preview the DVI file. This is valid even if dviout does not start from the top page of the DVI file. If the option word page is indicated after initialize, <macro> is performed at the top of the each page.

This special \special{dviout `initialize <macro>} should be put at

the top of a DVI file. For example,

\AtBeginDvi{\special{dviout `initialize -y=A4L}}

One can execute this again in any page by indicating

\special{dviout `initialize}

there. One can also write as follows at the beginning of a TeX file

\AtBeginDvi{\special{dviout `initialize page `sp background
Yellow}}

This special also allows to add a path to the original setting of -TEXPK: -TEXFONTS: -TEXKNJ or -gdat, which is indicated by replacing - by +. For example,

\AtBeginDvi{\special{dviout `initialize `keep TEXPK}}
\AtBeginDvi{\special{dviout `initialize +TEXPK=^F/^s.pk;}}

The delimiter ; should be put at the top or the end of the value of the parameter. The former means that the indicated value is appended at the end of the original value and the latter means that it is inserted at the top of the original value. Here ^F means embedded files in a DVI file.

• message: <MESSAGE> is displayed in the information Window by

\special{dviout `message <MESSAGE>}

<MESSAGE> can be a block surrounded by `' and '`. Then the block can be divided into lines by the separator `'. If the block divided into more than one line, the first line becomes the title and the other lines are the content. For example

\special{dviout `message `'Remark`'This page is written:
`'Jan 1, 2000'`}

• ask: <MESSAGE> is displayed in a dialog requiring the answer Yes or No and execute dviout specials depending the answer.

\href{dviout:`ask `'Style`'Landscape?'` `yes -y=A4L df
`no -y=A4P df}{Choose style}

If the answer is Yes, the dviout specials after `yes are executed if `yes exists. It will be terminated at `no if `no exists. The same result holds by exchanging Yes and No.

• `"....."`: If dviout specials except `time are surrounded by `" and "`, they forms one block. One can continue to write successive dviout specials and makes one \special. For example, under myhyper.sty

\href{dviout: `"href file:foo.mid"` -y=A4L `href:foo.dvi}
{jump to foo}

• HyperTEX: dviout specials can be used by HyperTEX. For example, under

myhyper.sty
\href{dviout:-y=A5L `href foo.dvi}{Jump to foo}.

2.6 source specials

source specials are supported by MikTeX & yap which is a popular TEX system in MS Windows. There is also a pTEX system for Japanese language supporting them. The specials with dviout enable us to jump forward/backward between preview screen and an editor for the TEX file. dviout with the attached utility srctex also supports the specials.

source specials are embedded in a DVI file which tell the line number and the file name corresponding to the position in the DVI file.

• If the TEX compiler supports source specials, they are embedded in a DVI file by, for example,

latex -src foo

• It is recommended to use the compiler supporting source specials. But even if the TEX compiler does not support them, one can embed them in the DVI file by

srctex latex foo

In this case, if the environment variable TEXEDIT is set for the errors in the compilation, for example,

TEXEDIT=mule +%d %s

then it is better to change it to use convedit by

TEXEDIT=convedit mule +%d %s

• The way to call an editor of TEX files should be set in the parameter -src:, for example,

-src=c:\Program Files\editor.exe^s+%d "%s"

Here ^s is the separator between the name of the editor and its command parameters. Moreover %s and %d are replaced by the source file and the corresponding line number. If the letter ‘<’ is inserted at the top of the name of the executable editor, dviout becomes icon when the editor is executed.

The environment variable TEXEDIT is used for this purpose if -src: is not set. Then one can jump from the preview screen to the editor by double clicking the left button on the mouse. It is also possible by clicking the left button on the mouse with [Shift] is pressed and selecting [→S̄rc]. One can also jump by clicking the same button with both [Shift] and [Ctrl] buttons are pressed. The former two methods are more accurate in the jump.

• By double clicking the left button on the mouse at the included graphic file, one can jump to the corresponding graphic editor. The way to call the editor according to the extension of the file is indicated by the parameter -gsrc: as in -src, for example

.ps.eps=c:\usr\local\bin\psedit.exe^s"%n";.bmp=mspaint^s"%s"

• If one wants to preview the DVI file corresponding to the the position around the 235-th line of the TEX file foo.tex, one can execute by

dviout foo.dvi "# 235 foo.tex"

One may even specified <string> around the line by

dviout foo.dvi "# 235/<string> foo.tex"

If one wants to execute it by the m-th dviout, add the parameter −m to indicate it. For example, execute the first dviout by

dviout -1 foo.dvi "# 235/<string> foo.tex"

To clearify the corresponding position in the preview window one can use the animation cursor by [V̄iew → Anim̄ation Cursor].

It is also possible and better to use a DDE command for this purpose. foo.tex may be replaced by * if the file name is not specified. The similar jump is also possible by the string search in dviout indicating two spaces ahead, such as, ‘¯ ¯ 235¯ *’. Here ‘¯ ’ denotes a space.

2.7 Other specials

• file=

The content ... of \special{...} is read from the file <filename>.

\special{file=<filename>}

• papersize=

This special is for the compatibility to dvips. It is translated into one of dviout specials. Namely

\special{papersize=<width>,<height>}
is translated into \special{dviout -y=F<width>:<height>}. If it is at

the top of a DVI file, it is always interpreted when dviout read the DVI file, that is, it is the same as

\special{dviout `initialize -y=F<width>:<height>}

For example, it is used as

\AtBeginDvi{\special{papersize=29.7cm,21cm}}

The size may be indicated by mm, cm, pt, bp or <dot>/<number>dpi. Moreover dviout allows the value of papersize to be any value of the parameter -y=. For example

\AtBeginDvi{\special{papersize=B5L}}
• pause

The pause special is used in the presentation mode.

2.8 Ignore specials

Specials can be ignored by dviout. It can be done by switches:

• The switch for HyperTEX is [J̄ump → Enable HyperJ̄ump] or the tool button .

• The switch for tpic specials is [Ōption → S̄etup Parameters… or

→ Graphics → tpic specials].

• The switch for color specials is [D̄isplay → C̄olor special].

• The switch for graphic specials is [D̄isplay → Graphīcs]. If the check is erased, the position of a figure is displayed by a frame. Specials can be ignored by dviout. It can be done by switches:

• The switch for dviout specials is [Ōption → dv̄iout specials]. If this is not checked, the dviout specials are ignored. Note that dviout specials are only valid in case of preview and are not valid in case of printing etc.

• The switch for pause special, which is used under Presentation Mode, is

[V̄iew → Cōver sheet].

• The switch for source specials is [Ōption → sourc̄e specials].

The following page is a sample using dviout specials.

Please wait 8 seconds!

2.9 A sample of dviout special

This page will be displayed in A5 landscape style. The following dviout specials are used in this page

\special{dviout `keep cmode}
\special{dviout -cmode=2 -y=A5L DV}
\special{dviout `timer 4000 DV}
\special{dviout `timer 4000 je}

and the dviout special

\special{dviout -y=A4P !w}

is in the former and next pages.

3 Presentation

dviout is useful for a presentation using a document written by TEX. It has several features for the purpose.

Under the Presentation Mode of dviout, the page of a DVI file is displayed in the full screen with no frame. The switch to/from the Presentation Mode is

[ESC] key.

3.1 Presentation Mode

One of the followings is indicated by [Presen̄tation → Presentation tȳpe]:

• general screen: general background and sheet (default)

• white screen: white background and sheet, black letters

• black screen: black background and sheet, white letters

• white background: white background

• black background: black background

Except under the default general screen, white screen or black screen,

the screen may flicker by the page jump or the usage of Loupe.

Under Presentation Mode, [D̄isplay → Siz̄e → F̄it, Ful̄l] ([5], [6]

key in default) will be performed exactly both by shrinking with gray scale and by shrinking/enlarging with -e: and -varf: In this case, the usage of the TrueType fonts may give better results in place of PK fonts.

The position of the page can be adjusted by [CTRL]+[SHIFT]+arrow key. Checking [D̄isplay → Ȳ-two pages], pages are vertically connected and

one can seamlessly scroll the whole document.

By a cover sheet, one can hide a part of a page and pause special can be used for this purpose.

One may also use dviout specials in HyperTEX specials.

• [ESC] : Normal mode ⇔ Presentation mode

• [5](default) : fit screen
• [6](default) : full screen
• [8](default) : 4 pages
• [9](default) : 16 pages
• [CTRL]+[SHIFT]+arrow key : move the page by 0.5 pt

3.2 Region to be shown

One can cut spaces around the edges of the sheets by [Presen̄tation → Cut ēdge] preceding to the above [Fit] or [Full]. The default margin is of the width of 16 pixel in the original document but it can be changed by [Ōption

→ S̄etup Parameters. . . → Paper → Cut Edge].
   For example, check [Presen̄tation → Cut ēdge] and [Presen̄tation →
Seamless HyperJ̄ump], push [ESC], use the above [Fit] or [Full] to enter

Presentation Mode. Moreover the usage of [D̄isplay → cros̄s pages, 1¯6 pages] ([8], [9] key in default) is useful.

One may use [D̄isplay → Reḡion → On̄] to indicate the region to be shown with [SHIFT]+left/right button on the mouse and cut it by [D̄isplay → Reḡion → C̄ut]. This is useful to cut off the page headers or footers.

To indicate the region to be shown it is much better in L^{A}TEX to use

\AtBegin{\speicial{papersize=...}}
and \paperwidth=, \paperheight=, \textwidth=, \textheight=, \hoffset=
and \voffset=.

3.3 Draw lines

In the presentation mode, one can draw lines or boxes by the mouse. They will be disappeared if the page changes. Using the seamless scroll, they will be kept for two pages.

   • [F12] Draw lines : On/Off
   • [SHIFT]+left button on Mouse : indicate the start point

• [SHIFT]+right button on Mouse : indicate the intermediate or end point and draw a line/box.

   • [CTRL]+[SHIFT]+left button on Mouse : change the last start point
   • [CTRL]+[SHIFT]+right button on Mouse : change the last end point

• [DELETE] : delete the last point

• [SHIFT]+[F5] : draw by red(default)

• [SHIFT]+[F6] : draw by black

   • [SHIFT]+[F7] : draw by blue

• [SHIFT]+[F8] : draw by green

• [F11] : draw lines mode(default)

• [SHIFT]+[F11] : draw boxes mode

3.4 Seamless scroll

If [D̄isplay → Ȳ-two pages] is checked, one can seamlessly and vertically scroll pages by the mouse or arrow keys as if all pages are vertically connected into one page. In this case [D̄isplay → Siz̄e → Ful̄l] is usually indicated.

The following is an example of the top part of such document. One can quit the presentation mode by pushing [ESC].

\documentclass{slides}
\AtBeginDvi{\special{dviout -dpi=180}}
\AtBeginDvi{\special{dviout -y=F1024dot/90dpi:2730dot/90dpi}}
\AtBeginDvi{\special{dviout !Ady!pdl;!b}}
\textwidth=11.2in  \textheight=30.5in
\hoffset=-.9in     \voffset=-1.6in
\pagestyle{empty}
...
\begin{document}
\maketitle\thispagestyle{empty}
...

In the above dviout specials !A, dy, !p, dl, ; and !b mean “display OFF”, “Y-two pages”, “presentation mode”, “Full screen”, “wait” and “display ON”, respectively.

3.5 Cover sheet

Checking [Presen̄tation → Cōver sheet → On, On for Pause] in Menu

Bar, one can hide a page under Presentation Mode. One of the following cover

type is indicated by [Presen̄tation → Cov̄er type]

• bottom: cover bottom

• right: cover right side

• left: cover left side

• bottom + right: cover bottom and right side

• bottom + left: cover bottom and left side

At first, the whole part of page is hidden by a cover sheet. The cover sheet can be moved by the mouse or by using pause special. If one moves to the former page, then the page has no cover sheet and the status of the original page is kept.

The following is an example of the top part of such document.

\documentclass{slides}
\def\pause{\special{pause}}
\AtBeginDvi{\special{dviout -y=XGAP !AN1N5NO!p;!bdf}}

\paperwidth=10.24in  \paperheight=7.68in
\textwidth=9.44in    \textheight=7in
\hoffset=-.62in      \voffset=-1.4in
...

1. Mouse

Under pressing the left button of Mouse, change the shape of the mouse cursor into the up-down/right-left arrow by clicking the right button of the mouse if necessary. If the whole page is in a screen, the clicking is unnecessary.

If the boundary of the cover sheet is in the screen, the cursor jumps to the position. Then moving the mouse under pressing the left button of the mouse implies the moving of the cover sheet. If releasing the left button of the mouse, the mouse cursor jumps to the original position.

If [Presen̄tation → Use M̄ouse Button → L̄eft (R̄ight)] is checked,

then the function of the left (right) button of the mouse in the Presentation Mode changes into the function of [Space] key.

2. pause special

If \special{pause} is written in the source text of TEX, the clicking [Space] key moves the cover sheet to the position where the special is written.

In particular, \special{pause 0} means to move the cover sheet to the place where no part of the page is hidden by it.

The click of [Space] key implies to move the cover sheet to the next position where \special{pause} is written. If there exists no \special{pause} after there in the page and there exists a part hidden by the cover sheet, the cover sheet will be removed.

On the other hand, if there exists no \special{pause} after there in the page and there exists no part hidden by the cover sheet, then the next page is shown. The cover sheet is at the first position indicated by the first \special{pause} in the next page or the whole page (resp. no part of the page) is hidden by the cover sheet if there exists no \special{pause} there under cover sheet On (resp. On for Pause).

See an example of the usage of pause special.

3. Function keys

Special functions are attached to the following keys under Presentation Mode. The functions can be attached to other keys.

• [F5] On : Use cover sheet

• [F6] Off : Don’t use cover sheet

• [F7] Suspend : Suspend to use cover sheet • [F8] Return : Return to the place where the original cover sheet

exists

• [F9] On for Pause : Similar as F5 but the cover sheet is initially at the position where no part of the page is hidden if no \special{pause} exists in the page.

By the above Suspend, the current place is recorded as “the place where the original cover sheet exists”

Under suspending to use cover sheet, if the place to display coincides with “the place where the original cover sheet exists”, then the cover sheet is again used and the suspension is stopped.

The above Return means to return to “the place where the original cover sheet exists” and to stop the suspension.

The above Off or jump by HyperTEX is done after performing the above

     Suspend.

Remark 3.2.1: Turning the pressed wheel of IntelliMouse means to move to another page. In this case, if the left mouse button is also pressed, then the movement to the next page can be done without suspending the cover sheet, that is the same result as clicking [Space] key.

Remark 3.2.2: Successive pushing of [Space] key for a DVI file without any \special{pause} under Presentation Mode with the cover sheet implies the following change of the preview:

a page hidden by the cover sheet → the page is displayed without the cover sheet → the next page is shown with (resp. without) covered by the cover sheet if On (resp. On for Pause) is set → …

3.6 Examples

For example, a TEX file for Presentation Mode using \special{pause} is as follows.

%  bottom cover sheet On for Pause
%  general screen, Presentation;
%  Screen: 1024 x 768, Reverse;
%  Fit
\special{dviout -cmode=2 !AN0N5NP!p; -e=0 -y=XGAP !v;!bdf}
\def\pause{\special{pause}}
...
\pause% the place to pause (top of a paragraph)
...
\pause% the place to pause (top of a paragraph)
...

In this case, if the corresponding DVI file is previewed from the first page, it is shown in Presentation Mode. The clicking of [Space] key moves the cover sheet to the position indicated by \special{pause}.

pause specials can be automatically inserted at the beginning of each paragraph by

srctex -n -S\special{pause} -onew.tex original.tex

One can indicate in TEX source so that, for example, the paper size equals 10.24 inch × 7.68 inch.

In the presentation it is better not to rewrite screen if possible. The dviout specials

\special{dviout `keep y}
\special{dviout -y=A4L !i}

set the paper size A4 landscape and rewrite the screen only if the size has changed. The combination of !A and !B can also be used for this purpose so that the drawing of the screen is stopped between the commands. In this case,

\special{dviout `timer 0} is usually put just before \special{dviout !b}.
In short, it will be \special{dviout !A...;!b...}.

If this sample of presentation is clicked, it is automatically displayed and performed without any key operation. It is written under slide class with the default fonts, the corresponding fonts (lcmss etc.) are necessary. Also for the task bar of Windows system at least one of the options “always display at the top” and “automatically hide” should be unchecked.

3.7 Display control

In place of pause special, the more complicated controls under clicking [Space] key are possible by using dviout specials (`+<level>). Try an example.

3.8 Menu

Menu will be appeared if the mouse cursor moves to the lower right corner of the screen. The fundamental buttons are follows.

     [>] same as [Space].

[<] go to the preceeding page.

[+] change Menu. [-] move Menu.

Many other buttons exist in the Menu which are usually not shown.

Menu can be moved. If it is at the upper left corner of the screen, it will not disappear.

4 Embedding and Packing

Some DVI files require graphic files to display it and some DVI files requires special font files or parameter files. One can pack a DVI file and these required files into one file which dviout can directly handle. There are two ways to do it. One is the use of the program tar and the other is the direct embedding of these files in the original DVI file. The file may also be compressed by gzip.

4.1 tar and gzip

For example, one can make an archived file foo.tar from foo.dvi, fo1.dvi,

foo.ps, fn.300pk, fn.vf and fn.map by
tar cvf foo.tar foo.dvi fo1.dvi foo.ps fn.300pk fn.vf fn.map

One may also compress it into foo.tar.gz by

gzip foo.tar

Then dviout can directly read foo.tar or foo.tar.gz. One may drag and drop the icon of foo.tar.gz to the window of dviout. Here gzip is necessary

for dviout to read foo.tar.gz.

Note that the graphic files included in a DVI file can also be compressed by gzip for the use of dviout.

4.2 Embedding into a DVI file

One can embed arbitrary files into a DVI file and dviout can read them. For example, by the command

dviadd foo.ps fn.300pk fn.vf fn.map foo.dvi
the files foo.ps, fn.300pk, fn.vf and fn.map are embedded into foo.dvi.

Then dviout can read these embedded files but other dviwares only ignore them. One may also compress graphic files by gzip to be embedded in a DVI file.

4.3 Font/Image Embedding

By [F̄ile → F̄ont/Image Embedding] in Menu Bar one can embed the necessary ingredients from font files and image data files used by the DVI file. For example, only the necessary glyph data in font files for characters appeared in the DVI file are automatically extracted and embedded in the DVI file. dviout can automatically recognize the embedded data.

One can also define there the initial setting for dviout when the DVI file is opened.

If all the necessary fonts are embedded, dviout can treat the DVI file without any font file. Data extracted from PK fonts can be embedded based on multiple resolutions. dviout uses them with the closest resolution by re-scaling them.

This function supports Image data files / Japanese and European TrueType fonts / Virtual fonts(vf/ovf) / tfm files / jfm files/ PK fonts / Font mapping data. Here some Japanese fonts are embedded:

日本語の Windows TrueType フォントや jfm ファイルを埋め込むことができます。ここでは、 GT フォントを埋め込んでいます。日本語フォントを埋めこむと、 dviout は非日本語 Windows の下でもその dvi ファイルを扱えます。

4.4 special path to files

The graphic files archived by tar with the DVI file or embedded by dviadd into the DVI file are automatically searched when the graphic specials require them.

dviout can use the archived or embedded parameter files and font files by indicating ^F\ or ^F/ at the top of their filenames. For example,

-TEXPK=^F\^s.^dpk;^T\pk\\^s.pk

and dviout requires cmr10 with the resolution 300dpi, then it first searches the

embedded file with the name cmr10.300pk. (See dviout special `initialize).

One may use the following symbols in the setting of the parameters of dviout to indicate the location of files.

^T The directory indicated by the environment variable TEXMFMAIN

     or TEXMF.

^x The directory where dviout locates.

^w Window’s system directory

^F The path to the archived or embedded files.

5 Output by dviout for Windows

dviout displays a DVI file in the preview Window and print it through the Windows printer driver as a usual dviware. Using the corresponding Windows printer driver, dviout can output the DVI file to FAX or translate it into a PS file or a PDF file etc. if one uses the corresponding printer driver.

5.1 Output to a printer

There exist several method to print a DVI file by dviout.

• Using Windows printer driver: This is the default method. ([Ōption

     → S̄etup Parameters. . . → Graphic → auto mode(p2)]. Here the set-

ting [patch2] means the usage of the same method for the preview.)

If the characters to be printed are supplied in TrueType fonts, they are rendered to the Windows printer driver through Windows API. The characters given by bitmap data such as PK format, the image data are put on the required position in the sheet through Windows API. Usually this method fits the Windows printers.

• Making a bitmapped data by dviout: This is the default method

for preview. (The setting [Ōption → S̄etup Parameters. . . → Graphic

→ auto mode(rep)] means the similar method for the output to the printer.)

dviout gets the image data of characters by Windows API or the font files in DISK, constructs a bitmapped image of a whole sheet and output it through Windows printer driver. This method fits the non-Windows printers such as PostScript printers.

• dviprt function: dviout uses the specially defined method according to the output device through the RAW printer driver (Indicated by [Ōption

→ S̄etup Parameters. . . → Printer → dviprt:])

– Using inner printer driver: dviout has special printer drivers for the control codes of LIPS III/IV and ESC/Page and some dot matrix printers. In particular, the output to the Laser Beam Printer with LIPS III/IV or ESC/Page are faster and better if this function is used.

– Controlling other dviwares: dviout can control other dviwares. For example, dviout can output a DVI file through dvips or transform a DVI file into a PDF file through dvipdfm(x) etc..

– Using configuration file: dviout uses the configuration file which can be written by the user. The configuration files for many printers are already supplied. For example, the configuration files to output the DVI file in the graphic data formats such as EPSF, PBM and G3 FAX are in the package of the dviout.

5.2 Output to a graphic image file

dviout defines a rectangular region in the preview window by [D̄isplay → R̄egion → On̄] and then output the region as an image data file by [F̄ile → S̄ave as Image]. The supported graphic formats are BMP, EMF, BMC and the formats (such as PNG or PDF) supported by ABC plug-in or dvidfmx if it is used.

The graphic file in BMP or EMF can be output to the clipboard, which can be pasted in an editor. This will be useful when the file containing mathematical formula with using TrueType fonts in the EMF format is pasted in PowerPoint etc. because it is smoothly scalarble.

5.3 Transformation into a PDF file

dviout can control other DVI wares to make a PDF file.

• dvipdfm: One of the most convenient ways to transform a DVI file into a PDF file is the usage of dvipdfmx which has been greatly developed and improved. Under a standard installation of TeX and default parameters of dviout, one can use it by clicking the button . The size of the sheet, the adjustment of the position and the page to be transformed etc. are automatically supported as in the usual way in dviout.

• dvipsk and Acrobat Distiller: This is supported by [Ōption → Choose

P̄arameters] with the selection of [A sample to transform to PDF by
dvipsk and Acrobat Distiller (5.0)]. One should modify the corre-

sponding script file if necessary.

• Printer Driver Acrobat Distiller: Printing through Acrobat Distiller, one makes a PDF file. In this case, TrueType fonts should be used in place of bitmap fonts to get a PDF file with a good quality.

5.4 Transformation into a readable text

A DVI file can be transformed into a readable text and this readable text can be re-converted to a DVI file which may be edited if nessesary. For example, some pages of a DVI file are transformed into a readable text by [Ōption →

Choose P̄arameters] with the selection of [Show Codes of some pages of
DVI file].

A readable text with DLT format can be converted into a DVI file. See dvispc.txt for more details.

5.5 Output informations

dviout can output several informations related to a DVI file or the environment to preview it. Most of them can be obtained from the Help on the menu bar. They are displayed in the information Window and can be edited and copied to the clipboard. Here some ones are picked up:

• Parameters: One gets the list of parameters controlling dviout by [H̄elp → P̄arameters], the current values of parameters by [Ōption → Āll

Parameters] and their non-default values by [Ōption → Non-d̄efault
Parameters].

• Font: Clicking the left button on the mouse with pushing [CTRL] and [SHIFT] keys, one gets the informations (such as the position in a sheet, the position in the DVI file, the size and the font used) on the pointed character. [H̄elp → Other Īnfo → F̄ont Info.] gives the information of the fonts used in the DVI file.

• System Information: [H̄elp → S̄ystem Info.] gives the most basic information on the environment for the correct operation of dviout. This information is important to analyze the problems appeared for the operation of dviout.

6 Will be continued…