# Embedding into DVI file

1. Operations of dviout or parameters of dviout can be embed into a DVI file by dviout specials. Information on the locations in the original TeX file is also embeded into it by source specials. For Presentation Mode one may use pause special.
2. dviout supports an original Extended DVI file where any files can be embedded. Using dviadd.exe, one can embed files int a DVI file or extract them from the DVI file.
2.1. dviout specials \special{dviout `initialize ... } which initialize dviout will be automatically recognized by dviout if only the parts ... are written in the file initial.par separated by lines and if the file is embedded in the DVI file. Here the lines starting with # are ignored. For example, the contents of
initial.par are
# This is a test.
`keep TEXPK
+TEXPK=^F/^s.tfm; -y=A4L
In particular, if the line starting with #rem exists the following lines are ignored until the line starting with #end appeares.
2.2. The fonts and images used by a DVI file can be automatically embedded into the DVI file and they will be automatically used by dviout(cf. Font/Image Embedding).
2.3. The usual dviware ignore these embedded files but dviout recognizes these files as Image data files included by graphic specials or target files of HyperTeX specials corresponding to <a href="file:..."> or font files indicated by ^F/ in -TEXPK:
Similarly the parameters -ftt: -vfn: etc. can use the embedded files by indicating ^F/<filename>.
For example, suppose foo.dvi uses myfig.ps under graphics package of LaTeX2e as follows
\usepackage{graphicx}
...
\includegraphics*[height=6cm]{myfig.ps}
We can embed myfig.ps into foo.dvi by
dviadd myfig.ps foo
and then dviout can directly handle this foo.dvi without myfig.ps.
If files are embedded in the DVI file being displayed, their list is shown by Help->information/Buffer Info.
Under other OS, the command dviadd can be also valid by having compiled the source file dviadd.c. Using the command dviadd x ... preceeding to execute a dviware, the dviware can handle the extended DVI file as dviout.
Note. A packing in a tar file can be used for the similar purpose. Moreover gzipped files with the extension .gz obtained from these files are also supported if the command gzip -d ... works.