[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct bb extraction keys with dvisvgm (d3052c790)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Sep 4 14:48:33 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/d3052c790482864ee5b8bc3d52f4bf69966b1e1c

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

commit d3052c790482864ee5b8bc3d52f4bf69966b1e1c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Sep 4 13:48:33 2019 +0100

    Correct bb extraction keys with dvisvgm


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

d3052c790482864ee5b8bc3d52f4bf69966b1e1c
 l3backend/l3backend-graphics.dtx | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/l3backend/l3backend-graphics.dtx b/l3backend/l3backend-graphics.dtx
index 94baa7a9a..4db76799f 100644
--- a/l3backend/l3backend-graphics.dtx
+++ b/l3backend/l3backend-graphics.dtx
@@ -573,15 +573,24 @@
 % \begin{macro}{\@@_backend_getbb_png:n, \@@_backend_getbb_jpg:n}
 %   These can be included by extracting the bounding box data.
 %    \begin{macrocode}
-%<*initex>
-\use:n
-%</initex>
-%<*package>
-\AtBeginDocument
-%</package>
+\cs_new_protected:Npn \@@_backend_getbb_jpg:n #1
   {
-    \cs_new_eq:NN \@@_backend_getbb_png:n \graphics_extract_bb:n
-    \cs_new_eq:NN \@@_backend_getbb_jpg:n \graphics_extract_bb:n
+    \int_zero:N \l_graphics_page_int
+    \tl_clear:N \l_graphics_pagebox_tl
+    \graphics_extract_bb:n {#1}
+  }
+\cs_new_eq:NN \@@_backend_getbb_png:n \@@_backend_getbb_jpg:n
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_getbb_pdf:n}
+%   Same as for \texttt{dvipdfmx}: use the generic function
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_getbb_pdf:n #1
+  {
+    \tl_clear:N \l_graphics_decodearray_tl
+    \bool_set_false:N \l_graphics_interpolate_bool
+    \graphics_extract_bb:n {#1}
   }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list