dviout specials
dviout can use the special
\special{dviout <macro>}
in a DVI file to change paramaters of dviout and operations of dviout. This is valid only in the normal preview (is not valid in printing or displaying 4/16 pages at a time etc.)
This function is also available under HyperTeX specials.
1. The above <macro> is the same as variables of the functions [ValueSet(parameter=value)] or [Function(key)] of DDE in Link to Other Program.
Here the sign - should be put preceeding to the parameter in the first case to be distingushed to the latter.
For example,
\special{dviout -y=A6L fn}
Here the key operation(key) which may affect the execution of the macro and its definition or which should be executed after displaying a page, should be written in small letters. For example, it is in the case when key corresponds to the move to the next page and when there exists a dviout special in the page.
In dvips one can use
\special{papersize=<width>,<height>}
to indicate the paper size. dviout interprets this as
\special{dviout -y=F<width>:<height>P}
This special will be ignored in a DVI file after it is once interpreted. For example, one may write
\special{papersize=21cm,19.7cm}
and also one can indicate <parameter> in -y=<parameter> such as \special{papersize=A4L}.
If this is indicated as
\AtBeginDvi{special{papersize=210mm,197mm>>>>{<<<<
in the top page, it is interpreted even if dviout starts from a later page. One may also write as \AtBeginDvi{special{papersize=\the\paperheight,\the\paperwidth>>>>{<<<<
2. Under the form \special{dviout `key parameter} several functions are supported. key is allowed to be timer, href, keep, restore, message, ask, input, in, in*, sp or initialize.
2.1. \special{dviout `timer number}
Wait number/1000 before executing the successive dviout specials. If the preview moves to another page or dvi file, waited dviout specials are canceled.
The successive dviout specials can be write after number separated by a space
For example, write
\special{dviout `timer 60000}
\special{dviout Je}
in the every page execpt for the last and write
\special{dviout `timer 60000}
\special{dviout Jt}
in the last page. Then the every page is shown for 60 second succeccively without the end.
We may write as
\special{dviout `timer 60000 Jt}
2.2. \special{dviout `wait}
This is equivalent to \special{dviout `timer 0} and means to wait the execution of the next dviout special until the former ones have been completed. Moreover a series of dviout specials
\special{dviout <macro>}
\special{dviout `wait}
\special{dviout ....}
can be unified as
\special{dviout <macro> ; ....}
2.3. `"....."`
dviout specials except `timer can be one block surrounded by `" and "`.
By this dviout specials are unified to one \special. `wait is automatically inserted between the blocks.
For example, under myhyper.sty
\href{dviout:`"`href file:foo.mid"` `href file:foo.dvi}{jump to foo}
2.4. \special{dviout `href parameters}
parameters is equivalent to parameters in \special{html:<a href="parameters">}. But parameters with the head dviout: is ignored.
One can use this in HyperTeX as follows.
\special{html:<a href="dviout: -y=A4L ;`href file:foo.dvi">}
Jump to foo
\special{html:</a>}
2.5. \special{dviout `keep parameter list}
Keep the current values of paramater list and automatically recover them when the current dvi file is closed. For example
\special{dviout `keep y BMP}
They are also recovered by \special{dviout `restore}. Once parameters are kept, another \special{dviout `keep ...} is ignored unless they are recovered.
2.6. \special{dviout `message <MESSAGE>}
<MESSAGE> is displayed in Information Window.
<MESSAGE> can be a block surrounded by `' and '`. The block can be devided to lines by the separator `'. If there exist more than one line, the first line becomes a title and the following lines are contents.
For example,
\special{dviout `mesage `'Remark`'Written by foo`'Jan. 2000'`}
2.7. \special{dviout `ask `'<MESSAGE>'` `yes ... `no ...}
The dialog including <MESSAGE> is displayed and request to answer Yes or No.
If Yes is answered and `yes exists, the dviout specials following `yes are executed until `no or the end of the \special. For example, under myhyper.sty
\href{dviout:`ask `'direction`'Landscape'` `yes -y=A4L fn `no -y=A4P fn}{Change direction}
2.8. \special{dviout `input <string>}
The content of Clipboard is replaced (added if ALT is pressed) by <string>.
If `in is used in plcae of `input, two succeeding hexadecimal letters following a space characer are replaced by the charater with the code. Moreover two continuous spaces are replaced by one space. Hence even number of continuous space characters are replaced by the half number of spaces.
If the top of <string> is . and two hexadecimal letters follows after it, then they are replaced by the charater with the code. If the top of <string> is .., it is replaced by ..
These replacements following a space and . are ignored if `input0 is used in place of `input.
If `in* is used in place of `in, then <string> is not displayed in the preview window.
This dviout special is usefull if it is used together with HyperTeX (<string> is copied in the clipboard by the click of a hotspot).
In this case, if CTRL is pressed, it can be copied to an specified editor. Moreover if CTRL+ALT is pressed, the editor can be redefined.
2.9. \special{dviout `+<levels>}
Control the output after this command in this page. If <levels> is empty, the output is stopped. If <levels> equals -, the output becomes valid.
<levels> can be written as -2, 4-5, 7- and if the level is in this region, the output is valid. Here -2 means 0-2 and 7 means the level equals or larger than 7. The level start from 0 and it increases by one when [SPACE] key is pushed.
Moreover m means the maximal level appeared up to this point and M means the level + 1. The successive M with the number n means the level + n and that of m means the level - n + 1.
If dviout jumps to a former page, the level is regarded to be sufficiently large. Then if reNew button (default:CTRL+N) is pushed, the page is shown with the level 0.
2.10. \special{dviout `sp <special>}
Execute the TeX special <special>
2.11. \special{dviout `initialize <macro>}
If this special is put at the top of a dvi file, it is always performed when this dvi file is read by dviout even if the start page is not the top page.
If the option word page is written after 'initialize, it is always performed at the top of each page.
This special with <macro> is ignored if it is not at the top of a dvi file.
To execute again this special defined at the top of a dvi file, indicate as follows
\special{dviout `initialize}
For example, to define this dviout special at the top of a dvi file, write as follows at the top of the first page
\AtBeginDvi{special{dviout `initialize -y=B5L>>>>{<<<<
\AtBeginDvi{special{dviout `initialize page `sp background Yellow>>>>{<<<<
Moreover the parameters -TEXPK: -TEXFONTS: -TEXKNJ: -gdat: whose values may have several pathnames can be intialized by appending some new pathnames. It is indicated by using + inplace of -.
If the new pathenames begins with ;, then the original pathnames are appended to the new ones. Otherwise the new pathnames should be terminated by ; and the new pathnames are appended to the original pathnames.
They are checked not to append the same pathnames as in the original ones. This function using + should be initialize one parameter in one \special. For example,
\AtBeginDvi{special{dviout `initialize `keep TEXPK>>>>{<<<<
\AtBeginDvi{special{dviout `initialize +TEXPK=^F/^s.pk;^F/^s.tfm;>>>>{<<<<
These specials to intialize dviout can be embedded in a DVI file if they are written in a file named initial.par (cf. Embedding into DVI file).