1DVISVGM(1) dvisvgm Manual DVISVGM(1)
2
3
4
6 dvisvgm - converts DVI and EPS files to the XML-based SVG format
7
9 dvisvgm [ options ] file [.dvi]
10
11 dvisvgm --eps [ options ] file [.eps]
12
13 dvisvgm --pdf [ options ] file [.pdf]
14
16 The command-line utility dvisvgm converts DVI files, as generated by
17 TeX/LaTeX, to the XML-based scalable vector graphics format SVG. It
18 supports the classic DVI version 2 as well as version 3 (created by
19 pTeX in vertical mode), and the XeTeX versions 5 to 7 which are also
20 known as XDV. Besides the basic DVI commands, dvisvgm also evaluates
21 many so-called specials which heavily extend the capabilities of the
22 plain DVI format. For a more detailed overview, see section Supported
23 Specials below.
24
25 Since the current SVG standard 1.1 doesn’t specify multi-page graphics,
26 dvisvgm creates separate SVG files for each DVI page. Because of
27 compatibility reasons, only the first page is converted by default. In
28 order to select a different page or arbitrary page sequences, use
29 option -p which is described below.
30
31 SVG is a vector-based graphics format and therefore dvisvgm tries to
32 convert the glyph outlines of all fonts referenced in a DVI page
33 section to scalable path descriptions. The fastest way to achieve this
34 is to extract the path information from vector-based font files
35 available in PFB, TTF, or OTF format. If dvisvgm is able to find such a
36 file, it extracts all necessary outline information about the glyphs
37 from it.
38
39 However, TeX’s main source for font descriptions is Metafont, which
40 produces bitmap output (GF files). That’s why not all obtainable TeX
41 fonts are available in a scalable format. In these cases, dvisvgm tries
42 to vectorize Metafont’s output by tracing the glyph bitmaps. The
43 results are not as perfect as most (manually optimized) PFB or OTF
44 counterparts, but are nonetheless really nice in most cases.
45
46 When running dvisvgm without option --no-fonts, it creates font
47 elements (<font>...</font>) to embed the font data into the SVG files.
48 Unfortunately, only few SVG renderers support these elements yet. Most
49 web browsers and vector graphics applications don’t evaluate them
50 properly so that the text components of the resulting graphics might
51 look strange. In order to create more compatible SVG files,
52 command-line option --no-fonts can be given to replace the font
53 elements by plain graphics paths. Most web browsers (but only few
54 external SVG renderers) also suppport WOFF and WOFF2 fonts that can be
55 used instead of the default SVG fonts. Option --font-format offers the
56 functionality to change the format applied to the fonts being embedded.
57
59 dvisvgm provides a POSIX-compliant command-line interface with short
60 and long option names. They may be given before and/or after the name
61 of the file to be converted. Also, the order of specifying the options
62 is not significant, i.e. you can add them in any order without changing
63 dvisvgm’s behavior. Certain options accept or require additional
64 parameters which are directly appended to or separated by whitespace
65 from a short option (e.g. -v0 or -v 0). Long options require an
66 additional equals sign (=) between option name and argument but without
67 any surrounding whitespace (e.g. --verbosity=0). Multiple short options
68 that don’t expect a further parameter can be combined after a single
69 dash (e.g. -ejs rather than -e -j -s).
70
71 Long option names may also be shortened by omitting trailing
72 characters. As long as the shortened name is unambiguous, it’s
73 recognized and applied. For example, option --exact-bbox can be
74 shortened to --exact, --exa, or --ex. In case of an ambiguous
75 abbreviation, dvisvgm prints an error message together with all
76 matching option names.
77
78 -b, --bbox=fmt
79 Sets the bounding box of the generated graphic to the specified
80 format. The parameter fmt takes either one of the format specifiers
81 listed below, or a sequence of four comma- or whitespace-separated
82 length values x1, y1, x2 and y2. The latter define the absolute
83 coordinates of two diagonal corners of the bounding box. Each
84 length value consists of a floating point number and an optional
85 length unit (pt, bp, cm, mm, in, pc, dd, cc, or sp). If the unit is
86 omitted, TeX points (pt) are assumed.
87
88 It’s also possible to give only one length value l. In this case,
89 the minimal bounding box is computed and enlarged by adding (-l,-l)
90 to the upper left and (l,l) to the lower right corner.
91
92 Additionally, dvisvgm also supports the following format
93 specifiers:
94
95 International DIN/ISO paper sizes
96 An, Bn, Cn, Dn, where n is a non-negative integer, e.g. A4 or
97 a4 for DIN/ISO A4 format (210mm × 297mm).
98
99 North American paper sizes
100 invoice, executive, legal, letter, ledger
101
102 Special bounding box sizes
103
104 dvi page size stored in the
105 DVI file
106 min computes the
107 minimal/tightest bounding
108 box
109 none no bounding box is
110 assigned
111 papersize box sizes specified by
112 papersize specials present
113 in the DVI file
114 preview bounding box data computed
115 by the preview package (if
116 present in the DVI file)
117
118
119 Page orientation
120 The default page orientation for DIN/ISO and American paper
121 sizes is portrait, i.e. width < height. Appending -landscape
122 or simply -l to the format string switches to landscape mode
123 (width > height). For symmetry reasons you can also explicitly
124 add -portrait or -p to indicate the default portrait format.
125 Note that these suffixes are part of the size string and not
126 separate options. Thus, they must directly follow the size
127 specifier without additional blanks. Furthermore, the
128 orientation suffixes can’t be used with dvi, min, and none.
129
130 Note
131 Option -b, --bbox only affects the bounding box and does
132 not transform the page content. Hence, if you choose a
133 landscape format, the page won’t be rotated.
134
135 -B, --bitmap-format=fmt
136 This option sets the image format used to embed bitmaps extracted
137 from PostScript or PDF data. By default, dvisvgm embeds all bitmaps
138 as JPEG images because it’s the most compact of the two formats
139 supported by SVG. To select the alternative lossless PNG format,
140 --bitmap-format=png can be used. There are some more format
141 variants dvisvgm currently supports even though jpeg and png should
142 be sufficient in most cases. The following list gives an overview
143 of the known format names which correspond to names of Ghostscript
144 output devices.
145
146 none disable processing of
147 bitmap images
148 jpeg color JPEG format
149 jpeggray grayscale JPEG format
150 png grayscale or 24-bit color
151 PNG format depending on
152 current color space
153 pnggray grayscale PNG format
154 pngmono black-and-white PNG format
155 pngmonod dithered black-and-white
156 PNG format
157 png16 4-bit color PNG format
158 png256 8-bit color PNG format
159 png16m 24-bit color PNG format
160
161 Since the collection of supported output devices can vary among
162 local Ghostscript installations, not all formats may be available
163 in some environments. dvisvgm quits with a PostScript error message
164 if the selected output format requires a locally unsupported output
165 device.
166
167 The two JPEG format specifiers accept an optional parameter to set
168 the IJG quality level which must directly follow the format
169 specifier separated by a colon, e.g. --bitmap-format=jpeg:50. The
170 quality value is an integer between 0 and 100. Higher values result
171 in better image quality but lower compression rates and therefore
172 larger files. The default quality level is 75 which is applied if
173 no quality parameter is given or if it’s set to 0.
174
175 -C, --cache[=dir]
176 To speed up the conversion process of bitmap fonts, dvisvgm saves
177 intermediate conversion information in cache files. By default,
178 these files are stored in $XDG_CACHE_HOME/dvisvgm/ or
179 $HOME/.cache/dvisvgm if XDG_CACHE_HOME is not set. If you prefer a
180 different location, use option --cache to overwrite the default.
181 Furthermore, it is also possible to disable the font caching
182 mechanism completely with option --cache=none. If argument dir is
183 omitted, dvisvgm prints the path of the default cache directory
184 together with further information about the stored fonts.
185 Additionally, outdated and corrupted cache files are removed.
186
187 -j, --clipjoin
188 This option tells dvisvgm to compute all intersections of clipping
189 paths itself rather than delegating this task to the SVG renderer.
190 The resulting SVG files are more portable because some SVG viewers
191 don’t support intersecting clipping paths which are defined by
192 clipPath elements containing a clip-path attribute.
193
194 --color
195 Enables colorization of messages printed during the conversion
196 process. The colors can be customized via environment variable
197 DVISVGM_COLORS. See the Environment section below for further
198 information.
199
200 --colornames
201 By default, dvisvgm exclusively uses RGB values of the form #RRGGBB
202 or #RGB to represent colors in the SVG file. The latter is a short
203 form for colors whose RGB components each consist of two identical
204 hex digits, e.g. #123 equals #112233. According to the SVG
205 standard, it’s also possible to use color names (like black and
206 darkblue) for a limited number of predefined colors
207 (https://www.w3.org/TR/SVG11/types.html#ColorKeywords). In order to
208 apply these color names rather than their RGB values, call dvisvgm
209 with option --colornames. All colors without an SVG color name will
210 still be represented by RGB values.
211
212 --comments
213 Adds comments with further information about selected data to the
214 SVG file. Currently, only font elements and font CSS rules related
215 to native fonts are annotated.
216
217 -E, --eps
218 If this option is given, dvisvgm does not expect a DVI but an EPS
219 input file, and tries to convert it to SVG. In order to do so, a
220 single psfile special command is created and forwarded to the
221 PostScript special handler. This option is only available if
222 dvisvgm was built with PostScript support enabled, and requires
223 Ghostscript to be available. See option --libgs for further
224 information.
225
226 -e, --exact-bbox
227 This option tells dvisvgm to compute the precise bounding box of
228 each character. By default, the values stored in a font’s TFM file
229 are used to determine a glyph’s extent. As these values are
230 intended to implement optimal character placements and are not
231 designed to represent the exact dimensions, they don’t necessarily
232 correspond with the bounds of the visual glyphs. Thus, width and/or
233 height of some glyphs may be larger (or smaller) than the
234 respective TFM values. As a result, this can lead to clipped
235 characters at the bounds of the SVG graphics. With option
236 --exact-bbox given, dvisvgm analyzes the actual shape of each
237 character and derives a usually tight bounding box.
238
239 -f, --font-format=format
240 Selects the file format used to embed the font data into the SVG
241 files. Following formats are supported: SVG (that’s the default),
242 TTF (TrueType), WOFF, and WOFF2 (Web Open Font Format version 1 and
243 2). By default, dvisvgm creates unhinted fonts that might look bad
244 on low-resolution devices. In order to improve the display quality,
245 the generated TrueType, WOFF, or WOFF2 fonts can be autohinted. The
246 autohinter is enabled by appending ,autohint or ,ah to the font
247 format, e.g. --font-format=woff,autohint or --fwoff,ah.
248
249 Option --font-format is only available if dvisvgm was built with
250 WOFF support enabled.
251
252 -m, --fontmap=filenames
253 Loads and evaluates a single font map file or a sequence of font
254 map files. These files are required to resolve font file names and
255 encodings. dvisvgm does not provide its own map files but tries to
256 read available ones coming with dvips or dvipdfm. If option
257 --fontmap is omitted, dvisvgm looks for the default map files
258 ps2pk.map, pdftex.map, dvipdfm.map, and psfonts.map (in this
259 order). Otherwise, the files given as option arguments are
260 evaluated in the given order. Multiple filenames must be separated
261 by commas without leading and/or trailing whitespace.
262
263 By default, redefined mappings do not replace previous ones.
264 However, each filename can be preceded by an optional mode
265 specifier (+, -, or =) to change this behavior:
266
267 +mapfile
268 Only those entries in the given map file that don’t redefine a
269 font mapping are applied, i.e. fonts already mapped keep
270 untouched. That’s also the default mode if no mode specifier is
271 given.
272
273 -mapfile
274 Ensures that none of the font mappings defined in the given map
275 file are used, i.e. previously defined mappings for the
276 specified fonts are removed.
277
278 =mapfile
279 All mappings defined in the map file are applied. Previously
280 defined settings for the same fonts are replaced.
281
282 If the first filename in the filename sequence is preceded by a
283 mode specifier, dvisvgm loads the default font map (see above)
284 and applies the other map files afterwards. Otherwise, none of
285 default map files will be loaded automatically.
286
287 Examples: --fontmap=myfile1.map,+myfile2.map loads myfile1.map
288 followed by myfile2.map where all redefinitions of myfile2.map
289 are ignored. --fontmap==myfile1.map,-myfile2.map loads the
290 default map file followed by myfile1.map and myfile2.map where
291 all redefinitions of myfile1.map replace previous entries.
292 Afterwards, all definitions for the fonts given in myfile2.map
293 are removed from the font map tree.
294
295 For further information about the map file formats and the mode
296 specifiers, see the manuals of dvips
297 (https://tug.org/texinfohtml/dvips.html) and dvipdfm
298 (https://ctan.org/tex-archive/dviware/dvipdfm).
299
300 --grad-overlap
301 Tells dvisvgm to create overlapping grid segments when
302 approximating color gradient fills (also see option --grad-segments
303 below). By default, adjacent segments don’t overlap but only touch
304 each other like separate tiles. However, this alignment can lead to
305 visible gaps between the segments because the background color
306 usually influences the color at the boundary of the segments if the
307 SVG renderer uses anti-aliasing to create smooth contours. One way
308 to avoid this and to create seamlessly touching color regions is to
309 enlarge the segments so that they extend into the area of their
310 right and bottom neighbors. Since the latter are drawn on top of
311 the overlapping parts, the visible size of all segments keeps
312 unchanged. Just the former gaps disappear as the background is now
313 completely covered by the correct colors. Currently, dvisvgm
314 computes the overlapping segments separately for each patch of the
315 mesh (a patch mesh may consist of multiple patches of the same
316 type). Therefore, there still might be visible gaps at the seam of
317 two adjacent patches.
318
319 --grad-segments=number
320 Determines the maximal number of segments per column and row used
321 to approximate gradient color fills. Since SVG 1.1 only supports a
322 small subset of the shading algorithms available in PostScript,
323 dvisvgm approximates some of them by subdividing the area to be
324 filled into smaller, monochromatic segments. Each of these segments
325 gets the average color of the region it covers. Thus, increasing
326 the number of segments leads to smaller monochromatic areas and
327 therefore a better approximation of the actual color gradient. As a
328 drawback, more segments imply bigger SVG files because every
329 segment is represented by a separate path element.
330
331 Currently, dvisvgm supports free- and lattice-form triangular patch
332 meshes as well as Coons and tensor-product patch meshes. They are
333 approximated by subdividing the area of each patch into a n×n grid
334 of smaller segments. The maximal number of segments per column and
335 row can be changed with option --grad-segments.
336
337 --grad-simplify=delta
338 If the size of the segments created to approximate gradient color
339 fills falls below the given delta value, dvisvgm reduces their
340 level of detail. For example, Bézier curves are replaced by
341 straight lines, and triangular segments are combined to tetragons.
342 For a small delta, these simplifications are usually not noticeable
343 but reduce the size of the generated SVG files significantly.
344
345 -h, --help[=mode]
346 Prints a short summary of all available command-line options. The
347 optional mode parameter is an integer value between 0 and 2. It
348 selects the display variant of the help text. Mode 0 lists all
349 options divided into categories with section headers. This is also
350 the default if dvisvgm is called without parameters. Mode 1 lists
351 all options ordered by the short option names, while mode 2 sorts
352 the lines by the long option names.
353
354 A values in brackets after the description text indicate the
355 default parameter of the option. They are applied if an option with
356 a mandatory parameter is not used or if an optional parameter is
357 omitted. For example, option --bbox requires a size parameter which
358 defaults to min if --bbox is not used. Option --zip, which isn’t
359 applied by default, accepts an optional compression level
360 parameter. If it’s omitted, the stated default value 9 is used.
361
362 --keep
363 Disables the removal of temporary files as created by Metafont
364 (usually .gf, .tfm, and .log files) or the TrueType/WOFF module.
365
366 --libgs=path
367 This option is only available if the Ghostscript library is not
368 directly linked to dvisvgm and if PostScript support was not
369 completely disabled during compilation. In this case, dvisvgm tries
370 to load the shared GS library dynamically during runtime. By
371 default, it expects the library’s name to be libgs.so.X (on
372 Unix-like systems, where X is the ABI version of the library) or
373 gsdll32.dll/gsdll64.dll (Windows). If dvisvgm doesn’t find the
374 library, option --libgs can be used to specify the correct path and
375 filename, e.g. --libgs=/usr/local/lib/libgs.so.9 or
376 --libgs=\gs\gs9.25\bin\gsdll64.dll.
377
378 Alternatively, it’s also possible to assign the path to environment
379 variable LIBGS, e.g. export LIBGS=/usr/local/lib/libgs.so.9 or set
380 LIBGS=\gs\gs9.25\bin\gsdll63.dll. LIBGS has less precedence than
381 the command-line option, i.e. dvisvgm ignores variable LIBGS if
382 --libgs is given.
383
384 -L, --linkmark=style
385 Selects the method how to mark hyperlinked areas. The style
386 argument can take one of the values none, box, and line, where box
387 is the default, i.e. a rectangle is drawn around the linked region
388 if option --linkmark is omitted. Style argument line just draws the
389 lower edge of the bounding rectangle, and none tells dvisvgm not to
390 add any visible objects to hyperlinks. The lines and boxes get the
391 current text color selected. In order to apply a different,
392 constant color, a colon followed by a color specifier can be
393 appended to the style string. A color specifier is either a
394 hexadecimal RGB value of the form #RRGGBB, or a dvips color name
395 (https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips).
396
397 Moreover, argument style can take a single color specifier to
398 highlight the linked region by a frameless box filled with that
399 color. An optional second color specifier separated by a colon
400 selects the frame color.
401
402 Examples: box:red or box:#ff0000 draws red boxes around the linked
403 areas. yellow:blue creates yellow filled rectangles with blue
404 frames.
405
406 -l, --list-specials
407 Prints a list of registered special handlers and exits. Each
408 handler processes a set of special statements belonging to the same
409 category. In most cases, the categories are identified by the
410 prefix of the special statements. It’s usually a leading string
411 followed by a colon or a blank, e.g. color or ps. The listed
412 handler names, however, don’t need to match these prefixes, e.g. if
413 there is no common prefix or if functionality is split into
414 separate handlers in order to allow to disable them separately with
415 option --no-specials. All special statements not covered by one of
416 the special handlers are silently ignored.
417
418 -M, --mag=factor
419 Sets the magnification factor applied in conjunction with Metafont
420 calls prior tracing the glyphs. The larger this value, the better
421 the tracing results. Nevertheless, large magnification values can
422 cause Metafont arithmetic errors due to number overflows. So, use
423 this option with care. The default setting usually produces nice
424 results.
425
426 --no-merge
427 Puts every single character in a separate text element with
428 corresponding x and y attributes. By default, new text or tspan
429 elements are only created if a string starts at a location that
430 differs from the regular position defined by the characters'
431 advance values.
432
433 --no-mktexmf
434 Suppresses the generation of missing font files. If dvisvgm can’t
435 find a font file through the kpathsea lookup mechanism, it calls
436 the external tools mktextfm or mktexmf. This option disables these
437 calls.
438
439 -n, --no-fonts[=variant]
440 If this option is given, dvisvgm doesn’t create SVG font elements
441 but uses paths instead. The resulting SVG files tend to be larger
442 but are concurrently more compatible with most applications that
443 don’t support SVG fonts. The optional argument variant selects the
444 method how to substitute fonts by paths. Variant 0 creates path and
445 use elements in order to avoid lengthy duplicates. Variant 1
446 creates path elements only. Option --no-fonts implies --no-styles.
447
448 -c, --scale=sx[,sy]
449 Scales the page content horizontally by sx and vertically by sy.
450 This option is equivalent to -TSsx,sy.
451
452 -S, --no-specials[=names]
453 Disable processing of special commands embedded in the DVI file. If
454 no further parameter is given, all specials are ignored. To disable
455 a selected set of specials, an optional comma-separated list of
456 names can be appended to this option. A name is the unique
457 identifier referencing the intended special handler as listed by
458 option --list-specials.
459
460 --no-styles
461 By default, dvisvgm creates CSS styles and class attributes to
462 reference fonts. This variant is more compact than adding the
463 complete font information to each text element over and over again.
464 However, if you prefer direct font references, the default behavior
465 can be disabled with option --no-styles.
466
467 -O, --optimize[=modules]
468 Applies several optimizations on the generated SVG tree to reduce
469 the file size. The optimizations are performed by running separate
470 optimizer modules specified by optional argument modules. It may
471 consist of a single module name or a comma-separated list of
472 several module names. The corresponding modules are executed one by
473 one in the given order and thus transform the XML tree gradually.
474
475 The following list describes the currently available optimizer
476 modules.
477
478 list
479 Lists all available optimizer modules and exits.
480
481 none
482 If this argument is given, dvisvgm doesn’t apply any
483 optimization. none can’t be combined with other module names.
484
485 all
486 Performs all optimizations listed below. This is also the
487 default if option --optimize is used without argument. The
488 modules are executed in a predefined order that usually leads
489 to the best results. all can’t be combined with other module
490 names.
491
492 collapse-groups
493 Combines nested group elements (<g>...</g>) that contain only a
494 single group each. If possible, the group attributes are moved
495 to the outermost element of the processed subtree. This module
496 also unwraps group elements that have no attributes at all.
497
498 group-attributes
499 Creates groups (<g>...</g>) for common attributes around
500 adjacent elements. Each attribute is moved to a separate group
501 so that multiple common attributes lead to nested groups. They
502 can be combined by applying optimizer module collapse-groups
503 afterwards. The algorithm only takes inheritable properties,
504 such as fill or stroke-width, into account and only removes
505 them from an element if none of the other attributes, like id,
506 prevents this.
507
508 remove-clippath
509 Removes all redundant clipPath elements. This optimization was
510 already present in former versions of dvisvgm and was always
511 applied by default. This behavior is retained, i.e. dvisvgm
512 executes this module even if option --optimize is not given.
513 You can use argument none to prevent that.
514
515 simplify-text
516 If a text element only contains whitespace nodes and tspan
517 elements, all common inheritable attributes of the latter are
518 moved to the enclosing text element. All tspan elements without
519 further attributes are unwrapped.
520
521 simplify-transform
522 Tries to shorten all transform attributes. This module combines
523 the transformation commands of each attribute and decomposes
524 the resulting transformation matrix into a sequence of basic
525 transformations, i.e. translation, scaling, rotation, and
526 skewing. If this sequence is shorter than the equivalent matrix
527 expression, it’s assigned to the attribute. Otherwise, the
528 matrix expression is used.
529
530 -o, --output=pattern
531 Sets the pattern specifying the names of the generated SVG files.
532 Parameter pattern is a string that may contain static character
533 sequences as well as the variables %f, %p, %P, %hd, %ho, and %hc.
534 %f expands to the base name of the DVI file, i.e. the filename
535 without suffix, %p is the current page number, and %P the total
536 number of pages in the DVI file. An optional number (0-9) given
537 directly after the percent sign specifies the minimal number of
538 digits to be written. If a particular value consists of less
539 digits, the number is padded with leading zeros. Example: %3p
540 enforces 3 digits for the current page number (001, 002, etc.).
541 Without an explicit width specifier, %p gets the same number of
542 digits as %P.
543
544 If you need more control over the numbering, you can use arithmetic
545 expressions as part of a pattern. The syntax is %(expr) where expr
546 may contain additions, subtractions, multiplications, and integer
547 divisions with common precedence. The variables p and P contain the
548 current page number and the total number of pages, respectively.
549 For example, --output="%f-%(p-1)" creates filenames where the
550 numbering starts with 0 rather than 1.
551
552 The variables %hX contain different hash values computed from the
553 DVI page data and the options given on the command-line. %hd and
554 %hc are only set if option --page-hashes is present. Otherwise,
555 it’s empty. For further information, see the description of option
556 --page-hashes below.
557
558 The default pattern is %f-%p.svg if the DVI file consists of more
559 than one page, and %f.svg otherwise. That means, a DVI file foo.dvi
560 is converted to foo.svg if foo.dvi is a single-page document.
561 Otherwise, multiple SVG files foo-01.svg, foo-02.svg, etc. are
562 produced. In Windows environments, the percent sign indicates
563 dereferenced environment variables, and must therefore be protected
564 by a second percent sign, e.g. --output=%%f-%%p.
565
566 -p, --page=ranges
567 This option selects the pages to be processed. Parameter ranges
568 consists of a comma-separated list of single page numbers and/or
569 page ranges. A page range is a pair of numbers separated by a
570 hyphen, e.g. 5-12. Thus, a page sequence might look like this:
571 2-4,6,9-12,15. It doesn’t matter if a page is given more than once
572 or if page ranges overlap. dvisvgm always extracts the page numbers
573 in ascending order and converts them only once. In order to stay
574 compatible with previous versions, the default page sequence is 1.
575 dvisvgm therefore converts only the first page and not the whole
576 document if option --page is omitted. Usually, page ranges consist
577 of two numbers denoting the first and last page to be converted. If
578 the conversion should start at page 1, or if it should continue up
579 to the last DVI page, the first or second range number can be
580 omitted, respectively. Example: --page=-10 converts all pages up to
581 page 10, --page=10- converts all pages starting with page 10.
582 Please consider that the page values don’t refer to the page
583 numbers printed on the corresponding page. Instead, the physical
584 page count is expected, where the first page always gets number 1.
585
586 -H, --page-hashes[=params]
587 If this option is given, dvisvgm computes hash values of all pages
588 to be processed. As long as the page contents don’t change, the
589 hash value of that page stays the same. This property can be used
590 to determine whether a DVI page must be converted again or can be
591 skipped in consecutive runs of dvisvgm. This is done by propagating
592 the hash value to variable %hd which can be accessed in the output
593 pattern (see option --output). By default, dvisvgm changes the
594 output pattern to %f-%hd if option --page-hashes is given. As a
595 result, all SVG file names contain the hash value instead of the
596 page number. When calling dvisvgm again with option --page-hashes
597 with the same output pattern, it checks the existence of the SVG
598 file to be created and skips the conversion if it’s already
599 present. This also applies for consecutive calls of dvisvgm with
600 different command-line parameters. If you want to force another
601 conversion of a DVI file that hasn’t changed, you must remove the
602 corresponding SVG files beforehand or add the parameter replace
603 (see below). If you manually set the output pattern to not contain
604 a hash value, the conversion won’t be skipped.
605
606 Alternatively, the output pattern may contain the variables %ho and
607 %hc. %ho expands to a 32-bit hash representing the given
608 command-line options that affect the generated SVG output, like
609 --no-fonts and --precision. Different combinations of options and
610 parameters lead to different hashes. Thus pattern %f-%hd-%ho
611 creates filenames that change depending on the DVI data and the
612 given command-line options. Variable %hc provides a combined hash
613 computed from the DVI data and the command-line options. It has the
614 same length as %hd.
615
616 Since the page number isn’t part of the file name by default,
617 different DVI pages with identical contents get the same file name.
618 Therefore, only the first one is converted while the others are
619 skipped. To create separate files for each page, you can add the
620 page number to the output pattern, e.g. --output="%f-%p-%hc".
621
622 By default, dvisvgm uses the fast XXH64 hash algorithm to compute
623 the values provided through %hd and %hc. 64-bit hashes should be
624 sufficient for most documents with an average size of pages.
625 Alternatively, XXH32 and MD5 can be used as well. The desired
626 algorithm is specified by argument params of option --page-hashes.
627 It takes one of the strings MD5, XXH32, and XXH64, where the names
628 can be given in lower case too, like --page-hashes=md5. Since
629 version 0.7.1, xxHash provides an experimental 128-bit hash
630 function, whose algorithm may still change with the next versions
631 of the library. If the corresponding API is available, dvisvgm
632 supports the new hash function and option --page-hashes
633 additionally accepts the algorithm specifier XXH128.
634
635 Finally, option --page-hashes can take a second argument that must
636 be separated by a comma. Currently, only the two parameters list
637 and replace are evaluated, e.g. --page-hashes=md5,list or
638 --page-hashes=replace. When list is present, dvisvgm doesn’t
639 perform any conversion but just lists the hash values %hd and %hc
640 of the pages specified by option --page. Parameter replace forces
641 dvisvgm to convert a DVI page even if a file with the target name
642 already exists.
643
644 -P, --pdf
645 If this option is given, dvisvgm does not expect a DVI but a PDF
646 input file, and tries to convert it to SVG. Similar to the
647 conversion of DVI files, only the first page is processed by
648 default. Option --page can be used to select different pages, page
649 ranges, and/or page sequences. The conversion is realized by
650 creating a single pdffile special command which is forwarded to the
651 PostScript special handler. Therefore, this option is only
652 available if dvisvgm was built with PostScript support enabled, and
653 requires Ghostscript to be accessible. See option --libgs for
654 further information.
655
656 -d, --precision=digits
657 Specifies the maximal number of decimal places applied to
658 floating-point attribute values. All attribute values written to
659 the generated SVG file(s) are rounded accordingly. The parameter
660 digits accepts integer values from 0 to 6, where 0 enables the
661 automatic selection of significant decimal places. This is also the
662 default value if dvisvgm is called without option --precision.
663
664 --progress[=delay]
665 Enables a simple progress indicator shown when time-consuming
666 operations like PostScript specials are processed. The indicator
667 doesn’t appear before the given delay (in seconds) has elapsed. The
668 default delay value is 0.5 seconds.
669
670 -r, --rotate=angle
671 Rotates the page content clockwise by angle degrees around the page
672 center. This option is equivalent to -TRangle.
673
674 -R, --relative
675 SVG allows to define graphics paths by a sequence of absolute
676 and/or relative path commands, i.e. each command expects either
677 absolute coordinates or coordinates relative to the current drawing
678 position. By default, dvisvgm creates paths made up of absolute
679 commands. If option --relative is given, relative commands are
680 created instead. This slightly reduces the size of the SVG files in
681 most cases.
682
683 --stdin
684 Tells dvisvgm to read the DVI or EPS input data from stdin instead
685 from a file. Alternatively to option --stdin, a single dash (-) can
686 be given. The default name of the generated SVG file is stdin.svg
687 which can be changed with option --output.
688
689 -s, --stdout
690 Don’t write the SVG output to a file but redirect it to stdout.
691
692 --tmpdir[=path]
693 In some cases, dvisvgm needs to create temporary files to work
694 properly. These files go to the system’s temporary folder by
695 default, e.g. /tmp on Linux systems. Option --tmpdir allows to
696 specify a different location if necessary for some reason. Please
697 note that dvisvgm does not create this folder, so you must ensure
698 that it actually exists before running dvisvgm.
699
700 If the optional parameter path is omitted, dvisvgm prints the
701 location of the system’s temp folder and exits.
702
703 -a, --trace-all=[retrace]
704 This option forces dvisvgm to vectorize not only the glyphs
705 actually required to render the SVG file correctly – which is the
706 default –, but processes all glyphs of all fonts referenced in the
707 DVI file. Because dvisvgm stores the tracing results in a font
708 cache, all following conversions of these fonts will speed up
709 significantly. The boolean option retrace determines how to handle
710 glyphs already stored in the cache. By default, these glyphs are
711 skipped. Setting argument retrace to yes or true forces dvisvgm to
712 retrace the corresponding bitmaps again.
713
714 Note
715 This option only takes effect if font caching is active.
716 Therefore, --trace-all cannot be combined with option
717 --cache=none.
718
719 -T, --transform=commands
720 Applies a sequence of transformations to the SVG content. Each
721 transformation is described by a command beginning with a capital
722 letter followed by a list of comma-separated parameters. Following
723 transformation commands are supported:
724
725 T tx[,ty]
726 Translates (moves/shifts) the page in direction of vector
727 (tx,ty). If ty is omitted, ty=0 is assumed. The expected unit
728 length of tx and ty are TeX points (1pt = 1/72.27in). However,
729 there are several constants defined to simplify the unit
730 conversion (see below).
731
732 S sx[,sy]
733 Scales the page horizontally by sx and vertically by sy. If sy
734 is omitted, sy=sx is assumed.
735
736 R angle[,x,y]
737 Rotates the page clockwise by angle degrees around point (x,y).
738 If the optional arguments x and y are omitted, the page will be
739 rotated around its center depending on the chosen page format.
740 When option -bnone is given, the rotation center is origin
741 (0,0).
742
743 KX angle
744 Skews the page along the x-axis by angle degrees. Argument
745 angle can take any value except 90+180k, where k is an integer.
746
747 KY angle
748 Skews the page along the y-axis by angle degrees. Argument
749 angle can take any value except 90+180k, where k is an integer.
750
751 FH [y]
752 Mirrors (flips) the page at the horizontal line through point
753 (0,y). Omitting the optional argument leads to y=h/2, where h
754 denotes the page height (see pre-defined constants below).
755
756 FV [x]
757 Mirrors (flips) the page at the vertical line through point
758 (x,0). Omitting the optional argument leads to x=w/2, where w
759 denotes the page width (see pre-defined constants below).
760
761 M m1,...,m6
762 Applies a transformation described by the 3×3 matrix
763 ((m1,m2,m3),(m4,m5,m6),(0,0,1)), where the inner triples denote
764 the rows.
765
766 Note
767 All transformation commands of option -T, --transform are
768 applied in the order of their appearance. Multiple commands
769 can optionally be separated by spaces. In this case the
770 whole transformation string has to be enclosed in double
771 quotes to keep them together. All parameters are
772 expressions of floating point type. You can either give
773 plain numbers or arithmetic terms combined by the operators
774 + (addition), - (subtraction), * (multiplication), /
775 (division) or % (modulo) with common associativity and
776 precedence rules. Parentheses may be used as well.
777
778 Additionally, some pre-defined constants are provided:
779
780 ux horizontal position of
781 upper left page corner in
782 TeX point units
783 uy vertical position of upper
784 left page corner in TeX
785 point units
786 h page height in TeX point
787 units (0 in case of
788 -bnone)
789 w page width in TeX point
790 units (0 in case of
791 -bnone)
792
793 Furthermore, you can use the 9 length constants pt, bp, cm,
794 mm, in, pc, dd, cc, and sp, e.g. 2cm or 1.6in. Thus,
795 option -TT1in,0R45 moves the page content 1 inch to the
796 right and rotates it by 45 degrees around the page center
797 afterwards.
798
799 For single transformations, there are also the short-hand
800 options -c, -t and -r available. In contrast to the
801 --transform commands, the order of these options is not
802 significant, so that it’s not possible to describe
803 transformation sequences with them.
804
805 -t, --translate=tx[,ty]
806 Translates (moves) the page content in direction of vector (tx,ty).
807 This option is equivalent to -TTtx,ty.
808
809 -v, --verbosity=level
810 Controls the type of messages printed during a dvisvgm run:
811
812 0 no message output at all
813 1 error messages only
814 2 warning messages only
815 4 informational messages
816 only
817
818
819 Note
820 By adding these values you can combine the categories. The
821 default level is 7, i.e. all messages are printed.
822
823 -V, --version[=extended]
824 Prints the version of dvisvgm and exits. If the optional argument
825 is set to yes, the version numbers of the linked libraries are
826 printed as well.
827
828 -z, --zip[=level]
829 Creates a compressed SVG file with suffix .svgz. The optional
830 argument specifies the compression level. Valid values are in the
831 range of 1 to 9 (default value is 9). Larger values cause better
832 compression results but may take slightly more computation time.
833
834 -Z, --zoom=factor
835 Multiplies the values of the width and height attributes of the SVG
836 root element by argument factor while the coordinate system of the
837 graphic content is retained. As a result, most SVG viewers zoom the
838 graphics accordingly. If a negative zoom factor is given, the width
839 and height attributes are omitted.
840
842 dvisvgm supports several sets of special commands that can be used to
843 enrich DVI files with additional features, like color, graphics, and
844 hyperlinks. The evaluation of special commands is delegated to
845 dedicated handlers provided by dvisvgm. Each handler is responsible for
846 all special statements of the same command set, i.e. commands beginning
847 with the same prefix. To get a list of the actually provided special
848 handlers, use option --list-specials (see above). This section gives an
849 overview of the special commands currently supported.
850
851 bgcolor
852 Special statement for changing the background/page color. Since SVG
853 1.1 doesn’t support background colors, dvisvgm inserts a rectangle
854 of the chosen color into the generated SVG document. This rectangle
855 always gets the same size as the selected or computed bounding box.
856 This background color command is part of the color special set but
857 is handled separately in order to let the user turn it off. For an
858 overview of the command syntax, see the documentation of dvips, for
859 instance.
860
861 color
862 Statements of this command set provide instructions to change the
863 text/paint color. For an overview of the exact syntax, see the
864 documentation of dvips, for instance.
865
866 dvisvgm
867 dvisvgm offers its own small set of specials. The following list
868 gives a brief overview.
869
870 dvisvgm:raw text
871 Adds an arbitrary sequence of XML nodes to the page section of
872 the SVG document. dvisvgm checks syntax and proper nesting of
873 the inserted elements but does not perform any validation, thus
874 the user has to ensure that the resulting SVG is still valid.
875 Opening and closing tags may be distributed among different raw
876 specials. The tags themselves can also be split but must be
877 continued with the immediately following raw special. Both
878 syntactically incorrect and wrongly nested tags lead to error
879 messages. Parameter text may also contain the expressions {?x},
880 {?y}, {?color}, and {?matrix} that expand to the current x or y
881 coordinate, the current color, and current transformation
882 matrix, respectively. Character sequence {?nl} expands to a
883 newline character. Finally, constructions of the form {?(expr)}
884 enable the evaluation of mathematical expressions which may
885 consist of basic arithmetic operations including modulo. Like
886 above, the variables x and y represent the current coordinates.
887 Example: {?(-10*(x+2y)-5)}.
888
889 dvisvgm:rawdef text
890 This command is similar to dvisvgm:raw, but puts the XML nodes
891 into the <defs> section of the SVG document currently being
892 generated.
893
894 dvisvgm:rawset name ... dvisvgm:endrawset
895 This pair of specials marks the begin and end of a definition
896 of a named raw SVG fragment. All dvisvgm:raw and dvisvgm:rawdef
897 specials enclosed by dvisvgm:rawset and dvisvgm:endrawset are
898 not evaluated immediately but stored together under the given
899 name for later use. Once defined, the named fragment can be
900 referenced throughout the DVI file by dvisvgm:rawput (see
901 below). The two commands dvisvgm:rawset and dvisvgm:endrawset
902 must not be nested, i.e. each call of dvisvgm:rawset has to be
903 followed by a corresponding call of dvisvgm:endrawset before
904 another dvisvgm:rawset may occur. Also, the identifier name
905 must be unique throughout the DVI file. Using dvisvgm:rawset
906 multiple times together with the same name leads to warning
907 messages.
908
909 dvisvgm:rawput name
910 Inserts raw SVG fragments previously stored under the given
911 name. dvisvgm distinguishes between fragments that were
912 specified with dvisvgm:raw or dvisvgm:rawdef, and handles them
913 differently: It inserts all dvisvgm:raw parts every time
914 dvisvgm:rawput is called, whereas the dvisvgm:rawdef portions
915 go to the <defs> section of the current SVG document only once.
916
917 dvisvgm:img width height file
918 Creates an image element at the current graphic position
919 referencing the given file. JPEG, PNG, and SVG images can be
920 used here. However, dvisvgm does not check the file format or
921 the file name suffix. The lengths width and height can be given
922 together with a unit specifier (see option --bbox) or as plain
923 floating point numbers. In the latter case, TeX point units are
924 assumed (1in = 72.27pt).
925
926 dvisvgm:bbox lock
927 Locks the bounding box of the current page and prevents it from
928 further updating, i.e. graphics elements added after calling
929 this special are not taken into account in determining the
930 extent of the bounding box.
931
932 dvisvgm:bbox unlock
933 Unlocks the previously locked bounding box of the current page
934 so that it gets updated again when adding graphics elements to
935 the page.
936
937 dvisvgm:bbox n[ew] name
938 Defines or resets a local bounding box called name. The name
939 may consist of letters and digits. While processing a DVI page,
940 dvisvgm continuously updates the (global) bounding box of the
941 current page in order to determine the minimal rectangle
942 containing all visible page components (characters, images,
943 drawing elements etc.) Additionally to the global bounding box,
944 the user can request an arbitrary number of named local
945 bounding boxes. Once defined, these boxes are updated together
946 with the global bounding box starting with the first character
947 that follows the definition. Thus, the local boxes can be used
948 to compute the extent of parts of the page. This is useful for
949 scenarios where the generated SVG file is post-processed. In
950 conjunction with special dvisvgm:raw, the macro {?bbox name}
951 expands to the four values x, y, w, and h (separated by spaces)
952 specifying the coordinates of the upper left corner, width, and
953 height of the local box name. If box name wasn’t previously
954 defined, all four values equal to zero.
955
956 dvisvgm:bbox width height [depth] [transform]
957 Updates the bounding box of the current page by embedding a
958 virtual rectangle (x, y, width, height) where the lower left
959 corner is located at the current DVI drawing position (x,y). If
960 the optional parameter depth is specified, dvisvgm embeds a
961 second rectangle (x, y, width, -depth). The lengths width,
962 height, and depth can be given together with a unit specifier
963 (see option --bbox) or as plain floating point numbers. In the
964 latter case, TeX point units are assumed (1in = 72.27pt).
965 Depending on size and position of the virtual rectangle, this
966 command either enlarges the overall bounding box or leaves it
967 as is. It’s not possible to reduce its extent. This special
968 should be used together with dvisvgm:raw in order to update the
969 viewport of the page properly. By default, the box extents are
970 assigned unchanged and, in particular, are not altered by
971 transformation commands. In order to apply the current
972 transformation matrix, the optional modifier transform can be
973 added at the end of the special statement.
974
975 dvisvgm:bbox a[bs] x1 y1 x2 y2 [transform]
976 This variant of the bbox special updates the bounding box by
977 embedding a virtual rectangle (x1,y1,x2,y2). The points (x1,y1)
978 and (x2,y2) denote the absolute coordinates of two diagonal
979 corners of the rectangle. As with the relative special variant
980 described above, the optional modifier transform allows for
981 applying the current transformation matrix to the bounding box.
982
983 dvisvgm:bbox f[ix] x1 y1 x2 y2 [transform]
984 This variant of the bbox special assigns an absolute (final)
985 bounding box to the resulting SVG. After executing this
986 command, dvisvgm doesn’t further alter the bounding box
987 coordinates, except this special is called again later. The
988 points (x1,y1) and (x2,y2) denote the absolute coordinates of
989 two diagonal corners of the rectangle. As with the relative
990 special variant described above, the optional modifier
991 transform allows for applying the current transformation matrix
992 to the bounding box.
993
994 The following TeX snippet adds two raw SVG elements to the
995 output and updates the bounding box accordingly:
996
997 \special{dvisvgm:raw <circle cx='{?x}' cy='{?y}' r='10' stroke='black' fill='red'/>}%
998 \special{dvisvgm:bbox 10bp 10bp 10bp transform}%
999 \special{dvisvgm:bbox -10bp 10bp 10bp transform}
1000
1001 \special{dvisvgm:raw <path d='M50 200 L10 250 H100 Z' stroke='black' fill='blue'/>}%
1002 \special{dvisvgm:bbox abs 10bp 200bp 100bp 250bp transform}
1003
1004 em
1005 These specials were introduced with the emTeX distribution by
1006 Eberhard Mattes. They provide line drawing statements, instructions
1007 for embedding MSP, PCX, and BMP image files, as well as two PCL
1008 commands. dvisvgm supports only the line drawing statements and
1009 ignores all other em specials silently. A description of the
1010 command syntax can be found in the DVI driver documentation coming
1011 with emTeX (https://ctan.org/pkg/emtex).
1012
1013 html
1014 The hyperref specification defines several variants on how to mark
1015 hyperlinked areas in a DVI file. dvisvgm supports the plain
1016 HyperTeX special constructs as created with hyperref package option
1017 hypertex. By default, all linked areas of the document are marked
1018 by a rectangle. Option --linkmark allows to change this behavior.
1019 See above for further details. Information on syntax and semantics
1020 of the HyperTeX specials can be found in the hyperref manual
1021 (https://ctan.org/pkg/hyperref).
1022
1023 papersize
1024 The papersize special, which is an extension introduced by dvips,
1025 can be used to specify the widths and heights of the pages in the
1026 DVI file. It affects the page it appears on as well as all
1027 following pages until another papersize special is found. If there
1028 is more than one papersize special present on a page, dvisvgm
1029 applies the last one. However, in order to stay compatible with
1030 previous versions of dvisvgm that did not evaluate these specials,
1031 their processing must be explicitly enabled by adding option
1032 --bbox=papersize on the command-line. Otherwise, dvisvgm ignores
1033 them and computes tight bounding boxes.
1034
1035 pdf
1036 pdfTeX and dvipdfmx introduced several special commands related to
1037 the generation of PDF files. Currently, only pdf:mapfile,
1038 pdf:mapline, pdf:pagesize, and PDF hyperlink specials are supported
1039 by dvisvgm. The latter are the PDF pendants to the HTML HyperTeX
1040 specials generated by the hyperref package in PDF mode.
1041
1042 pdf:pagesize is similar to the papersize special (see above) which
1043 specifies the size of the current and all folowing pages. In order
1044 to actually apply the extents to the generated SVG files, option
1045 --bbox=papersize must be given.
1046
1047 pdf:mapfile and pdf:mapline allow for modifying the font map tree
1048 while processing the DVI file. They are used by CTeX, for example.
1049 dvisvgm supports both, the dvips and dvipdfm font map format. For
1050 further information on the command syntax and semantics, see the
1051 documentation of \pdfmapfile in the pdfTeX user manual
1052 (https://ctan.org/pkg/pdftex).
1053
1054 ps
1055 The famous DVI driver dvips
1056 (https://www.tug.org/texinfohtml/dvips.html) introduced its own set
1057 of specials in order to embed PostScript code into DVI files, which
1058 greatly improves the capabilities of DVI documents. One aim of
1059 dvisvgm is to completely evaluate all PostScript fragments and to
1060 convert as many of them as possible to SVG. In contrast to dvips,
1061 dvisvgm uses floating point arithmetics to compute the precise
1062 position of each graphic element, i.e. it doesn’t round the
1063 coordinates. Therefore, the relative locations of the graphic
1064 elements may slightly differ from those computed by dvips.
1065
1066 Since PostScript is a rather complex language, dvisvgm does not
1067 implement its own PostScript interpreter but relies on Ghostscript
1068 (https://ghostscript.com) instead. If the Ghostscript library was
1069 not linked to the dvisvgm binary, it is looked up and loaded
1070 dynamically during runtime. In this case, dvisvgm looks for
1071 libgs.so.X on Unix-like systems (supported ABI versions: 7,8,9),
1072 for libgs.X.dylib on macOS, and for gsdll32.dll or gsdll64.dll on
1073 Windows. You can override the default file names with environment
1074 variable LIBGS or the command-line option --libgs. The library must
1075 be reachable through the ld search path (*nix) or the PATH
1076 environment variable (Windows). Alternatively, the absolute file
1077 path can be specified. If the library cannot be found, dvisvgm
1078 disables the processing of PostScript specials and prints a warning
1079 message. Use option --list-specials to check whether PostScript
1080 support is available, i.e. entry ps is present.
1081
1082 The PostScript handler also recognizes and evaluates bounding box
1083 data generated by the preview package
1084 (https://ctan.org/pkg/preview) with option tightpage. If such data
1085 is present in the DVI file and if dvisvgm is called with option
1086 --bbox=preview, dvisvgm sets the width and total height of the SVG
1087 file to the values derived from the preview data. Additionally, it
1088 prints a message showing the width, height, and depth of the box in
1089 TeX point units to the console. Especially, the depth value can be
1090 read by a post-processor to vertically align the SVG graphics with
1091 the baseline of surrounding text in HTML or XSL-FO documents, for
1092 example. Please note that SVG bounding boxes are defined by a width
1093 and (total) height. In contrast to TeX, SVG provides no means to
1094 differentiate between height and depth, i.e. the vertical extents
1095 above and below the baseline, respectively. Therefore, it is
1096 generally not possible to retrieve the depth value from the SVG
1097 file itself.
1098
1099 If you call dvisvgm with option --bbox=min (the default) and
1100 preview data is present in the DVI file, dvisvgm doesn’t apply the
1101 preview extents but computes a bounding box that tightly encloses
1102 the page contents. The height, depth and width values written to
1103 console are adapted accordingly.
1104
1105 tpic
1106 The TPIC special set defines instructions for drawing simple
1107 geometric objects. Some LaTeX packages, like eepic and tplot, use
1108 these specials to describe graphics.
1109
1111 dvisvgm file
1112 Converts the first page of file.dvi to file.svg.
1113
1114 dvisvgm -p1-5 file
1115 Converts the first five pages of file.dvi to
1116 file-1.svg,...,file-5.svg.
1117
1118 dvisvgm -p1- file
1119 Converts all pages of file.dvi to separate SVG files.
1120
1121 dvisvgm -p1,3 -O file
1122 Converts the first and third page of file.dvi to optimized SVG
1123 files.
1124
1125 dvisvgm - < file.dvi
1126 Converts the first page of file.dvi to stdin.svg where the contents
1127 of file.dvi is read from stdin.
1128
1129 dvisvgm -z file
1130 Converts the first page of file.dvi to file.svgz with default
1131 compression level 9.
1132
1133 dvisvgm -p5 -z3 -ba4-l -o newfile file
1134 Converts the fifth page of file.dvi to newfile.svgz with
1135 compression level 3. The bounding box is set to DIN/ISO A4 in
1136 landscape format.
1137
1138 dvisvgm --transform="R20,w/3,2h/5 T1cm,1cm S2,3" file
1139 Converts the first page of file.dvi to file.svg where three
1140 transformations are applied.
1141
1143 dvisvgm uses the kpathsea library for locating the files that it opens.
1144 Hence, the environment variables described in the library’s
1145 documentation influence the converter.
1146
1147 If dvisvgm was linked without the Ghostscript library, and if
1148 PostScript support has not been disabled, the shared Ghostscript
1149 library is looked up during runtime via dlopen(). The environment
1150 variable LIBGS can be used to specify path and file name of the
1151 library.
1152
1153 The pre-compiled Windows versions of dvisvgm require a working
1154 installation of MiKTeX 2.9 or above. dvisvgm does not work together
1155 with the portable edition of MiKTeX because it relies on MiKTeX’s COM
1156 interface that is only accessible in a local installation. To enable
1157 the evaluation of PostScript specials, the original Ghostscript DLL
1158 gsdll32.dll must be present and reachable through the search path.
1159 64-bit Windows builds require the 64-bit Ghostscript DLL gsdll64.dll.
1160 Both DLLs come with the corresponding Ghostscript installers available
1161 from https://ghostscript.com.
1162
1163 The environment variable DVISVGM_COLORS specifies the colors used to
1164 highlight various parts of dvisvgm’s message output. It is only
1165 evaluated if option --color is given. The value of DVISVGM_COLORS is a
1166 list of colon-separated entries of the form gg=BF, where gg denotes one
1167 of the color group indicators listed below, and BF are two hexadecimal
1168 digits specifying the background (first digit) and foreground/text
1169 color (second digit). The color values are defined as follows: 0=black,
1170 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=gray, 8=bright
1171 red, 9=bright green, A=bright yellow, B=bright blue, C=bright magenta,
1172 D=bright cyan, E=bright gray, F=white. Depending on the terminal, the
1173 colors may differ. Rather than changing both the text and background
1174 color, it’s also possible to change only one of them: An asterisk (*)
1175 in place of a hexadecimal digit indicates the default text or
1176 background color of the terminal.
1177
1178 All malformed entries in the list are silently ignored.
1179
1180
1181 er error messages
1182
1183 wn warning messages
1184
1185 pn messages about page
1186 numbers
1187
1188
1189
1190 ps page size messages
1191
1192 fw information about the
1193 files written
1194
1195 sm state messages
1196
1197 tr messages of the glyph
1198 tracer
1199
1200 pi progress indicator
1201
1202
1203 Example: er=01:pi=*5 sets the colors of error messages (er) to red (1)
1204 on black (0), and those of progress indicators (pi) to cyan (5) on
1205 default background (*).
1206
1208 The location of the following files is determined by the kpathsea
1209 library. To check the actual kpathsea configuration you can use the
1210 kpsewhich utility.
1211
1212
1213 *.enc Font encoding files
1214
1215 *.fgd Font glyph data files
1216 (cache files created by
1217 dvisvgm)
1218
1219 *.map Font map files
1220
1221 *.mf Metafont input files
1222
1223 *.pfb PostScript Type 1 font
1224 files
1225
1226 *.pro PostScript header/prologue
1227 files
1228
1229 *.tfm TeX font metric files
1230
1231 *.ttf TrueType font files
1232
1233 *.vf Virtual font files
1234
1235
1237 tex(1), mf(1), mktexmf(1), grodvi(1), potrace(1), and the kpathsea
1238 library info documentation.
1239
1241 Project home page
1242 https://dvisvgm.de
1243
1244 Code repository
1245 https://github.com/mgieseki/dvisvgm
1246
1248 Please report bugs using the bug tracker at GitHub
1249 (https://github.com/mgieseki/dvisvgm/issues).
1250
1252 Written by Martin Gieseking <martin.gieseking@uos.de>
1253
1255 Copyright © 2005-2020 Martin Gieseking. Free use of this software is
1256 granted under the terms of the GNU General Public License (GPL) version
1257 3 or, (at your option) any later version.
1258
1259
1260
1261dvisvgm 2.9.1 2020-03-19 DVISVGM(1)