[latex3-commits] [git/LaTeX3-latex3-latex3] master: dvisvgm can include EPS files (8f77ce02f)

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


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

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

commit 8f77ce02f55b2c81e1aa9173468671e655fa12ff
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Sep 4 13:31:17 2019 +0100

    dvisvgm can include EPS files
    
    This is a straight copy from the dvips driver:
    not sure why it got missed!


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

8f77ce02f55b2c81e1aa9173468671e655fa12ff
 l3backend/CHANGELOG.md           |  4 ++++
 l3backend/l3backend-graphics.dtx | 31 +++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/l3backend/CHANGELOG.md b/l3backend/CHANGELOG.md
index 182c8dcb9..945fdbe62 100644
--- a/l3backend/CHANGELOG.md
+++ b/l3backend/CHANGELOG.md
@@ -6,6 +6,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Added
+
+- Support for EPS files with `dvisvgm` backend
+
 ### Fixed
 
 - Some primitive use in the `dvips` backend
diff --git a/l3backend/l3backend-graphics.dtx b/l3backend/l3backend-graphics.dtx
index 1dda6b33c..94baa7a9a 100644
--- a/l3backend/l3backend-graphics.dtx
+++ b/l3backend/l3backend-graphics.dtx
@@ -557,6 +557,19 @@
 %<*dvisvgm>
 %    \end{macrocode}
 %
+% \begin{macro}{\@@_backend_getbb_eps:n}
+%   Simply use the generic function.
+%    \begin{macrocode}
+%<*initex>
+\use:n
+%</initex>
+%<*package>
+\AtBeginDocument
+%</package>
+  { \cs_new_eq:NN \@@_backend_getbb_eps:n \graphics_read_bb:n }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@@_backend_getbb_png:n, \@@_backend_getbb_jpg:n}
 %   These can be included by extracting the bounding box data.
 %    \begin{macrocode}
@@ -573,6 +586,24 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_backend_include_eps:n}
+%  The special syntax is relatively clear here: remember we need PostScript
+%  sizes here. (This is the same as the \texttt{dvips} code.)
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_include_eps:n #1
+  {
+    \__kernel_backend_literal:x
+      {
+        PSfile = #1 \c_space_tl
+        llx = \dim_to_decimal_in_bp:n \l_graphics_llx_dim \c_space_tl
+        lly = \dim_to_decimal_in_bp:n \l_graphics_lly_dim \c_space_tl
+        urx = \dim_to_decimal_in_bp:n \l_graphics_urx_dim \c_space_tl
+        ury = \dim_to_decimal_in_bp:n \l_graphics_ury_dim
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@@_backend_include_png:n, \@@_backend_include_jpg:n}
 % \begin{macro}{\@@_backend_include_bitmap_quote:w}
 %   The backend here has built-in support for basic graphic inclusion (see





More information about the latex3-commits mailing list