Skip to content

Commit

Permalink
fix conflicting bbox setting between pgfsys-dvisvgm and dvisvgm command;
Browse files Browse the repository at this point in the history
fixes #1275

Signed-off-by: Alexander Grahn <[email protected]>
  • Loading branch information
agrahn committed Sep 13, 2023
1 parent 6e5fd71 commit e4ef1d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/generic/pgf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed

- Typo in animations `end on` key #1273
- Output bounding box adjustment in pgfsys-dvisvgm.def #1275

### Changed

Expand All @@ -25,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Qrrbrbirlbel
- quark67
- Yukai Chou (muzimuzhi)
- Alexander Grahn

## [3.1.10] - 2023-01-13 Henri Menke

Expand Down
4 changes: 4 additions & 0 deletions testfiles/pgf001.latexdvisvgm.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TEST 1: pgf: \pgfpathmoveto
\hbox(0.0+0.0)x0.0, direction TLT
.\hbox(0.0+0.0)x0.0, direction TLT
..\special{dvisvgm:bbox 0.0 0.0}
..\special{dvisvgm:bbox lock}
..\hbox(0.0+0.0)x0.0, direction TLT
...\glue -28.45274
...\hbox(0.0+0.0)x0.0, shifted 28.45274, direction TLT
Expand All @@ -25,6 +26,7 @@ TEST 1: pgf: \pgfpathmoveto
....\special{dvisvgm:raw </g>}
....\special{color pop}
....\glue 0.0 plus 1.0fil minus 1.0fil
..\special{dvisvgm:bbox unlock}
! OK.
\ENDPGFTEST ...th =\maxdimen \showbox \PGFTESTBOX
\endgroup \ENDTEST
Expand All @@ -37,6 +39,7 @@ TEST 2: pgf: \pgfpathlineto
\hbox(0.0+0.0)x0.0, direction TLT
.\hbox(0.0+0.0)x0.0, direction TLT
..\special{dvisvgm:bbox 0.0 0.0}
..\special{dvisvgm:bbox lock}
..\hbox(0.0+0.0)x0.0, direction TLT
...\glue -28.45274
...\hbox(0.0+0.0)x0.0, shifted 28.45274, direction TLT
Expand All @@ -55,6 +58,7 @@ TEST 2: pgf: \pgfpathlineto
....\special{dvisvgm:raw </g>}
....\special{color pop}
....\glue 0.0 plus 1.0fil minus 1.0fil
..\special{dvisvgm:bbox unlock}
! OK.
\ENDPGFTEST ...th =\maxdimen \showbox \PGFTESTBOX
\endgroup \ENDTEST
Expand Down
2 changes: 2 additions & 0 deletions testfiles/pgf002.latexdvisvgm.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TEST 1: tikz: matrix
\hbox(20.1619+0.0)x44.16382, direction TLT
.\hbox(20.1619+0.0)x44.16382, direction TLT
..\special{dvisvgm:bbox 44.16382 20.1619}
..\special{dvisvgm:bbox lock}
..\hbox(20.1619+0.0)x44.16382, direction TLT
...\glue 22.08191
...\hbox(0.0+0.0)x0.0, shifted -10.08095, direction TLT
Expand Down Expand Up @@ -144,6 +145,7 @@ TEST 1: tikz: matrix
....\special{dvisvgm:raw </g>}
....\special{color pop}
....\glue 0.0 plus 1.0fil minus 1.0fil
..\special{dvisvgm:bbox unlock}
! OK.
\ENDTIKZTEST ...h =\maxdimen \showbox \PGFTESTBOX
\endgroup \ENDTEST
Expand Down
2 changes: 1 addition & 1 deletion tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
\dp#1=0pt%
\leavevmode%
\pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi%
\raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\fi\box#1}%
\raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\box#1\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\special{dvisvgm:bbox lock}\box#1\special{dvisvgm:bbox unlock}\fi}%
\pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi%
}

Expand Down

0 comments on commit e4ef1d3

Please sign in to comment.