DVIASM(1)

πŸ“¦ version 2026.0, in alpine 3.24

πŸ’– DVIASM(1) πŸ’–

okay bestie, pull up a chair, we're in the General Commands Manual section 1 and this is literally the manual page for DVIasm. it's giving niche TeX tool, it's giving main character energy, and it's about to be your new fave. πŸŽ€


✨ NAME ✨

DVIasm β€” a TeX utility program for editing DVI files directly πŸ¦‹


🌸 SYNOPSIS 🌸

dviasm [<options>] <dvi_file>|<dvi_dump_file>

πŸ’… DESCRIPTION πŸ’…

so DVIasm is a TeX utility program designed for editing DeVice-Independent (DVI) files directly. no cap. it's literally a single Python script, dviasm.py, sitting there in a human readable text format, and it runs on any platform where Python 3 is installed. slay. πŸ‘‘

the features of DVIasm include:

  1. Disassemble a DVI file (or XeTeX XDV file) into a human-readable text file, the contents of which are easy to modify. ✨
  2. Assembles the output text file back to the binary format. πŸ’–

there are several alternatives for dumping and editing DVI files, and bestie, we're gonna list them all because we respect the competition:

  1. DVItype developed by Donald E. Knuth supports one-way conversion from DVI to a text format. There are also some derivatives: pDVItype for pTeX, upDVItype for upTeX, ODVItype for Omega. πŸ‘€
  2. The programs dv2dt and dt2dv can be used in pairs to allow two-way conversion between DVI and the DVI Text Language (DTL).
  3. The program dvispc (part of DVIOUT previewer) also has an ability to convert between DVI and text.

among those, DVIasm is designed to allow users to edit DVI files easily, for example by unifying `right1'–`right4' to a single command `right' which can be used regardless of the amount of move. that's the whole vibe. 🫢


🌈 OPTIONS 🌈

  • --version β€” Show program's version number and exit. πŸ’«
  • -h, --help β€” Show this help message and exit.
  • -u <STR>, --unit=<STR> β€” Set unit [default: `pt']. Allowed values are: `sp', `pt', `bp', `mm', `cm' and `in'. πŸ“
  • -o <FILE>, --output=<FILE> β€” Set filename for output instead of stdout. no more screen spam, we're writing to a file bestie πŸŽ€
  • -e <STR>, --encoding=<STR> β€” Set encoding for input/output of dumped text [default: `utf8']. Allowed values are: `ascii', `latin1', `utf8', `sjis' and `eucjp'. When used with the option -p (or --ptex), allowed values are only `utf8', `sjis' and `eucjp'.
NOTE: This feature does not support dumping through stdout. πŸ’€ so yeah, that one's a hard no
  • -x <STR>, --xxx-encoding=<STR> β€” Set encoding for interpreting `xxx:' strings [default: `none']. Allowed values are: `none', `utf8', `sjis' and `eucjp'. This option allows users to specify the correct encoding for dumping/compiling the contents of \special. πŸ”₯

Typical usages are as follows:

  1. By default, the contents of \special are dumped/compiled as byte-to-byte escape sequences in `\x..' format. This would suffice when you don't need to read/edit the contents of \special. ✨
  2. For XeTeX and upTeX users, `-x utf8' would be useful since these engines use UTF-8 to encode strings inside \special commands. 🌸
  3. For pTeX users with ISO-2022-JP-encoded DVI, it would be helpful to select the appropriate option `-x eucjp' (for Unix) or `-x sjis' (for Windows) to be consistent with the internal Kanji encoding used by pTeX engine. πŸ’œ
  • -t <INT>, --tabsize=<INT> β€” Set tab size for push/pop [default: 2]. πŸ¦‹
  • -p, --ptex β€” Dump and compile ISO-2022-JP-encoded DVI for Japanese pTeX. This option is required to decode or encode Japanese characters being typeset (using `set2' or `put2') properly. πŸ‘‘
  • -s <STR>, --subfont=<STR> β€” Specify the list of fonts with UCS2 subfont scheme in the comma-separated format. If <STR> is empty, the pre-defined internal subfont list is disabled. This option would be useful for example when using CJK package. 🌈

πŸŽ€ EXAMPLE πŸŽ€

Documentation of DVIasm by the original author Jin-Hwan Cho is published as:

https://tug.org/TUGboat/Articles/tb28-2/tb89cho.pdf (TUGboat)
http://ajt.ktug.kr/assets/2008/5/1/0201cho.pdf (Asian Journal of TeX)

🫢 AUTHORS 🫢

The first version was written in Python 2 by Jin-Hwan Cho in 2007. Khaled Hosny started to support dumping/compiling XeTeX XDV format in 2014. Arthur Reutenauer ported the script to Python 3 in 2019. Current maintainer of DVIasm is Hironobu Yamashita, since 2020.

we love a glow-up era. πŸ’…βœ¨


😭 BUG REPORT 😭

Please visit the GitHub repository <https://github.com/aminophen/dviasm>.

(no links allowed in this vibe, but you know what to do β€” go type it in, bestie 🧚)


πŸ’œ SEE ALSO πŸ’œ

dvitype(1), dv2dt(1), dt2dv(1), dvispc(1). iykyk πŸ“


and that's a wrap on DVIASM(1) β€” yes that's literally what this page is called, it lives in the General Commands Manual and it's stamped with that exact same name at the bottom. periodt. go disassemble something, you icon. πŸ’–πŸ‘‘

πŸ“¦ where this page comes from