[latex3-commits] [git/LaTeX3-latex3-graphics-def] develop: Use expl3 backend data on extractbb if available (e10e6e7)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jan 8 16:21:43 CET 2021


Repository : https://github.com/latex3/graphics-def
On branch  : develop
Link       : https://github.com/latex3/graphics-def/commit/e10e6e7da88885b7f991cccfbd8fc45a6bbf33a4

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

commit e10e6e7da88885b7f991cccfbd8fc45a6bbf33a4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jan 8 15:21:43 2021 +0000

    Use expl3 backend data on extractbb if available


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

e10e6e7da88885b7f991cccfbd8fc45a6bbf33a4
 dvipdfmx.def | 21 +++++++++++++--------
 xetex.def    | 21 +++++++++++++--------
 2 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/dvipdfmx.def b/dvipdfmx.def
index 74d472e..6183d2d 100644
--- a/dvipdfmx.def
+++ b/dvipdfmx.def
@@ -339,18 +339,23 @@
 % Updates for newer dvipdfmx versions
 % Loaded last as we can then bail-out if not required
 \begingroup
-  \immediate\openin 0 = |"extractbb --version"
-  \ifeof0 %
-    \def\extractbbversion{0}%
+  \ifcsname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname
+    \edef\extractbbversion{%
+      \number\csname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname}%
   \else
-    \read0 to \extractbbversion % \par
+    \immediate\openin 0 = |"extractbb --version"
     \ifeof0 %
       \def\extractbbversion{0}%
     \else
-      \read0 to \extractbbversion
-        \long\def\getextractbbversion#1Version #2 #3\stop{%
-          \def\extractbbversion{#2}}%
-        \expandafter\getextractbbversion\extractbbversion Version 0 \stop
+      \read0 to \extractbbversion % \par
+      \ifeof0 %
+        \def\extractbbversion{0}%
+      \else
+        \read0 to \extractbbversion
+          \long\def\getextractbbversion#1Version #2 #3\stop{%
+            \def\extractbbversion{#2}}%
+          \expandafter\getextractbbversion\extractbbversion Version 0 \stop
+      \fi
     \fi
   \fi
 \ifnum\extractbbversion<20201111 %
diff --git a/xetex.def b/xetex.def
index 68ce574..dfbe485 100644
--- a/xetex.def
+++ b/xetex.def
@@ -438,18 +438,23 @@
 % Updates for newer dvipdfmx versions
 % Loaded last as we can then bail-out if not required
 \begingroup
-  \immediate\openin 0 = |"extractbb --version"
-  \ifeof0 %
-    \def\extractbbversion{0}%
+  \ifcsname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname
+    \edef\extractbbversion{%
+      \number\csname\detokenize{c__kernel_sys_dvipdfmx_version_int}\endcsname}%
   \else
-    \read0 to \extractbbversion % \par
+    \immediate\openin 0 = |"extractbb --version"
     \ifeof0 %
       \def\extractbbversion{0}%
     \else
-      \read0 to \extractbbversion
-        \long\def\getextractbbversion#1Version #2 #3\stop{%
-          \def\extractbbversion{#2}}%
-        \expandafter\getextractbbversion\extractbbversion Version 0 \stop
+      \read0 to \extractbbversion % \par
+      \ifeof0 %
+        \def\extractbbversion{0}%
+      \else
+        \read0 to \extractbbversion
+          \long\def\getextractbbversion#1Version #2 #3\stop{%
+            \def\extractbbversion{#2}}%
+          \expandafter\getextractbbversion\extractbbversion Version 0 \stop
+      \fi
     \fi
   \fi
 \ifnum\extractbbversion<20201111 %





More information about the latex3-commits mailing list.