summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/man/man1/dvisvgm.1
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/man/man1/dvisvgm.1')
-rw-r--r--Master/texmf-dist/doc/man/man1/dvisvgm.1385
1 files changed, 283 insertions, 102 deletions
diff --git a/Master/texmf-dist/doc/man/man1/dvisvgm.1 b/Master/texmf-dist/doc/man/man1/dvisvgm.1
index 39685ee890d..29973c7a633 100644
--- a/Master/texmf-dist/doc/man/man1/dvisvgm.1
+++ b/Master/texmf-dist/doc/man/man1/dvisvgm.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: dvisvgm
.\" Author: Martin Gieseking <martin.gieseking@uos.de>
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 04/19/2016
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: 01/15/2019
.\" Manual: dvisvgm Manual
-.\" Source: dvisvgm 1.15.1
+.\" Source: dvisvgm 2.6.2
.\" Language: English
.\"
-.TH "DVISVGM" "1" "04/19/2016" "dvisvgm 1\&.15\&.1" "dvisvgm Manual"
+.TH "DVISVGM" "1" "01/15/2019" "dvisvgm 2\&.6\&.2" "dvisvgm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -33,10 +33,12 @@ dvisvgm \- converts DVI and EPS files to the XML\-based SVG format
.sp
\fBdvisvgm\fR [ \fIoptions\fR ] \fIfile\fR [\&.dvi]
.sp
-\fBdvisvgm\fR \-E [ \fIoptions\fR ] \fIfile\fR [\&.eps]
+\fBdvisvgm\fR \-\-eps [ \fIoptions\fR ] \fIfile\fR [\&.eps]
+.sp
+\fBdvisvgm\fR \-\-pdf [ \fIoptions\fR ] \fIfile\fR [\&.pdf]
.SH "DESCRIPTION"
.sp
-The command\-line utility \fBdvisvgm\fR converts DVI files, as generated by TeX/LaTeX, to the XML\-based scalable vector graphics format SVG\&. It supports the classic DVI format 2 as well as format 3 (created by pTeX in vertical mode), and the XeTeX formats 5 and 6 which are also known as XDV\&. Besides the basic DVI commands, dvisvgm also evaluates many so\-called \fIspecials\fR which heavily extend the capabilities of the plain DVI format\&. For a more detailed overview, see section \fBSupported Specials\fR below\&.
+The command\-line utility \fBdvisvgm\fR converts DVI files, as generated by TeX/LaTeX, to the XML\-based scalable vector graphics format SVG\&. It supports the classic DVI version 2 as well as version 3 (created by pTeX in vertical mode), and the XeTeX versions 5 to 7 which are also known as XDV\&. Besides the basic DVI commands, dvisvgm also evaluates many so\-called \fIspecials\fR which heavily extend the capabilities of the plain DVI format\&. For a more detailed overview, see section \fBSupported Specials\fR below\&.
.sp
Since the current SVG standard 1\&.1 doesn\(cqt specify multi\-page graphics, dvisvgm creates separate SVG files for each DVI page\&. Because of compatibility reasons, only the first page is converted by default\&. In order to select a different page or arbitrary page sequences, use option \fB\-p\fR which is described below\&.
.sp
@@ -44,41 +46,10 @@ SVG is a vector\-based graphics format and therefore dvisvgm tries to convert th
.sp
However, TeX\(cqs main source for font descriptions is Metafont, which produces bitmap output (GF files)\&. That\(cqs why not all obtainable TeX fonts are available in a scalable format\&. In these cases, dvisvgm tries to vectorize Metafont\(cqs output by tracing the glyph bitmaps\&. The results are not as perfect as most (manually optimized) PFB or OTF counterparts, but are nonetheless really nice in most cases\&.
.sp
-When running dvisvgm without option \fB\-\-no\-fonts\fR, it creates \fIfont\fR elements (\fB<font>\fR\&...\fB</font>\fR) to embed the font data into the SVG files\&. Unfortunately, only few SVG renderes support these elements yet\&. Most web browsers and vector graphics applications don\(cqt evaluate them properly so that the text components of the resulting graphics might look strange\&. In order to create more compatible SVG files, command\-line option \fB\-\-no\-fonts\fR can be given to replace the font elements by plain graphics paths\&.
+When running dvisvgm without option \fB\-\-no\-fonts\fR, it creates \fIfont\fR elements (\fB<font>\fR\&...\fB</font>\fR) to embed the font data into the SVG files\&. Unfortunately, only few SVG renderers support these elements yet\&. Most web browsers and vector graphics applications don\(cqt evaluate them properly so that the text components of the resulting graphics might look strange\&. In order to create more compatible SVG files, command\-line option \fB\-\-no\-fonts\fR can be given to replace the font elements by plain graphics paths\&.
.SH "OPTIONS"
.sp
-dvisvgm provides a POSIX\-compliant command\-line interface with short and long option names\&. They may be given before and/or after the name of the file to be converted\&. Also, the order of specifying the options is not significant, i\&.e\&. you can add them in any order without changing dvisvgm\(cqs behavior\&. Certain options accept or require additional parameters which are directly appended to or separated by whitespace from a short option (e\&.g\&. \fB\-v0\fR or \fB\-v 0\fR)\&. Long options require an additional equals sign (\fB=\fR) between option name and argument but without any surrounding whitespace (e\&.g\&. \fB\-\-verbosity=0\fR)\&.
-.PP
-\fB\-a, \-\-trace\-all\fR=[\fIretrace\fR]
-.RS 4
-This option forces dvisvgm to vectorize not only the glyphs actually required to render the SVG file correctly \(en which is the default \(en, but processes all glyphs of all fonts referenced in the DVI file\&. Because dvisvgm stores the tracing results in a font cache, all following conversions of these fonts will speed up significantly\&. The boolean option
-\fIretrace\fR
-determines how to handle glyphs already stored in the cache\&. By default, these glyphs are skipped\&. Setting argument
-\fIretrace\fR
-to
-\fIyes\fR
-or
-\fItrue\fR
-forces dvisvgm to retrace the corresponding bitmaps again\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-This option only takes effect if font caching is active\&. Therefore,
-\fB\-\-trace\-all\fR
-cannot be combined with option
-\fB\-\-cache=none\fR\&.
-.sp .5v
-.RE
-.RE
+dvisvgm provides a POSIX\-compliant command\-line interface with short and long option names\&. They may be given before and/or after the name of the file to be converted\&. Also, the order of specifying the options is not significant, i\&.e\&. you can add them in any order without changing dvisvgm\(cqs behavior\&. Certain options accept or require additional parameters which are directly appended to or separated by whitespace from a short option (e\&.g\&. \fB\-v0\fR or \fB\-v 0\fR)\&. Long options require an additional equals sign (\fB=\fR) between option name and argument but without any surrounding whitespace (e\&.g\&. \fB\-\-verbosity=0\fR)\&. Multiple short options that don\(cqt expect a further parameter can be combined after a single dash (e\&.g\&. \fB\-ejs\fR rather than \fB\-e \-j \-s\fR)\&.
.PP
\fB\-b, \-\-bbox\fR=\fIfmt\fR
.RS 4
@@ -89,7 +60,7 @@ takes either one of the format specifiers listed below, or a sequence of four co
\fIy1\fR,
\fIx2\fR
and
-\fIy2\fR\&. The latter define the absolute coordinates of two diagonal corners of the bounding box\&. Each length value consists of a floating point number and an optional length unit (pt, bp, cm, mm, in, or pc)\&. If the unit is omitted, TeX points (pt) are assumed\&.
+\fIy2\fR\&. The latter define the absolute coordinates of two diagonal corners of the bounding box\&. Each length value consists of a floating point number and an optional length unit (pt, bp, cm, mm, in, pc, dd, cc, or sp)\&. If the unit is omitted, TeX points (pt) are assumed\&.
.sp
It\(cqs also possible to give only one length value
\fIl\fR\&. In this case, the minimal bounding box is computed and enlarged by adding (\-\fIl\fR,\-\fIl\fR) to the upper left and (\fIl\fR,\fIl\fR) to the lower right corner\&.
@@ -115,6 +86,7 @@ tab(:);
lt lt
lt lt
lt lt
+lt lt
lt lt.
T{
\fBdvi\fR
@@ -132,9 +104,16 @@ T}:T{
no bounding box is assigned
T}
T{
+\fBpapersize\fR
+T}:T{
+box sizes specified by
+\fIpapersize\fR
+specials present in the DVI file
+T}
+T{
\fBpreview\fR
T}:T{
-bounding box data computed by the preview package (if present in the dvi file)
+bounding box data computed by the preview package (if present in the DVI file)
T}
.TE
.sp 1
@@ -204,7 +183,7 @@ attribute\&.
.PP
\fB\-\-color\fR
.RS 4
-Enables colorization of messages printed during the conversion process\&. The colors can be customized via the environment variable
+Enables colorization of messages printed during the conversion process\&. The colors can be customized via environment variable
\fBDVISVGM_COLORS\fR\&. See the
Environment section
below for further information\&.
@@ -242,12 +221,36 @@ This option tells dvisvgm to compute the precise bounding box of each character\
given, dvisvgm analyzes the actual shape of each character and derives a usually tight bounding box\&.
.RE
.PP
+\fB\-f, \-\-font\-format\fR=\fIformat\fR
+.RS 4
+Selects the file format used to embed the font data into the SVG files\&. Following formats are supported:
+\fBSVG\fR
+(that\(cqs the default),
+\fBTTF\fR
+(TrueType),
+\fBWOFF\fR, and
+\fBWOFF2\fR
+(Web Open Font Format version 1 and 2)\&. By default, dvisvgm creates unhinted fonts that might look bad on low\-resolution devices\&. In order to improve the display quality, the generated TrueType, WOFF, or WOFF2 fonts can be autohinted\&. The autohinter is enabled by appending
+\fB,autohint\fR
+or
+\fB,ah\fR
+to the font format, e\&.g\&.
+\fB\-\-font\-format=woff,autohint\fR
+or
+\fB\-\-font\-format=woff,ah\fR\&.
+.sp
+Option
+\fB\-\-font\-format\fR
+is only available if dvisvgm was built with WOFF support enabled\&.
+.RE
+.PP
\fB\-m, \-\-fontmap\fR=\fIfilenames\fR
.RS 4
Loads and evaluates a single font map file or a sequence of font map files\&. These files are required to resolve font file names and encodings\&. dvisvgm does not provide its own map files but tries to read available ones coming with dvips or dvipdfm\&. If option
\fB\-\-fontmap\fR
is omitted, dvisvgm looks for the default map files
\fIps2pk\&.map\fR,
+\fIpdftex\&.map\fR,
\fIdvipdfm\&.map\fR, and
\fIpsfonts\&.map\fR
(in this order)\&. Otherwise, the files as option arguments are evaluated in the given order\&. Multiple filenames must be separated by commas without leading and/or trailing whitespace\&. By default, redefined mappings do not replace previous ones\&. However, each filename can be preceded by an optional mode specifier (\fB+\fR,
@@ -326,7 +329,7 @@ parameter is an integer value between 0 and 2\&. It selects the display variant
.PP
\fB\-\-keep\fR
.RS 4
-Disables the removal of temporary files as created by Metafont (usually \&.gf, \&.tfm, and \&.log files)\&.
+Disables the removal of temporary files as created by Metafont (usually \&.gf, \&.tfm, and \&.log files) or the TrueType/WOFF module\&.
.RE
.PP
\fB\-\-libgs\fR=\fIfilename\fR
@@ -366,7 +369,7 @@ tells dvisvgm not to add any visible objects to hyperlinks\&. The lines and boxe
\fIcolor specifier\fR
is either a hexadecimal RGB value of the form
\fI#RRGGBB\fR, or a
-dvips color name (\m[blue]http://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips\m[])\&.
+dvips color name (\m[blue]https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips\m[])\&.
.sp
Moreover, argument
\fIstyle\fR
@@ -383,10 +386,11 @@ creates yellow filled rectangles with blue frames\&.
.PP
\fB\-l, \-\-list\-specials\fR
.RS 4
-Prints a list of registered special handlers and exits\&. Each handler processes a set of special statements belonging to the same category\&. In most cases, the categories are identified by the prefix of the special statements\&. It\(cqs usually a leading word separated from the rest of the statement by a colon or a blank, e\&.g\&.
+Prints a list of registered special handlers and exits\&. Each handler processes a set of special statements belonging to the same category\&. In most cases, the categories are identified by the prefix of the special statements\&. It\(cqs usually a leading string followed by a colon or a blank, e\&.g\&.
\fIcolor\fR
or
-\fIps\fR\&.
+\fIps\fR\&. The listed handler names, however, don\(cqt need to match these prefixes, e\&.g\&. if there is no common prefix or if functionality is split into separate handlers in order to allow to disable them separately with option
+\fB\-\-no\-specials\fR\&. All special statements not covered by one of the special handlers are silently ignored\&.
.RE
.PP
\fB\-M, \-\-mag\fR=\fIfactor\fR
@@ -450,9 +454,8 @@ and vertically by
.RS 4
Disable processing of special commands embedded in the DVI file\&. If no further parameter is given, all specials are ignored\&. To disable a selected set of specials, an optional comma\-separated list of names can be appended to this option\&. A
\fIname\fR
-is the unique identifier referencing the intended special handler\&. Option
-\fB\-\-list\-specials\fR
-lists all handlers currently available together with their names\&. All unsupported special statements are silently ignored\&.
+is the unique identifier referencing the intended special handler as listed by option
+\fB\-\-list\-specials\fR\&.
.RE
.PP
\fB\-\-no\-styles\fR
@@ -467,8 +470,11 @@ Sets the pattern specifying the names of the generated SVG files\&. Parameter
\fIpattern\fR
is a string that may contain static character sequences as well as the variables
\fB%f\fR,
-\fB%p\fR, and
-\fB%P\fR\&.
+\fB%p\fR,
+\fB%P\fR,
+\fB%hd\fR,
+\fB%ho\fR, and
+\fB%hc\fR\&.
\fB%f\fR
expands to the base name of the DVI file, i\&.e\&. the filename without suffix,
\fB%p\fR
@@ -482,7 +488,7 @@ gets the same number of digits as
\fB%P\fR\&.
.sp
If you need more control over the numbering, you can use arithmetic expressions as part of a pattern\&. The syntax is
-\fB%(expr)\fR
+\fB%(\fR\fIexpr\fR\fB)\fR
where
\fIexpr\fR
may contain additions, subtractions, multiplications, and integer divisions with common precedence\&. The variables
@@ -493,6 +499,18 @@ contain the current page number and the total number of pages, respectively\&. F
\fB\-\-output="%f\-%(p\-1)"\fR
creates filenames where the numbering starts with 0 rather than 1\&.
.sp
+The variables
+\fB%hX\fR
+contain different hash values computed from the DVI page data and the options given on the command\-line\&.
+\fB%hd\fR
+and
+\fB%hc\fR
+are only set if option
+\fB\-\-page\-hashes\fR
+is present\&. Otherwise, it\(cqs empty\&. For further information, see the description of option
+\fB\-\-page\-hashes\fR
+below\&.
+.sp
The default pattern is
\fB%f\-%p\&.svg\fR
if the DVI file consists of more than one page, and
@@ -522,15 +540,92 @@ converts all pages up to page 10,
converts all pages starting with page 10\&. Please consider that the page values don\(cqt refer to the page numbers printed on the corresponding page\&. Instead, the physical page count is expected, where the first page always gets number 1\&.
.RE
.PP
+\fB\-H, \-\-page\-hashes\fR[=\fIparams\fR]
+.RS 4
+If this option is given, dvisvgm computes hash values of all pages to be processed\&. As long as the page contents don\(cqt change, the hash value of that page stays the same\&. This property can be used to determine whether a DVI page must be converted again or can be skipped in consecutive runs of dvisvgm\&. This is done by propagating the hash value to variable
+\fB%hd\fR
+which can be accessed in the output pattern (see option
+\fB\-\-output\fR)\&. By default, dvisvgm changes the output pattern to
+\fB%f\-%hd\fR
+if option
+\fB\-\-page\-hashes\fR
+is given\&. As a result, all SVG file names contain the hash value instead of the page number\&. When calling dvisvgm again with option
+\fB\-\-page\-hashes\fR
+with the same output pattern, it checks the existence of the SVG file to be created and skips the conversion if it\(cqs already present\&. This also applies for consecutive calls of dvisvgm with different command\-line parameters\&. If you want to force another conversion of a DVI file that hasn\(cqt changed, you must remove the corresponding SVG files beforehand or add the parameter
+\fBreplace\fR
+(see below)\&. If you manually set the output pattern to not contain a hash value, the conversion won\(cqt be skipped\&.
+.sp
+Alternatively, the output pattern may contain the variables
+\fB%ho\fR
+and
+\fB%hc\fR\&.
+\fB%ho\fR
+expands to a 32\-bit hash representing the given command\-line options that affect the generated SVG output, like
+\fB\-\-no\-fonts\fR
+and
+\fB\-\-precision\fR\&. Different combinations of options and parameters lead to different hashes\&. Thus pattern
+\fB%f\-%hd\-%ho\fR
+creates filenames that change depending on the DVI data and the given command\-line options\&. Variable
+\fB%hc\fR
+provides a combined hash computed from the DVI data and the command\-line options\&. It has the same length as
+\fB%hd\fR\&.
+.sp
+Since the page number isn\(cqt part of the file name by default, different DVI pages with identical contents get the same file name\&. Therefore, only the first one is converted while the others are skipped\&. To create separate files for each page, you can add the page number to the output pattern, e\&.g\&.
+\fB\-\-output="%f\-%p\-%hc"\fR\&.
+.sp
+By default, dvisvgm uses the XXH64 hash algorithm to compute the values provided through
+\fB%hd\fR
+and
+\fB%hc\fR\&. It\(cqs extremely fast, and a 64\-bit hash should be sufficient for most documents with an average size of pages\&. Alternatively, XXH32 and MD5 can be used as well\&. The desired algorithm is specified by argument
+\fIparams\fR
+of option
+\fB\-\-page\-hashes\fR\&. It takes one of the strings
+\fBMD5\fR,
+\fBXXH32\fR, and
+\fBXXH64\fR, where the names can be given in lower case too, like
+\fB\-\-page\-hashes=md5\fR\&.
+.sp
+Finally, option
+\fB\-\-page\-hashes\fR
+can take a second argument that must be separated by a comma\&. Currently, only the two parameters
+\fIlist\fR
+and
+\fIreplace\fR
+are evaluated, e\&.g\&.
+\fB\-\-page\-hashes=md5,list\fR
+or
+\fB\-\-page\-hashes=replace\fR\&. When
+\fIlist\fR
+is present, dvisvgm doesn\(cqt perform any conversion but just lists the hash values
+\fB%hd\fR
+and
+\fB%hc\fR
+of the pages specified by option
+\fB\-\-page\fR\&. Parameter
+\fIreplace\fR
+forces dvisvgm to convert a DVI page even if a file with the target name already exists\&.
+.RE
+.PP
+\fB\-P, \-\-pdf\fR
+.RS 4
+If this option is given, dvisvgm does not expect a DVI but a PDF input file, and tries to convert it to SVG\&. Similar to the conversion of DVI files, only the first page is processed by default\&. Option
+\fB\-\-page\fR
+can be used to select different pages, page ranges, and/or page sequences\&. The conversion is realized by creating a single
+\fIpdffile\fR
+special command which is forwarded to the PostScript special handler\&. Therefore, this option is only available if dvisvgm was built with PostScript support enabled, and requires Ghostscript to be accessible\&. See option
+\fB\-\-libgs\fR
+for further information\&.
+.RE
+.PP
\fB\-d, \-\-precision\fR=\fIdigits\fR
.RS 4
Specifies the maximal number of decimal places applied to floating\-point attribute values\&. All attribute values written to the generated SVG file(s) are rounded accordingly\&. The parameter
\fIdigits\fR
-allows integer values from 0 to 6, where 0 enables the automatic selection of significant decimal places\&. This is also the default value if dvisvgm is called without option
+accepts integer values from 0 to 6, where 0 enables the automatic selection of significant decimal places\&. This is also the default value if dvisvgm is called without option
\fB\-\-precision\fR\&.
.RE
.PP
-\fB\-P, \-\-progress\fR[=\fIdelay\fR]
+\fB\-\-progress\fR[=\fIdelay\fR]
.RS 4
Enables a simple progress indicator shown when time\-consuming operations like PostScript specials are processed\&. The indicator doesn\(cqt appear before the given delay (in seconds) has elapsed\&. The default delay value is 0\&.5 seconds\&.
.RE
@@ -550,12 +645,67 @@ SVG allows to define graphics paths by a sequence of absolute and/or relative pa
is given, relative commands are created instead\&. This slightly reduces the size of the SVG files in most cases\&.
.RE
.PP
+\fB\-\-stdin\fR
+.RS 4
+Tells dvisvgm to read the DVI or EPS input data from
+\fBstdin\fR
+instead from a file\&. Alternatively to option
+\fB\-\-stdin\fR, a single dash (\-) can be given\&. The default name of the generated SVG file is
+\fIstdin\&.svg\fR
+which can be changed with option
+\fB\-\-output\fR\&.
+.RE
+.PP
\fB\-s, \-\-stdout\fR
.RS 4
Don\(cqt write the SVG output to a file but redirect it to
\fBstdout\fR\&.
.RE
.PP
+\fB\-\-tmpdir\fR[=\fIpath\fR]
+.RS 4
+In some cases, dvisvgm needs to create temporary files to work properly\&. These files go to the system\(cqs temporary folder by default, e\&.g\&.
+\fB/tmp\fR
+on Linux systems\&. Option
+\fB\-\-tmpdir\fR
+allows to specify a different location if necessary for some reason\&. Please note that dvisvgm does not create this folder, so you must ensure that it actually exists before running dvisvgm\&.
+.sp
+If the optional parameter
+\fIpath\fR
+is omitted, dvisvgm prints the location of the system\(cqs temp folder and exits\&.
+.RE
+.PP
+\fB\-a, \-\-trace\-all\fR=[\fIretrace\fR]
+.RS 4
+This option forces dvisvgm to vectorize not only the glyphs actually required to render the SVG file correctly \(en which is the default \(en, but processes all glyphs of all fonts referenced in the DVI file\&. Because dvisvgm stores the tracing results in a font cache, all following conversions of these fonts will speed up significantly\&. The boolean option
+\fIretrace\fR
+determines how to handle glyphs already stored in the cache\&. By default, these glyphs are skipped\&. Setting argument
+\fIretrace\fR
+to
+\fIyes\fR
+or
+\fItrue\fR
+forces dvisvgm to retrace the corresponding bitmaps again\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+This option only takes effect if font caching is active\&. Therefore,
+\fB\-\-trace\-all\fR
+cannot be combined with option
+\fB\-\-cache=none\fR\&.
+.sp .5v
+.RE
+.RE
+.PP
\fB\-T, \-\-transform\fR=\fIcommands\fR
.RS 4
Applies a sequence of transformations to the SVG content\&. Each transformation is described by a
@@ -703,12 +853,16 @@ page width in TeX point units (0 in case of
T}
.TE
.sp 1
-Furthermore, you can use the length constants
+Furthermore, you can use the 9 length constants
\fBpt\fR,
+\fBbp\fR,
+\fBcm\fR,
\fBmm\fR,
-\fBcm\fR
-and
-\fBin\fR, e\&.g\&.
+\fBin\fR,
+\fBpc\fR,
+\fBdd\fR,
+\fBcc\fR, and
+\fBsp\fR, e\&.g\&.
\fB2cm\fR
or
\fB1\&.6in\fR\&. Thus, option
@@ -721,7 +875,8 @@ For single transformations, there are also the short\-hand options
and
\fB\-r\fR
available\&. In contrast to the
-\fB\-\-transform\fR* commands, the order of these options is not significant, so that it\(cqs not possible to describe transformation sequences with them\&.
+\fB\-\-transform\fR
+commands, the order of these options is not significant, so that it\(cqs not possible to describe transformation sequences with them\&.
.sp .5v
.RE
.RE
@@ -790,27 +945,11 @@ Prints the version of dvisvgm and exits\&. If the optional argument is set to
\fB\-z, \-\-zip\fR[=\fIlevel\fR]
.RS 4
Creates a compressed SVG file with suffix \&.svgz\&. The optional argument specifies the compression level\&. Valid values are in the range of 1 to 9 (default value is 9)\&. Larger values cause better compression results but may take slightly more computation time\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBCaution\fR
-.ps -1
-.br
-This option cannot be combined with
-\fB\-s, \-\-stdout\fR\&.
-.sp .5v
-.RE
.RE
.PP
-\fB\-Z, \-\-zoom\fR[=\fIfactor\fR]
+\fB\-Z, \-\-zoom\fR=\fIfactor\fR
.RS 4
-Multiplies the
+Multiplies the values of the
\fIwidth\fR
and
\fIheight\fR
@@ -917,7 +1056,8 @@ Creates an image element at the current graphic position referencing the given f
\fIwidth\fR
and
\fIheight\fR
-must be given as plain floating point numbers in TeX point units (1in = 72\&.27pt)\&.
+can be given together with a unit specifier (see option
+\fB\-\-bbox\fR) or as plain floating point numbers\&. In the latter case, TeX point units are assumed (1in = 72\&.27pt)\&.
.RE
.PP
\fBdvisvgm:bbox\fR n[ew] \fIname\fR
@@ -948,22 +1088,22 @@ is specified, dvisvgm embeds a second rectangle (\fIx\fR,
\fIy\fR,
\fIwidth\fR, \-\fIdepth\fR)\&. The lengths
\fIwidth\fR,
-\fIheight\fR
-and
+\fIheight\fR, and
\fIdepth\fR
-must be given as plain floating point numbers in TeX point units (1in = 72\&.27pt)\&. Depending on size and position of the virtual rectangle, this command either enlarges the overall bounding box or leaves it as is\&. It\(cqs not possible to reduce its extent\&. This special should be used in conjunction with
+can be given together with a unit specifier (see option
+\fB\-\-bbox\fR) or as plain floating point numbers\&. In the latter case, TeX point units are assumed (1in = 72\&.27pt)\&. Depending on size and position of the virtual rectangle, this command either enlarges the overall bounding box or leaves it as is\&. It\(cqs not possible to reduce its extent\&. This special should be used together with
\fBdvisvgm:raw\fR
in order to update the viewport of the page properly\&.
.RE
.PP
\fBdvisvgm:bbox\fR a[bs] \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
.RS 4
-This variant of the bbox special updates the bounding box by embedding a virtual rectangle (\fIx1\fR,\fIy1\fR,\fIx2\fR,\fIy2\fR)\&. The points (\fIx1\fR,\fIy1\fR) and (\fIx2\fR,\fIy2\fR) denote two diagonal corners of the rectangle given in TeX point units\&.
+This variant of the bbox special updates the bounding box by embedding a virtual rectangle (\fIx1\fR,\fIy1\fR,\fIx2\fR,\fIy2\fR)\&. The points (\fIx1\fR,\fIy1\fR) and (\fIx2\fR,\fIy2\fR) denote the absolute coordinates of two diagonal corners of the rectangle\&.
.RE
.PP
\fBdvisvgm:bbox\fR f[ix] \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR
.RS 4
-This variant of the bbox special assigns an absolute (final) bounding box to the resulting SVG\&. After executing this command, dvisvgm doesn\(cqt further alter the bounding box coordinates, except this special is called again later\&. The points (\fIx1\fR,\fIy1\fR) and (\fIx2\fR,\fIy2\fR) denote two diagonal corners of the rectangle given in TeX point units\&.
+This variant of the bbox special assigns an absolute (final) bounding box to the resulting SVG\&. After executing this command, dvisvgm doesn\(cqt further alter the bounding box coordinates, except this special is called again later\&. The points (\fIx1\fR,\fIy1\fR) and (\fIx2\fR,\fIy2\fR) denote the absolute coordinates of two diagonal corners of the rectangle\&.
.sp
The following TeX snippet adds two raw SVG elements to the output and updates the bounding box accordingly:
.sp
@@ -971,11 +1111,12 @@ The following TeX snippet adds two raw SVG elements to the output and updates th
.RS 4
.\}
.nf
-\especial{dvisvgm:raw <circle cx=\*(Aq{?x}\*(Aq cy=\*(Aq{?y}\*(Aq r=\*(Aq10\*(Aq stroke=\*(Aqblack\*(Aq fill=\*(Aqred\*(Aq/>}
-\especial{dvisvgm:bbox 20 10 10}
+\especial{dvisvgm:raw <circle cx=\*(Aq{?x}\*(Aq cy=\*(Aq{?y}\*(Aq r=\*(Aq10\*(Aq stroke=\*(Aqblack\*(Aq fill=\*(Aqred\*(Aq/>}%
+\especial{dvisvgm:bbox 10bp 10bp 10bp}%
+\especial{dvisvgm:bbox \-10bp 10bp 10bp}
\especial{dvisvgm:raw <path d=\*(AqM50 200 L10 250 H100 Z\*(Aq stroke=\*(Aqblack\*(Aq fill=\*(Aqblue\*(Aq/>}
-\especial{dvisvgm:bbox abs 10 200 100 250}
+\especial{dvisvgm:bbox abs 10bp 200bp 100bp 250bp}
.fi
.if n \{\
.RE
@@ -985,8 +1126,10 @@ The following TeX snippet adds two raw SVG elements to the output and updates th
.PP
\fBem\fR
.RS 4
-These specials were introduced with the emTeX distribution by Eberhard Mattes\&. They provide line drawing statements, instructions for embedding MSP, PCX, and BMP image files, as well as two PCL commands\&. dvisvgm supports only the line drawing statements and ignores all other em specials silently\&. A description of the command syntax can be found in the DVI driver documentation coming with
-emTeX (\m[blue]http://www.ctan.org/pkg/emtex\m[])\&.
+These specials were introduced with the
+\fIemTeX\fR
+distribution by Eberhard Mattes\&. They provide line drawing statements, instructions for embedding MSP, PCX, and BMP image files, as well as two PCL commands\&. dvisvgm supports only the line drawing statements and ignores all other em specials silently\&. A description of the command syntax can be found in the DVI driver documentation coming with
+emTeX (\m[blue]https://ctan.org/pkg/emtex\m[])\&.
.RE
.PP
\fBhtml\fR
@@ -995,30 +1138,54 @@ The hyperref specification defines several variants on how to mark hyperlinked a
\fIhypertex\fR\&. By default, all linked areas of the document are marked by a rectangle\&. Option
\fB\-\-linkmark\fR
allows to change this behavior\&. See above for further details\&. Information on syntax and semantics of the HyperTeX specials can be found in the
-hyperref manual (\m[blue]http://www.ctan.org/pkg/hyperref\m[])\&.
+hyperref manual (\m[blue]https://ctan.org/pkg/hyperref\m[])\&.
+.RE
+.PP
+\fBpapersize\fR
+.RS 4
+The
+\fIpapersize\fR
+special, which is an extension introduced by dvips, can be used to specify the widths and heights of the pages in the DVI file\&. It affects the page it appears on as well as all following pages until another papersize special is found\&. If there is more than one papersize special present on a page, dvisvgm applies the last one\&. However, in order to stay compatible with previous versions of dvisvgm that did not evaluate these specials, their processing must be explicitly enabled by adding option
+\fB\-\-bbox=papersize\fR
+on the command\-line\&. Otherwise, dvisvgm ignores them and computes tight bounding boxes\&.
.RE
.PP
\fBpdf\fR
.RS 4
-pdfTeX and dvipdfmx introduced several special commands related to the generation of PDF files\&. Currently, only two of them,
+pdfTeX and dvipdfmx introduced several special commands related to the generation of PDF files\&. Currently, only
+\fIpdf:mapfile\fR,
+\fIpdf:mapline\fR,
+\fIpdf:pagesize\fR, and PDF hyperlink specials are supported by dvisvgm\&. The latter are the PDF pendants to the HTML HyperTeX specials generated by the hyperref package in PDF mode\&.
+.sp
+\fIpdf:pagesize\fR
+is similar to the
+\fIpapersize\fR
+special (see above) which specifies the size of the current and all folowing pages\&. In order to actually apply the extents to the generated SVG files, option
+\fB\-\-bbox=papersize\fR
+must be given\&.
+.sp
\fIpdf:mapfile\fR
and
\fIpdf:mapline\fR
-are supported by dvisvgm\&. These specials allow modifying the font map tree during the processing of DVI files\&. They are used by CTeX, for example\&. dvisvgm supports both, the dvips and dvipdfm font map format\&. For further information on the command syntax and semantics, see the documentation of
+allow for modifying the font map tree while processing the DVI file\&. They are used by CTeX, for example\&. dvisvgm supports both, the dvips and dvipdfm font map format\&. For further information on the command syntax and semantics, see the documentation of
\fB\epdfmapfile\fR
in the
-pdfTeX user manual (\m[blue]http://www.ctan.org/pkg/pdftex\m[])\&.
+pdfTeX user manual (\m[blue]https://ctan.org/pkg/pdftex\m[])\&.
.RE
.PP
\fBps\fR
.RS 4
-The famous DVI driver dvips introduced its own set of specials in order to embed PostScript code into DVI files, which greatly improves the capabilities of DVI documents\&. One aim of dvisvgm is to completely evaluate all PostScript snippets and to convert as many of them as possible to SVG\&. In contrast to dvips, dvisvgm uses floating point arithmetics to compute the precise position of each graphic element, i\&.e\&. it doesn\(cqt round the coordinates\&. Therefore, the relative locations of the graphic elements may slightly differ from those computed by dvips\&.
+The famous DVI driver
+\fIdvips\fR
+introduced its own set of specials in order to embed PostScript code into DVI files, which greatly improves the capabilities of DVI documents\&. One aim of dvisvgm is to completely evaluate all PostScript snippets and to convert as many of them as possible to SVG\&. In contrast to dvips, dvisvgm uses floating point arithmetics to compute the precise position of each graphic element, i\&.e\&. it doesn\(cqt round the coordinates\&. Therefore, the relative locations of the graphic elements may slightly differ from those computed by dvips\&.
.sp
-Since PostScript is a rather complex language, dvisvgm does not try to implement its own PostScript interpreter but relies on
-Ghostscript (\m[blue]http://ghostscript.com\m[])
+Since PostScript is a rather complex language, dvisvgm does not implement its own PostScript interpreter but relies on
+Ghostscript (\m[blue]https://ghostscript.com\m[])
instead\&. If the Ghostscript library was not linked to the dvisvgm binary, it is looked up and loaded dynamically during runtime\&. In this case, dvisvgm looks for
\fIlibgs\&.so\&.X\fR
-on Unix\-like systems (supported ABI versions: 7,8,9), and for
+on Unix\-like systems (supported ABI versions: 7,8,9), for
+\fIlibgs\&.X\&.dylib\fR
+on macOS, and for
\fIgsdll32\&.dll\fR
or
\fIgsdll64\&.dll\fR
@@ -1032,12 +1199,14 @@ to check whether PostScript support is available, i\&.e\&. entry
is present\&.
.sp
The PostScript handler also recognizes and evaluates bounding box data generated by the
-preview package (\m[blue]http://www.ctan.org/pkg/preview\m[])
+preview package (\m[blue]https://ctan.org/pkg/preview\m[])
with option
\fItightpage\fR\&. If such data is present in the DVI file and if dvisvgm is called with option
-\fB\-\-bbox=preview\fR, dvisvgm adapts the bounding box of the generated SVG file accordingly, and prints a message showing the width, height, and depth of the box in TeX point units\&. Especially, the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL\-FO documents, for example\&. If you call dvisvgm with option
+\fB\-\-bbox=preview\fR, dvisvgm sets the width and total height of the SVG file to the values derived from the preview data\&. Additionally, it prints a message showing the width, height, and depth of the box in TeX point units to the console\&. Especially, the depth value can be read by a post\-processor to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL\-FO documents, for example\&. Please note that SVG bounding boxes are defined by a width and (total) height\&. In contrast to TeX, SVG provides no means to differentiate between height and depth, i\&.e\&. the vertical extents above and below the baseline, respectively\&. Therefore, it is generally not possible to retrieve the depth value from the SVG file itself\&.
+.sp
+If you call dvisvgm with option
\fB\-\-bbox=min\fR
-(the default), the tight bounding box computed while processing the page is applied and not the one provided by the preview package\&. Thus, the height, depth and width values written to the console are adapted accordingly\&.
+(the default) and preview data is present in the DVI file, dvisvgm doesn\(cqt apply the preview extents but computes a bounding box that tightly encloses the page contents\&. The height, depth and width values written to console are adapted accordingly\&.
.RE
.PP
\fBtpic\fR
@@ -1062,6 +1231,18 @@ Converts the first page of \fIfile\&.dvi\fR to \fIfile\&.svg\fR\&.
.RS 4
.\}
.nf
+dvisvgm \- < file\&.dvi
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Converts the first page of \fIfile\&.dvi\fR to \fIstdin\&.svg\fR where the contents of \fIfile\&.dvi\fR is read from \fBstdin\fR\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
dvisvgm \-z file
.fi
.if n \{\
@@ -1099,7 +1280,7 @@ dvisvgm uses the \fBkpathsea\fR library for locating the files that it opens\&.
.sp
If dvisvgm was linked without the Ghostscript library, and if PostScript support has not been disabled, the shared Ghostscript library is looked up during runtime via dlopen()\&. The environment variable \fBLIBGS\fR can be used to specify path and file name of the library\&.
.sp
-The pre\-compiled Windows versions of dvisvgm require a working installation of MiKTeX 2\&.9 or above\&. dvisvgm does not work together with the portable edition of MiKTeX because it relies on MiKTeX\(cqs COM interface that is only accessible in a local installation\&. To enable the evaluation of PostScript specials, the original Ghostscript DLL \fIgsdll32\&.dll\fR must be present and reachable through the search path\&. 64\-bit Windows builds require the 64\-bit Ghostscript DLL \fIgsdll64\&.dll\fR\&. Both DLLs come with the corresponding Ghostscript installers available from \m[blue]\fBhttp://ghostscript\&.com\fR\m[]\&.
+The pre\-compiled Windows versions of dvisvgm require a working installation of MiKTeX 2\&.9 or above\&. dvisvgm does not work together with the portable edition of MiKTeX because it relies on MiKTeX\(cqs COM interface that is only accessible in a local installation\&. To enable the evaluation of PostScript specials, the original Ghostscript DLL \fIgsdll32\&.dll\fR must be present and reachable through the search path\&. 64\-bit Windows builds require the 64\-bit Ghostscript DLL \fIgsdll64\&.dll\fR\&. Both DLLs come with the corresponding Ghostscript installers available from \m[blue]\fBhttps://ghostscript\&.com\fR\m[]\&.
.sp
The environment variable \fBDVISVGM_COLORS\fR specifies the colors used to highlight various parts of dvisvgm\(cqs message output\&. It is only evaluated if option \fB\-\-color\fR is given\&. The value of \fBDVISVGM_COLORS\fR is a list of colon\-separated entries of the form \fIgg\fR=\fIBF\fR, where \fIgg\fR denotes one of the color group indicators listed below, and \fIBF\fR are two hexadecimal digits specifying the background (first digit) and foreground/text color (second digit)\&. The color values are defined as follows: 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=gray, 8=bright red, 9=bright green, A=bright yellow, B=bright blue, C=bright magenta, D=bright cyan, E=bright gray, F=white\&. Depending on the terminal, the colors may differ\&. Rather than changing both the text and background color, it\(cqs also possible to change only one of them: An asterisk (*) in place of a hexadecimal digit indicates the default text or background color of the terminal\&.
.sp
@@ -1260,7 +1441,7 @@ T}
.PP
Project home page
.RS 4
-\m[blue]\fBhttp://dvisvgm\&.bplaced\&.net\fR\m[]
+\m[blue]\fBhttps://dvisvgm\&.de\fR\m[]
.RE
.PP
Code repository
@@ -1275,4 +1456,4 @@ Please report bugs using the bug tracker at GitHub (\m[blue]https://github.com/m
Written by Martin Gieseking <\m[blue]\fBmartin\&.gieseking@uos\&.de\fR\m[]>
.SH "COPYING"
.sp
-Copyright \(co 2005\-2016 Martin Gieseking\&. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 3 or, (at your option) any later version\&.
+Copyright \(co 2005\-2019 Martin Gieseking\&. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 3 or, (at your option) any later version\&.