Debian Codegraph @

texmf-dist/doc/latex/bxdvidriver/README.md

raw
1 BXdvidriver Package
2 ===================
3
4 LaTeX: To specify a driver option effective only in DVI output
5
6 This single-function package enables authors to specify a global
7 driver option (dvips, dvipdfmx, etc) which is applied only when the
8 engine outputs a DVI file. It is useful to create special document-
9 templates that can be compiled in both PDF-mode and DVI-mode.
10
11 ### System requirement
12
13 * TeX format: LaTeX.
14 * TeX engine: Anything.
15 * Dependent packages:
16 - iftex
17 - pdftexcmds
18
19 ### Installation
20
21 - `*.sty` → $TEXMF/tex/latex/BXdvidriver
22
23 ### License
24
25 This package is distributed under the MIT License.
26
27
28 The bxdvidriver Package
29 -----------------------
30
31 ### Package Loading
32
33 \usepackage[<option>,...]{bxdvidriver}
34
35 The available options are described hereafter.
36
37 #### Driver options
38
39 The following driver options are available:
40
41 dvips,xdvi,dvipdf,dvipdfm,dvipdfmx,dvisvgm,dvipsone
42 dviwindo,oztex,textures,pctexps,pctex32
43
44 Suppose the document begins with:
45
46 \documentclass[a4paper]{article}
47 \usepackage[dvipdfmx]{bxdvidriver}
48 \usepackage{graphicx,color}
49
50 If the document is compiled with pdflatex (or xelatex, lualatex), then
51 the package does nothing and the driver option `dvipdfmx` is simply
52 ignored.
53
54 However, if the document is compiled with latex (or any other engine
55 that outputs DVI files), then the package adds the given driver option
56 `dvipdfmx` to the global option list, and makes the settings effectively
57 the same as the following:
58
59 \documentclass[a4paper,dvipdfmx]{article}
60 \usepackage{graphicx,color}
61
62 The driver option is globally in effect, and thus the packages graphicx
63 and color will choose the driver for dvipdfmx.
64
65 *Note.* Some care must be taken when the document class itself has some
66 driver-dependent behavior. In that case, simply loading bxdvidriver
67 after `\documentclass` would leave its driver option unapplied to the
68 document class. Instead, you must load the bxdvidriver package *before*
69 `\documentclass` with `\RequirePackage` command.
70
71 \RequirePackage[dvipdfmx]{bxdvidriver}
72 \documentclass[a4paper]{some-fancy-class}
73 \usepackage{graphicx,color}
74
75 #### Options for integrity check
76
77 This package is essentially single-function, but as side effect it also
78 checks some integrity on driver settings:
79
80 * whether (at most) one driver option is given;
81 * whether the driver matches the (PDF-output) engine;
82 * whether (at most) one graphics driver is loaded.
83
84 By default, an error is issued when any check fails. But the behavior
85 can be changed by options.
86
87 * `check` (default): Check failure issues an error.
88 * `nocheck`: Check failure does not issue an error.
89
90 #### Other options
91
92 * `verbose`: More messages will appear on terminal.
93 * `noverbose` (default): Negation of `verbose`.
94 * `alsorawoptions` (default): The driver option will be appended also
95 to `\@raw@classoptionslist`.
96 * `noalsorawoptions`: Negation of `alsorawoptions`.
97
98 ### Usage
99
100 This package offers no user commands or environments. All the settings
101 are done by package options.
102
103
104 Revision History
105 ----------------
106
107 * Version 0.3 ‹2026/05/20›
108 - Support driver name `dvisvgm`.
109 * Version 0.2c ‹2026/03/21›
110 - Add options `(no)verbose` and `(no)alsorawoptions`.
111 * Version 0.2b ‹2022/06/15›
112 - Adjust for HiTeX.
113 * Version 0.2a ‹2017/02/13›
114 - Bug fix.
115 * Version 0.2 ‹2016/03/26›
116 - The first public version.
117
118 --------------------
119 Takayuki YATO (aka. "ZR")
120 https://github.com/zr-tex8r