[latex3-commits] [git/LaTeX3-latex3-graphics-def] main: missing bbox update added for bitmap and svg (3c1cb76)

Alexander Grahn grahn at null.org
Sat Feb 19 11:07:10 CET 2022


Repository : https://github.com/latex3/graphics-def
On branch  : main
Link       : https://github.com/latex3/graphics-def/commit/3c1cb767afea1f0b53e0308c73d4cd5028480374

>---------------------------------------------------------------

commit 3c1cb767afea1f0b53e0308c73d4cd5028480374
Author: Alexander Grahn <grahn at null.org>
Date:   Sat Feb 19 11:07:10 2022 +0100

    missing bbox update added for bitmap and svg


>---------------------------------------------------------------

3c1cb767afea1f0b53e0308c73d4cd5028480374
 dvisvgm.def | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dvisvgm.def b/dvisvgm.def
index 1f2e057..8390ee2 100644
--- a/dvisvgm.def
+++ b/dvisvgm.def
@@ -16,7 +16,7 @@
 %%
 %% https://github.com/latex3/graphics-def/issues
 %
-\ProvidesFile{dvisvgm.def}[2022/02/05 v1.4 dvisvgm graphics driver for latex]
+\ProvidesFile{dvisvgm.def}[2022/02/19 v1.5 dvisvgm graphics driver for latex]
 % The following is copied from dvips.def:
 \def\GPT at space{ }
 \def\c at lor@arg#1{%
@@ -169,16 +169,16 @@
   \dimen@\Gin at svg@real at height@bp pt%
   \advance\dimen@ by-\Gin at ury pt%
   \edef\Gin at svg@view at base{\strip at pt\dimen@}%
+  \special{dvisvgm:bbox \strip at pt\Gin at req@width pt \strip at pt\Gin at req@height pt transform}%
   \Gin at req@width0.99626\Gin at req@width%
   \Gin at req@height0.99626\Gin at req@height%
   \raise\strip at pt\Gin at req@height bp\hbox{%
     \special{dvisvgm: raw
-      <g transform="translate({?x},{?y})">
+      <g transform="translate({?x},{?y})">%
         <svg overflow="\ifGin at clip hidden\else visible\fi" width="\strip at pt\Gin at req@width" height="\strip at pt\Gin at req@height"
-             viewBox="\Gin at llx\GPT at space\Gin at svg@view at base\GPT at space\Gin at svg@view at width\GPT at space\Gin at svg@view at height">
-          <image width="\Gin at svg@real at width@bp" height="\Gin at svg@real at height@bp"
-                 xlink:href="#1"/>
-        </svg>
+             viewBox="\Gin at llx\GPT at space\Gin at svg@view at base\GPT at space\Gin at svg@view at width\GPT at space\Gin at svg@view at height">%
+          <image width="\Gin at svg@real at width@bp" height="\Gin at svg@real at height@bp" xlink:href="#1"/>%
+        </svg>%
       </g>}%
   }%
 }





More information about the latex3-commits mailing list.