This is a small maintenance release with the following changes:
- Fixed a bug in PostScript operator
setmatrix
(issue #106). - Fixed a build issue reported on MacPorts.
- Added the source files required to access the MiKTeX session object as the MiKTeX SDK has been deprecated.
The main new feature of this release is command-line option --optimize
which
allows for optimization of the generated SVG tree after it has completely been built from the DVI data.
The optimizations are performed by running separate optimizer modules which are executed one by one in
a given order and thus transform the XML tree gradually. Currently, the following optimizations are available:
- Move common inheritable attributes of adjacent elements to group elements.
- Combine nested groups and unwrap groups without attributes.
- Remove redundant
clipPath
elements. - Simplify
transform
attributes.
More detailed information on option --optimize
and the optimizer modules can be found on the manual page.
Furthermore, a couple of smaller additions and changes have been made:
- All
raw
specials are now parsed and converted to proper XML nodes so that the optimizer can also process SVG fragments added by the user. - Several improvements to SVG graphics path descriptions:
- Redundant spaces and leading zeros are omitted.
- Line commands representing zero-length lines are removed.
- The detection of reflected control points in Bézier curve sequences has been improved. As a result, the shorthand curve commands are applied more often.
- Added support for PostScript operators
xshow
,yshow
, andxyshow
. - Added evaluation of optional
psfile
/pdffile
special attributeclip
which clips the drawing region to the bounding box of the image being processed. - Added the
\special
variantsdvisvgm:bbox lock
anddvisvgm:bbox unlock
to disable and enable updating of the bounding box. By default, dvisvgm adapts the bounding box of the current page if a new graphics element is added. This behaviour can be paused and resumed with the new specials. - Added optional modifier
transform
to dvisvgm’sbbox
specials to allow for applying the current transformation matrix to the bounding box. - Added macro
{?matrix}
to dvisvgm’sraw
specials. It expands to the current transformation matrix, e.g.matrix(0 -1 1 0 -214.88 106)
. - Option
--exact
has been renamed to--exact-bbox
. This change is backward compatible due to dvisvgm’s partial matching of option names. - The bundled xxHash library was updated to version 0.7.0.
- Lots of code refactorings.
This is mainly a bugfix release with the following changes:
- dvisvgm now creates short, three-digit RGB hex values for color attributes if possible, e.g.
#123
instead of#112233
. - Fixed the rejection of paper formats, like
A4
, given as argument to option--bbox
. - Fixed the adaption of the vertical orientation when processing EPS/PDF files.
- Fixed the handling of backslashes in EPS/PDF file paths (Windows only).
- Updated the bundled Google Test library to version 1.8.1.
- Some code refactorings and improvements of the build system.
This maintenance release resolves a couple of PostScript issues that were reported recently.
- Fixed the scaling of line properties in PS operator
grestore
. - Fixed the handling of PS operators
charpath
andshow
which may call each other internally. - Improved the processing of PS operator
clippath
. - Prevent visible side-effects of PS operator
stringwidth
. - Updated the bundled brotli library to version 1.0.7.
- Some modifications of the build system to simplify the maintenance of dvisvgm in TeX Live.
This is a maintenance release that fixes a couple of issues regarding the build system. The functionality of the dvisvgm utility itself hasn’t changed.
- Added configuration option
--disable-manpage
to prevent generating the manual page (issue #93). - If configuration option
--disable-bundled-libs
is given and some of the required system libraries are missing during build time, the corresponding bundled libraries are used as a fallback (issue #94). - Updated the bundled brotli library to version 1.0.6.
- Fixed a build issue occurred with GCC 4.8.
Fedora packages of the latest dvisvgm release are now available through my Copr repository. They replace the older package texlive-dvisvgm coming with Fedora. Run the follwowing commands to enable the repository and to install the new dvisvgm package:
dnf copr enable mgieseki/dvisvgm
dnf install dvisvgm
The main feature of this release is enabled by the new command-line option --page-hashes
. It allows for skipping the
conversion of a page if its content hasn’t changed and the corresponding SVG file already exists. When this option is
given, dvisvgm computes a hash value from the DVI pages and adds it to the name of the SVG file to be written.
As the hash value only changes if the contents of the DVI page change, there’s normally no need to convert
existing SVG files again which should speed up the conversion of large documents significantly.
Here’s the output of two successive conversions:
$ dvisvgm --page-hashes --page=1-3 -d2 tplot pre-processing DVI file (format version 2) processing page 1 graphic size: 463.13pt x 659.91pt (162.77mm x 231.93mm) output written to tplot-d0ab8a85f0307c6e.svg processing page 2 graphic size: 433.16pt x 680.74pt (152.24mm x 239.25mm) output written to tplot-d3b405aceca3a5c0.svg processing page 3 graphic size: 426.79pt x 763.01pt (150mm x 268.17mm) output written to tplot-e695ce8f0abfea95.svg 3 of 7 pages converted in 0.384216 seconds
$ dvisvgm --page-hashes --page=1-4 -d2 tplot pre-processing DVI file (format version 2) skipping page 1 file tplot-d0ab8a85f0307c6e.svg exists skipping page 2 file tplot-d3b405aceca3a5c0.svg exists skipping page 3 file tplot-e695ce8f0abfea95.svg exists processing page 4 graphic size: 427.37pt x 684.56pt (150.21mm x 240.59mm) output written to tplot-886a8783a56c4ee7.svg 4 of 7 pages converted in 0.147861 seconds
Besides the DVI input, a couple of dvisvgm’s options, like --no-fonts
or --precision
also affect the SVG output.
Therefore, it’s possible to include command-line information in the hash value as well so that a new SVG file is
created when using different options although the DVI pages haven’t changed. For further information on this topic
and the available hash algorithms see the sections about option --page-hashes
and --output
on the
manual page.
In addition to this new option, the following changes have been made:
- The plausibility check of the total number of pages given in the DVI postamble has been relaxed. This value overflows if the DVI file contains more than 65535 pages which previously led to an error message.
- Validity checks of the BOP (begin of page) offsets specified as part of each BOP and POST command have been added to detect DVI files with incorrect, e.g. cyclic, page references.
This is a small feature release with the following additions/changes:
- Added multi-page support to PDF mode, i.e. when converting PDF file using option
--pdf
, the pages to be processed can be selected with option--page
:$ dvisvgm –pdf –page=2-3 -d2 sample.pdf
processing PDF file graphic size: 597.23pt x 845.16pt (209.9mm x 297.04mm) output written to sample-2.svg processing PDF file graphic size: 597.23pt x 845.16pt (209.9mm x 297.04mm) output written to sample-3.svg 2 of 3 pages converted in 1.328 seconds - All transformation options, like
--scale
,--rotate
, and--transform
, now work in the PDF mode too. - Added support for all nine length units to option
--transform
. Previously, only some of them were available. For further information see the manual page. - TeX Live 32-bit Windows binaries only: The Ghostscript DLL is now looked up in the TeX Live folders as well (thanks to Akira Kakuto for sending the patch).
- At the request of the TeX Live maintainers, potrace has been added to the bundled third-party libraries again, in order to simplify maintaining this dependency.
- Instead of linking the bundled libraries brotli, potrace, woff2, and xxhash, the configure script now looks for the corresponding system libraries by default (issue #90).
- Added option
--enable-bundled-libs
to theconfigure
script to build and statically link the bundled libraries. - Some code refactorings.