1DVIASM(1) General Commands Manual DVIASM(1)
2
3
4
6 DVIasm - a TeX utility program for editing DVI files directly
7
9 dviasm [<options>] <dvi_file>|<dvi_dump_file>
10
12 DVIasm is a TeX utility program which is designed for editing DeVice-
13 Independent (DVI) files directly. It consists of a single Python
14 script, dviasm.py, in a human readable text format. It runs on any
15 platform in which Python 3 is installed.
16
17 Features of DVIasm includes:
18
19 1) Disassemble a DVI file (or XeTeX XDV file) into a human-readable
20 text file, the contents of which are easy to modify.
21
22 2) Assembles the output text file back to the binary format.
23
24 There are several alternatives for dumping and editing DVI files:
25
26 1) DVItype developed by Donald E. Knuth supports one-way conversion
27 from DVI to a text format. There are also some derivatives: pDVItype
28 for pTeX, upDVItype for upTeX, ODVItype for Omega.
29
30 2) The programs dv2dt and dt2dv can be used in pairs to allow two-way
31 conversion between DVI and the DVI Text Language (DTL).
32
33 3) The program dvispc (part of DVIOUT previewer) also has an ability
34 to convert between DVI and text.
35
36 Among those, DVIasm is designed to allow users to edit DVI files eas‐
37 ily, for example by unifying ``right1''-``right4'' to a single command
38 ``right'' which can be used regardless of the amount of move.
39
41 --version Show program's version number and exit.
42
43 -h, --help
44 Show this help message and exit.
45
46 -u <STR>, --unit=<STR>
47 Set unit [default: `pt']. Allowed values are: `sp', `pt',
48 `bp', `mm', `cm' and `in'.
49
50 -o <FILE>, --output=<FILE>
51 Set filename for output instead of stdout.
52
53 -e <STR>, --encoding=<STR>
54 Set encoding for input/output of dumped text [default:
55 `utf8']. Allowed values are: `ascii', `latin1', `utf8',
56 `sjis' and `eucjp'. When used with the option -p (or
57 --ptex), allowed values are only `utf8', `sjis' and `eucjp'.
58 # NOTE: This feature does not support dumping through stdout.
59
60 -x <STR>, --xxx-encoding=<STR>
61 Set encoding for interpreting `xxx:' strings [default:
62 `none']. Allowed values are: `none', `utf8', `sjis' and `eu‐
63 cjp'.
64 This option allows users to specify the correct encoding for
65 dumping/compiling the contents of \special.
66
67 Typical usages are as follows:
68
69 1) By default, the contents of \special are dumped/compiled
70 as byte-to-byte escape sequences in `\x..' format. This
71 would suffice when you don't need to read/edit the contents
72 of \special.
73
74 3) For XeTeX and upTeX users, `-x utf8' would be useful
75 since these engines use UTF-8 to encode strings inside
76 \special commands.
77
78 2) For pTeX users with ISO-2022-JP-encoded DVI, it would be
79 helpful to select the appropriate option `-x eucjp' (for
80 Unix) or `-x sjis' (for Windows) to be consistent with the
81 internal Kanji encoding used by pTeX engine.
82
83 -t <INT>, --tabsize=<INT>
84 Set tab size for push/pop [default: 2].
85
86 -p, --ptex
87 Dump and compile ISO-2022-JP-encoded DVI for Japanese pTeX.
88 This option is required to decode or encode Japanese charac‐
89 ters being typeset (using `set2' or `put2') properly.
90
91 -s <STR>, --subfont=<STR>
92 Specify the list of fonts with UCS2 subfont scheme in the
93 comma-separated format. If <STR> is empty, the pre-defined
94 internal subfont list is disabled.
95 This option would be useful for example when using CJK pack‐
96 age.
97
99 Documentation of DVIasm by the original author Jin-Hwan Cho is pub‐
100 lished as:
101 http://tug.org/TUGboat/Articles/tb28-2/tb89cho.pdf (TUGboat)
102 http://ajt.ktug.kr/assets/2008/5/1/0201cho.pdf (Asian Journal of
103 TeX)
104
106 The first version was written in Python 2 by Jin-Hwan Cho in 2007.
107 Khaled Hosny started to support dumping/compiling XeTeX XDV format in
108 2014. Arthur Reutenauer ported the script to Python 3 in 2019. Cur‐
109 rent maintainer of DVIasm is Hironobu Yamashita, since 2020.
110
112 Please visit the GitHub repository <https://github.com/aminophen/dvi‐
113 asm>.
114
116 dvitype(1), dv2dt(1), dt2dv(1), dvispc(1).
117
118
119
120 DVIASM(1)