Expand description
The DVI writer (TeX: The Program §583–§602, §617–§642), as LuaTeX
uses it when \outputmode=0.
A DVI file is a preamble, one bop…eop sequence per page and a
postamble that repeats the font definitions. The commands follow
TeX82, with these differences observed in LuaTeX’s output:
- movements are emitted lazily, just before the next character, rule
or special, as
right/downcommands with the smallest length that TeX82’smovementwould pick; thew,x,y,zregisters are never used (TeX82’s §607–§615 optimization is absent); - rules are always
set_rule, also in vertical lists, so the reader’shmoves by the rule width; - a box nested inside the page is bracketed by
push/pop; apushimmediately followed by itspopis removed (dvi_pop, §601); - characters and fonts use the shortest command for their number
(
set1…set4,fnt1…fnt4,fnt_def1…fnt_def4); - the preamble comment is
" LuaTeX output YYYY.MM.DD:HHMM", from\year,\month,\dayand\timeat the first page.
The walker in crate::shipout computes positions with TeX’s rounding
rules and calls this writer with absolute DVI coordinates (h to the
right and v downwards from the DVI origin, \hoffset and \voffset
included).
Structs§
- DviWriter
- The state of the DVI file being written.