[latex3-commits] [git/LaTeX3-latex3-graphics-def] zipped: Add 'zipped' type and make it raise an error in dvipdfmx (86b777d)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Mar 5 18:43:08 CET 2021


Repository : https://github.com/latex3/graphics-def
On branch  : zipped
Link       : https://github.com/latex3/graphics-def/commit/86b777d38aa6f76757bd362880871be4927286b4

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

commit 86b777d38aa6f76757bd362880871be4927286b4
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Mar 5 14:43:08 2021 -0300

    Add 'zipped' type and make it raise an error in dvipdfmx
    
    Same as for xetex.def, with slightly changed error message


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

86b777d38aa6f76757bd362880871be4927286b4
 dvipdfmx.def | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/dvipdfmx.def b/dvipdfmx.def
index a8ebdad..592974b 100644
--- a/dvipdfmx.def
+++ b/dvipdfmx.def
@@ -130,6 +130,13 @@
   \fi
 }
 \let\Gread at bmp\Gread at pdf
+\def\Gread at zipped#1{\Gread at false}
+\def\Ginclude at zipped#1{%
+  \PackageError{graphics}
+    {Unsupported graphics extension \Gin at ext\space with dvipdfmx}
+    {dvipdfmx does not support compressed graphics.\MessageBreak
+     Uncompress `#1' and use the uncompressed file.}%
+}
 \def\Ginclude at pdf#1{%
   \let\Gin at decode\@empty
   \Gin at interpolatefalse
@@ -302,11 +309,11 @@
 \@namedef{Gin at rule@.mps}#1{{mps}{.mps}{#1}}
 \@namedef{Gin at rule@.MPS}#1{{mps}{.mps}{#1}}
 % (don't bother with uppercase versions for these Unixish extensions)
-\@namedef{Gin at rule@.pz}#1{{eps}{.xbb}{`gunzip -c #1}}
-\@namedef{Gin at rule@.eps.Z}#1{{eps}{.eps.xbb}{`gunzip -c #1}}
-\@namedef{Gin at rule@.ps.Z}#1{{eps}{.ps.xbb}{`gunzip -c #1}}
-\@namedef{Gin at rule@.ps.gz}#1{{eps}{.ps.xbb}{`gunzip -c #1}}
-\@namedef{Gin at rule@.eps.gz}#1{{eps}{.eps.xbb}{`gunzip -c #1}}
+\@namedef{Gin at rule@.pz}#1{{zipped}{.xbb}{#1}}
+\@namedef{Gin at rule@.eps.Z}#1{{zipped}{.eps.xbb}{#1}}
+\@namedef{Gin at rule@.ps.Z}#1{{zipped}{.ps.xbb}{#1}}
+\@namedef{Gin at rule@.ps.gz}#1{{zipped}{.ps.xbb}{#1}}
+\@namedef{Gin at rule@.eps.gz}#1{{zipped}{.eps.xbb}{#1}}
 %
 \@namedef{Gin at rule@*}#1{{eps}{\Gin at ext}{#1}}
 \@ifundefined{ifGin at setpagesize}





More information about the latex3-commits mailing list.