DV2DT(1)

✨ DV2DT(1) ✨

General Commands Manual πŸ’–

🫢 NAME 🫢

okay so dv2dt is the tool that takes a binary TeX DVI file and turns it into a DTL text file πŸ“βœ¨

πŸŽ€ SYNOPSIS πŸŽ€

dv2dt input-DVI-file output-DTL-file

If you leave out the filenames, it just uses stdin and stdout instead 🧚

πŸ’… DESCRIPTION πŸ’…

bestie, dv2dt converts a binary TeX DVI file into an editable text file written in DTL (DVI Text Language) format πŸ¦‹ Once it's text, you can actually read it and edit it, which is so iconic. The companion utility dt2dv(1) can turn that DTL file back into a binary DVI file, so it's basically a full round trip πŸ”„


🌸 DVI COMMAND DESCRIPTION 🌸

ngl this section is the heart of the whole thing πŸ’œ TeX DVI files store a super compact binary description of typeset pages. It's just a stream of operation code bytes, and each one is immediately followed by zero or more parameter bytes πŸ“ The whole format is fully described in Donald E. Knuth, TeX: The Program, Addison-Wesley (1986), ISBN 0-201-13437-3, and also in the dvitype(1) literate program source code πŸ“š

For convenience, I put a summary of the DVI commands right here so you don't have to dig through the books πŸ™ˆ In the list below, operation code bytes are shown as unsigned decimal values, followed by their symbolic names (which aren't actually in the DVI file, they're just nicknames), and then a short description. A designation like b[+n] means the operation code byte is followed by a parameter b that uses n bytes, and that parameter is signed ✨ Without the plus sign, the parameter is unsigned. Signed integer parameter values are always represented in two's complement arithmetic, which is the system most computers use today, including all personal computers and workstations πŸ’»

  • 0 set_char_0 β€” Set character 0 from the current font.
  • ...
  • 127 set_char_127 β€” Set character 127 from the current font.
  • 128 set1 c[1] β€” Set the 1-byte unsigned character (uchar) number c.
  • 129 set2 c[2] β€” Set the 2-byte uchar number c.
  • 130 set3 c[3] β€” Set the 3-byte uchar number c.
  • 131 set4 c[+4] β€” Set the 4-byte signed character (schar) number c.
  • 132 set_rule a[+4] b[+4] β€” Set a rule, with height a and width b πŸ“
  • 133 put1 c[1] β€” Put the 1-byte uchar c.
  • 134 put2 c[2] β€” Put the 2-byte uchar c.
  • 135 put3 c[3] β€” Put the 3-byte uchar c.
  • 136 put4 c[+4] β€” Put the 4-byte schar c.
  • 137 put_rule a[+4] b[+4] β€” Put a rule, with height a and width b.
  • 138 nop β€” Do nothing. Literally just vibes 😴
  • 139 bop c0[+4] ... c9[+4] p[+4] β€” Beginning of page 🎬 The parameters c0 ... c9 are the TeX page counters, aka the contents of the TeX count registers \count0 ... \count9. The parameter p is the byte offset from the beginning of the DVI file to the previous bop operation code byte. The first bop in the file has p = -1, because there's no previous one, obviously πŸ™ƒ
  • 140 eop β€” End of page πŸ›‘
  • 141 push β€” Push (h,v,w,x,y,z) onto the stack πŸ“₯
  • 142 pop β€” Pop (h,v,w,x,y,z) off the stack πŸ“€
  • 143 right1 b[+1] β€” Move right b units.
  • 144 right2 b[+2] β€” Move right b units.
  • 145 right3 b[+3] β€” Move right b units.
  • 146 right4 b[+4] β€” Move right b units.
  • 147 w0 β€” Move right w units.
  • 148 w1 b[+1] β€” Move right b units, and set w = b.
  • 149 w2 b[+2] β€” Move right b units, and set w = b.
  • 150 w3 b[+3] β€” Move right b units, and set w = b.
  • 151 w4 b[+4] β€” Move right b units, and set w = b.
  • 152 x0 β€” Move right x units.
  • 153 x1 b[+1] β€” Move right b units, and set x = b.
  • 154 x2 b[+2] β€” Move right b units, and set x = b.
  • 155 x3 b[+3] β€” Move right b units, and set x = b.
  • 156 x4 b[+4] β€” Move right b units, and set x = b.
  • 157 down1 a[+1] β€” Move down a units.
  • 158 down2 a[+2] β€” Move down a units.
  • 159 down3 a[+3] β€” Move down a units.
  • 160 down4 a[+4] β€” Move down a units.
  • 161 y0 β€” Move right y units. (yes, it says right, not down, that's how the original goes πŸ™ˆ)
  • 162 y1 a[+1] β€” Move right a units, and set y = a.
  • 163 y2 a[+2] β€” Move right a units, and set y = a.
  • 164 y3 a[+3] β€” Move right a units, and set y = a.
  • 165 y4 a[+4] β€” Move right a units, and set y = a.
  • 166 z0 β€” Move right z units.
  • 167 z1 a[+1] β€” Move right a units, and set z = a.
  • 168 z2 a[+2] β€” Move right a units, and set z = a.
  • 169 z3 a[+3] β€” Move right a units, and set z = a.
  • 170 z4 a[+4] β€” Move right a units, and set z = a.

Part 1 ends here, bestie, the rest of the DVI commands and the DTL stuff are coming up next πŸŽ€πŸ§š

✨ AUTHOR ✨

okay so the people who wrote this thing are Geoffrey Tobin and the crew at the Department of Electronic Engineering, La Trobe University πŸŽ€ bestie, that's the one who made dv2dt and dt2dv(1) πŸ”₯

Geoffrey Tobin
Department of Electronic Engineering
La Trobe University
Bundoora, Victoria 3083
Australia
Tel: +61 3 479 3736
FAX: +61 3 479 3025
Email: <G.Tobin@ee.latrobe.edu.au>

and these manual pages were mainly written by Nelson H. F. Beebe, Ph.D. 🧚 the vibe is very academic but the docs are iconic πŸ’…

Nelson H. F. Beebe, Ph.D.
Center for Scientific Computing
Department of Mathematics
University of Utah
Salt Lake City, UT 84112
Tel: +1 801 581 5254
FAX: +1 801 581 4148
Email: <beebe@math.utah.edu>

okay that's the whole page, bestie πŸ’– it's version 0.6.0 from 08 March 1995, and it's giving DV2DT(1) energy all the way through πŸ¦‹βœ¨ thanks for reading with me, you're literally the best 🫢😭