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
  • Loading branch information
agrahn committed Sep 12, 2023
1 parent 6e5fd71 commit 4a144d7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
4 changes: 4 additions & 0 deletions doc/generic/pgf/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added

### Fixed (Alexander Grahn, 2023-09-12)

- output BBox adjustment in pgfsys-dvisvgm.def, fixes #1275

### Fixed

- Typo in animations `end on` key #1273
Expand Down
19 changes: 19 additions & 0 deletions pgf/tlpkg/texlive.tlpdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name 00texlive.installation
category TLCore
depend opt_autobackup:1
depend opt_backupdir:tlpkg/backups
depend opt_create_formats:1
depend opt_desktop_integration:0
depend opt_file_assocs:0
depend opt_generate_updmap:0
depend opt_install_docfiles:1
depend opt_install_srcfiles:1
depend opt_location:https://mirror.ctan.org/systems/texlive/tlnet
depend opt_post_code:1
depend opt_sys_bin:/usr/local/bin
depend opt_sys_info:/usr/local/share/info
depend opt_sys_man:/usr/local/share/man
depend opt_w32_multi_user:0
depend setting_available_architectures:
depend setting_usertree:1

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
8 changes: 5 additions & 3 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 @@ -47,7 +48,7 @@ TEST 1: tikz: matrix
.................\special{dvisvgm:raw <g fill="#000">{?nl} }
.................\special{dvisvgm:raw <g stroke="none"> }
.................\hbox(4.48+0.11)x5.0, direction TLT
..................\TU/lmr/m/n/10 a
..................\FONT16 ^^\
.................\special{dvisvgm:raw </g> }
.................\special{dvisvgm:raw </g>{?nl} }
...............\special{dvisvgm:raw </g>}
Expand Down Expand Up @@ -83,7 +84,7 @@ TEST 1: tikz: matrix
.................\special{dvisvgm:raw <g fill="#000">{?nl} }
.................\special{dvisvgm:raw <g stroke="none"> }
.................\hbox(6.83+0.0)x7.5, direction TLT
..................\TU/lmr/m/n/10 X
..................\FONT16 s
.................\special{dvisvgm:raw </g> }
.................\special{dvisvgm:raw </g>{?nl} }
...............\special{dvisvgm:raw </g>}
Expand Down Expand Up @@ -119,7 +120,7 @@ TEST 1: tikz: matrix
.................\special{dvisvgm:raw <g fill="#000">{?nl} }
.................\special{dvisvgm:raw <g stroke="none"> }
.................\hbox(4.53+2.06)x5.0, direction TLT
..................\TU/lmr/m/n/10 g
..................\FONT16 ;
.................\special{dvisvgm:raw </g> }
.................\special{dvisvgm:raw </g>{?nl} }
...............\special{dvisvgm:raw </g>}
Expand All @@ -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 4a144d7

Please sign in to comment.