texlive[65318] Master/texmf-dist: graphicscache (20dec22)

commits+karl at tug.org commits+karl at tug.org
Tue Dec 20 21:57:18 CET 2022


Revision: 65318
          http://tug.org/svn/texlive?view=revision&revision=65318
Author:   karl
Date:     2022-12-20 21:57:17 +0100 (Tue, 20 Dec 2022)
Log Message:
-----------
graphicscache (20dec22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/graphicscache/LICENSE
    trunk/Master/texmf-dist/doc/latex/graphicscache/graphicscache.pdf
    trunk/Master/texmf-dist/source/latex/graphicscache/graphicscache.dtx
    trunk/Master/texmf-dist/tex/latex/graphicscache/graphicscache.sty

Modified: trunk/Master/texmf-dist/doc/latex/graphicscache/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphicscache/LICENSE	2022-12-20 00:51:26 UTC (rev 65317)
+++ trunk/Master/texmf-dist/doc/latex/graphicscache/LICENSE	2022-12-20 20:57:17 UTC (rev 65318)
@@ -1,6 +1,6 @@
 BSD 3-Clause License
 
-Copyright (c) 2018, Max Schwarz
+Copyright (c) 2018-2021, Max Schwarz
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

Modified: trunk/Master/texmf-dist/doc/latex/graphicscache/graphicscache.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/graphicscache/graphicscache.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/graphicscache/graphicscache.dtx	2022-12-20 00:51:26 UTC (rev 65317)
+++ trunk/Master/texmf-dist/source/latex/graphicscache/graphicscache.dtx	2022-12-20 20:57:17 UTC (rev 65318)
@@ -19,7 +19,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{graphicscache}
 %<*package>
-    [2021/08/02 v0.3 Cache includegraphics calls]
+    [2022/12/20 v0.4 Windows support and special character escaping]
 %</package>
 %
 %<*driver>
@@ -60,6 +60,7 @@
 % \changes{v0.1}{2018/10/03}{Initial version}
 % \changes{v0.2}{2021/04/08}{Better compatibility with different graphicx versions}
 % \changes{v0.3}{2021/08/02}{Added cachedir option}
+% \changes{v0.4}{2022/12/20}{Windows support and special character escaping}
 %
 % \DoNotIndex{\newcommand,\newenvironment}
 %
@@ -213,6 +214,7 @@
 \RequirePackage{filemod}
 \RequirePackage{letltxmacro}
 \RequirePackage{pgfopts}
+\RequirePackage{pgffor}
 \RequirePackage{ifplatform}
 \RequirePackage{pdftexcmds}
 \RequirePackage{ltxcmds}
@@ -220,6 +222,7 @@
 \newif\ifgraphicscache at compress
 \newif\ifgraphicscache at listing
 \newif\ifgraphicscache at hashshortnames
+\newif\ifgraphicscache at gsnotavailable\graphicscache at gsnotavailablefalse
 \def\graphicscache at graphicsargs{}
 \newlength\graphicscache at tmplen
 \newcommand{\graphicscache at addarg}[1]{%
@@ -309,25 +312,115 @@
   \newwrite\graphicscache at listout
   \immediate\openout\graphicscache at listout=\jobname.graphicscache
 \fi
+%
+% shellesc has a bug on Ubuntu 16.04 (\ShellEscape is not immediate).
+% So we simply define our own shellescape macro.
+\ifx\lastsavedimageresourcepages\@undefined
+  \protected\def\graphicscache at ShellEscape{\immediate\write18 }
+\else
+  \protected\def\graphicscache at ShellEscape#1{%
+    \directlua{os.execute("\luaescapestring{#1}")}}
+\fi
 %    \end{macrocode}
 %
+% \begin{macro}{\graphicscache at callgswithname}
+%    This macro calls ghostscript using the name specified in the first argument.
+%    \begin{macrocode}
+\newcommand{\graphicscache at callgswithname}[1]{%
+  \ifwindows
+    \graphicscache at ShellEscape{#1
+      -sOutputFile=\graphicscache at output\space
+      -sDEVICE=pdfwrite
+      -dCompatibilityLevel=1.4
+      -dPDFSETTINGS=/prepress
+      -dNOPAUSE -dQUIET -dBATCH
+      -c "<<
+        /AutoFilterColorImages false
+        /EncodeColorImages true
+        /ColorImageFilter /\graphicscache at compress@mode\space
+        /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /ColorImageResolution \graphicscache at dpi\space
+        /AutoFilterGrayImages false
+        /EncodeGrayImages true
+        /GrayImageFilter /\graphicscache at compress@mode\space
+        /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /GrayImageResolution \graphicscache at dpi\space
+      >> setdistillerparams"
+      -f \graphicscache at cachedir\string\graphicscacheout.pdf
+    }%
+  \else
+    \graphicscache at ShellEscape{#1
+      -sOutputFile=\graphicscache at output\space
+      -sDEVICE=pdfwrite
+      -dCompatibilityLevel=1.4
+      -dPDFSETTINGS=/prepress
+      -dNOPAUSE -dQUIET -dBATCH
+      -c '<<
+        /AutoFilterColorImages false
+        /EncodeColorImages true
+        /ColorImageFilter /\graphicscache at compress@mode\space
+        /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /ColorImageResolution \graphicscache at dpi\space
+        /AutoFilterGrayImages false
+        /EncodeGrayImages true
+        /GrayImageFilter /\graphicscache at compress@mode\space
+        /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /GrayImageResolution \graphicscache at dpi\space
+      >> setdistillerparams'
+      -f \graphicscache at cachedir/graphicscacheout.pdf \string|\string| rm \graphicscache at output
+    }%
+  \fi
+}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\graphicscache at callgs}
+%    This macro finds the correct ghostscript executable to call.
+%    \begin{macrocode}
+\newcommand{\graphicscache at callgs}{%
+%    \end{macrocode}
+%    If we previously established gs is not available, do nothing.
+%    \begin{macrocode}
+  \ifgraphicscache at gsnotavailable
+  \else
+    \@ifundefined{graphicscache at gscommand}{%
+      \foreach \cmd in {rungs,gs,mgs} {%
+        \PackageInfo{graphicscache}{Trying \cmd\space to call ghostscript...^^J}%
+        \graphicscache at callgswithname{\cmd}%
+        \IfFileExists{\graphicscache at output}{%
+            \PackageInfo{graphicscache}{Found a working ghostscript called '\cmd'.}%
+            \global\edef\graphicscache at gscommand{\cmd}%
+            \breakforeach
+        }{}%
+      }%
+      \@ifundefined{graphicscache at gscommand}{%
+        \PackageWarning{graphicscache}{Could not find a working ghostscript executable. I will not compress any images.}{}%
+        \graphicscache at gsnotavailabletrue
+      }{}%
+    }{%
+      \PackageInfo{graphicscache}{Calling gs with name '\graphicscache at gscommand'^^J}
+      \graphicscache at callgswithname{\graphicscache at gscommand}
+    }%
+  \fi
+}
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\graphicscache at dorender}
 %    Here, we actually perform the rendering. Sadly, this is quite complex due
 %    to cross-platform support.
 %    \begin{macrocode}
 \newcommand{\graphicscache at dorender}{%
-  \message{Rendering \graphicscache at outputhash: \graphicscache at fname\space with args: \graphicscache at graphicsargs\space (master file)}%
+  \PackageInfo{graphicscache}{Rendering \graphicscache at outputhash: \graphicscache at fname\space with args: \graphicscache at graphicsargs\space (master file)}%
   \ifwindows
-    \immediate\write18{md "\graphicscache at cachedir" 2>NUL}%
+    \graphicscache at ShellEscape{md "\graphicscache at cachedir" 2>NUL}%
   \else
-    \immediate\write18{mkdir -p "\graphicscache at cachedir"}%
+    \graphicscache at ShellEscape{mkdir -p "\graphicscache at cachedir"}%
   \fi
 %    \end{macrocode}
 % First, render the graphics.
 %    \begin{macrocode}
   \ifwindows
-    \immediate\write18{del /q \graphicscache at cachedir\string\graphicscacheout.pdf}
-    \immediate\write18{pdflatex
+    \graphicscache at ShellEscape{del /q \graphicscache at cachedir\string\graphicscacheout.pdf}
+    \graphicscache at ShellEscape{pdflatex
       -jobname graphicscacheout
       -interaction nonstopmode
       -output-directory "\graphicscache at cachedir"
@@ -337,11 +430,11 @@
       \string\begin{document}\string\includegraphics[\graphicscache at graphicsargs]{\graphicscache at fname}\string\end{document}"
     }%
     \IfFileExists{\graphicscache at cachedir/graphicscacheout.pdf}{}{%
-      \PackageError{graphicscache}{External pdflatex call failed (see above)}{}%
+      \PackageWarning{graphicscache}{External pdflatex call failed (see above)}%
       \def\graphicscache at output{}%
     }
   \else
-    \immediate\write18{pdflatex
+    \graphicscache at ShellEscape{pdflatex
       -jobname graphicscacheout
       -interaction nonstopmode
       -output-directory "\graphicscache at cachedir"
@@ -349,7 +442,7 @@
       \string\usepackage{graphicx}
       \string\usepackage[export]{adjustbox}
       \string\begin{document}\string\includegraphics[\graphicscache at graphicsargs]{\graphicscache at fname}\string\end{document}'
-      > /dev/null || rm "\graphicscache at cachedir/graphicscacheout.pdf"
+      > /dev/null \string|\string| rm "\graphicscache at cachedir/graphicscacheout.pdf"
     }%
   \fi
 %    \end{macrocode}
@@ -357,58 +450,16 @@
 % file.
 %    \begin{macrocode}
   \ifgraphicscache at compress
-    \message{With compression: \graphicscache at compress@mode}%
-    \ifwindows
-      \immediate\write18{mgs
-        -sOutputFile=\graphicscache at output\space
-        -sDEVICE=pdfwrite
-        -dCompatibilityLevel=1.4
-        -dPDFSETTINGS=/prepress
-        -dNOPAUSE -dQUIET -dBATCH
-        -c ".setpdfwrite <<
-          /AutoFilterColorImages false
-          /EncodeColorImages true
-          /ColorImageFilter /\graphicscache at compress@mode\space
-          /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /ColorImageResolution \graphicscache at dpi\space
-          /AutoFilterGrayImages false
-          /EncodeGrayImages true
-          /GrayImageFilter /\graphicscache at compress@mode\space
-          /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /GrayImageResolution \graphicscache at dpi\space
-        >> setdistillerparams"
-        -f \graphicscache at cachedir\string\graphicscacheout.pdf
-      }%
-    \else
-      \immediate\write18{gs
-        -sOutputFile=\graphicscache at output\space
-        -sDEVICE=pdfwrite
-        -dCompatibilityLevel=1.4
-        -dPDFSETTINGS=/prepress
-        -dNOPAUSE -dQUIET -dBATCH
-        -c '.setpdfwrite <<
-          /AutoFilterColorImages false
-          /EncodeColorImages true
-          /ColorImageFilter /\graphicscache at compress@mode\space
-          /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /ColorImageResolution \graphicscache at dpi\space
-          /AutoFilterGrayImages false
-          /EncodeGrayImages true
-          /GrayImageFilter /\graphicscache at compress@mode\space
-          /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /GrayImageResolution \graphicscache at dpi\space
-        >> setdistillerparams'
-        -f \graphicscache at cachedir/graphicscacheout.pdf || rm \graphicscache at output
-      }%
-    \fi
+    \PackageInfo{graphicscache}{With compression: \graphicscache at compress@mode}%
+    \graphicscache at callgs
   \else
-    \message{Direct}%
+    \PackageInfo{graphicscache}{Direct}%
     \ifwindows
-      \immediate\write18{
+      \graphicscache at ShellEscape{
         copy \graphicscache at cachedir\string\graphicscacheout.pdf \graphicscache at output
       }%
     \else
-      \immediate\write18{
+      \graphicscache at ShellEscape{
         cp \graphicscache at cachedir/graphicscacheout.pdf \graphicscache at output
       }%
     \fi
@@ -437,7 +488,7 @@
     \filemodcmp{\graphicscache at fname}{\graphicscache at output}{% input is newer
       \graphicscache at dorender%
     }{% Output is newer
-      \message{Already have \graphicscache at outputhash: \graphicscache at fname}%
+      \PackageInfo{graphicscache}{Already have \graphicscache at outputhash: \graphicscache at fname}%
     }%
 %    \end{macrocode}
 % If it still does not exist, we are likely in a strange environment
@@ -560,7 +611,7 @@
     \edef\graphicscache at outputhash{\pdf at mdfivesum{\graphicscache at options\graphicscache at graphicsargs\graphicscache at hashedname}}%
     \edef\graphicscache at output{\graphicscache at cachedir/\graphicscache at outputhash.pdf}%
     \ifgraphicscache at listing
-      \message{graphicscache: includegraphics\{#2\} => \graphicscache at output}%
+      \PackageInfo{graphicscache}{graphicscache: includegraphics\{#2\} => \graphicscache at output}%
       \immediate\write\graphicscache at listout{#2 \graphicscache at fname\space \graphicscache at output}%
     \fi
     \graphicscache at work

Modified: trunk/Master/texmf-dist/tex/latex/graphicscache/graphicscache.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/graphicscache/graphicscache.sty	2022-12-20 00:51:26 UTC (rev 65317)
+++ trunk/Master/texmf-dist/tex/latex/graphicscache/graphicscache.sty	2022-12-20 20:57:17 UTC (rev 65318)
@@ -16,7 +16,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{graphicscache}
-    [2021/08/02 v0.3 Cache includegraphics calls]
+    [2022/12/20 v0.4 Windows support and special character escaping]
 \NeedsTeXFormat{LaTeX2e}[1994/06/01]
 \ProvidesPackage{graphicscache}[2018/10/02 Graphics Cache]
 \RequirePackage{graphicx}
@@ -24,6 +24,7 @@
 \RequirePackage{filemod}
 \RequirePackage{letltxmacro}
 \RequirePackage{pgfopts}
+\RequirePackage{pgffor}
 \RequirePackage{ifplatform}
 \RequirePackage{pdftexcmds}
 \RequirePackage{ltxcmds}
@@ -31,6 +32,7 @@
 \newif\ifgraphicscache at compress
 \newif\ifgraphicscache at listing
 \newif\ifgraphicscache at hashshortnames
+\newif\ifgraphicscache at gsnotavailable\graphicscache at gsnotavailablefalse
 \def\graphicscache at graphicsargs{}
 \newlength\graphicscache at tmplen
 \newcommand{\graphicscache at addarg}[1]{%
@@ -104,16 +106,90 @@
   \newwrite\graphicscache at listout
   \immediate\openout\graphicscache at listout=\jobname.graphicscache
 \fi
+\ifx\lastsavedimageresourcepages\@undefined
+  \protected\def\graphicscache at ShellEscape{\immediate\write18 }
+\else
+  \protected\def\graphicscache at ShellEscape#1{%
+    \directlua{os.execute("\luaescapestring{#1}")}}
+\fi
+\newcommand{\graphicscache at callgswithname}[1]{%
+  \ifwindows
+    \graphicscache at ShellEscape{#1
+      -sOutputFile=\graphicscache at output\space
+      -sDEVICE=pdfwrite
+      -dCompatibilityLevel=1.4
+      -dPDFSETTINGS=/prepress
+      -dNOPAUSE -dQUIET -dBATCH
+      -c "<<
+        /AutoFilterColorImages false
+        /EncodeColorImages true
+        /ColorImageFilter /\graphicscache at compress@mode\space
+        /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /ColorImageResolution \graphicscache at dpi\space
+        /AutoFilterGrayImages false
+        /EncodeGrayImages true
+        /GrayImageFilter /\graphicscache at compress@mode\space
+        /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /GrayImageResolution \graphicscache at dpi\space
+      >> setdistillerparams"
+      -f \graphicscache at cachedir\string\graphicscacheout.pdf
+    }%
+  \else
+    \graphicscache at ShellEscape{#1
+      -sOutputFile=\graphicscache at output\space
+      -sDEVICE=pdfwrite
+      -dCompatibilityLevel=1.4
+      -dPDFSETTINGS=/prepress
+      -dNOPAUSE -dQUIET -dBATCH
+      -c '<<
+        /AutoFilterColorImages false
+        /EncodeColorImages true
+        /ColorImageFilter /\graphicscache at compress@mode\space
+        /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /ColorImageResolution \graphicscache at dpi\space
+        /AutoFilterGrayImages false
+        /EncodeGrayImages true
+        /GrayImageFilter /\graphicscache at compress@mode\space
+        /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
+        /GrayImageResolution \graphicscache at dpi\space
+      >> setdistillerparams'
+      -f \graphicscache at cachedir/graphicscacheout.pdf \string|\string| rm \graphicscache at output
+    }%
+  \fi
+}
+\newcommand{\graphicscache at callgs}{%
+  \ifgraphicscache at gsnotavailable
+  \else
+    \@ifundefined{graphicscache at gscommand}{%
+      \foreach \cmd in {rungs,gs,mgs} {%
+        \PackageInfo{graphicscache}{Trying \cmd\space to call ghostscript...^^J}%
+        \graphicscache at callgswithname{\cmd}%
+        \IfFileExists{\graphicscache at output}{%
+            \PackageInfo{graphicscache}{Found a working ghostscript called '\cmd'.}%
+            \global\edef\graphicscache at gscommand{\cmd}%
+            \breakforeach
+        }{}%
+      }%
+      \@ifundefined{graphicscache at gscommand}{%
+        \PackageWarning{graphicscache}{Could not find a working ghostscript executable. I will not compress any images.}{}%
+        \graphicscache at gsnotavailabletrue
+      }{}%
+    }{%
+      \PackageInfo{graphicscache}{Calling gs with name '\graphicscache at gscommand'^^J}
+      \graphicscache at callgswithname{\graphicscache at gscommand}
+    }%
+  \fi
+}
 \newcommand{\graphicscache at dorender}{%
-  \message{Rendering \graphicscache at outputhash: \graphicscache at fname\space with args: \graphicscache at graphicsargs\space (master file)}%
+  \PackageInfo{graphicscache}{Rendering \graphicscache at outputhash: \graphicscache at fname\space with args: \graphicscache at graphicsargs\space (master file)}%
   \ifwindows
-    \immediate\write18{md "\graphicscache at cachedir" 2>NUL}%
+    \graphicscache at ShellEscape{md "\graphicscache at cachedir" 2>NUL}%
   \else
-    \immediate\write18{mkdir -p "\graphicscache at cachedir"}%
+    \graphicscache at ShellEscape{mkdir -p "\graphicscache at cachedir"}%
   \fi
   \ifwindows
-    \immediate\write18{del /q \graphicscache at cachedir\string\graphicscacheout.pdf}
-    \immediate\write18{pdflatex
+    \graphicscache at ShellEscape{del /q \graphicscache at cachedir\string\graphicscacheout.pdf}
+    \graphicscache at ShellEscape{pdflatex
       -jobname graphicscacheout
       -interaction nonstopmode
       -output-directory "\graphicscache at cachedir"
@@ -123,11 +199,11 @@
       \string\begin{document}\string\includegraphics[\graphicscache at graphicsargs]{\graphicscache at fname}\string\end{document}"
     }%
     \IfFileExists{\graphicscache at cachedir/graphicscacheout.pdf}{}{%
-      \PackageError{graphicscache}{External pdflatex call failed (see above)}{}%
+      \PackageWarning{graphicscache}{External pdflatex call failed (see above)}%
       \def\graphicscache at output{}%
     }
   \else
-    \immediate\write18{pdflatex
+    \graphicscache at ShellEscape{pdflatex
       -jobname graphicscacheout
       -interaction nonstopmode
       -output-directory "\graphicscache at cachedir"
@@ -135,62 +211,20 @@
       \string\usepackage{graphicx}
       \string\usepackage[export]{adjustbox}
       \string\begin{document}\string\includegraphics[\graphicscache at graphicsargs]{\graphicscache at fname}\string\end{document}'
-      > /dev/null || rm "\graphicscache at cachedir/graphicscacheout.pdf"
+      > /dev/null \string|\string| rm "\graphicscache at cachedir/graphicscacheout.pdf"
     }%
   \fi
   \ifgraphicscache at compress
-    \message{With compression: \graphicscache at compress@mode}%
-    \ifwindows
-      \immediate\write18{mgs
-        -sOutputFile=\graphicscache at output\space
-        -sDEVICE=pdfwrite
-        -dCompatibilityLevel=1.4
-        -dPDFSETTINGS=/prepress
-        -dNOPAUSE -dQUIET -dBATCH
-        -c ".setpdfwrite <<
-          /AutoFilterColorImages false
-          /EncodeColorImages true
-          /ColorImageFilter /\graphicscache at compress@mode\space
-          /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /ColorImageResolution \graphicscache at dpi\space
-          /AutoFilterGrayImages false
-          /EncodeGrayImages true
-          /GrayImageFilter /\graphicscache at compress@mode\space
-          /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /GrayImageResolution \graphicscache at dpi\space
-        >> setdistillerparams"
-        -f \graphicscache at cachedir\string\graphicscacheout.pdf
-      }%
-    \else
-      \immediate\write18{gs
-        -sOutputFile=\graphicscache at output\space
-        -sDEVICE=pdfwrite
-        -dCompatibilityLevel=1.4
-        -dPDFSETTINGS=/prepress
-        -dNOPAUSE -dQUIET -dBATCH
-        -c '.setpdfwrite <<
-          /AutoFilterColorImages false
-          /EncodeColorImages true
-          /ColorImageFilter /\graphicscache at compress@mode\space
-          /ColorImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /ColorImageResolution \graphicscache at dpi\space
-          /AutoFilterGrayImages false
-          /EncodeGrayImages true
-          /GrayImageFilter /\graphicscache at compress@mode\space
-          /GrayImageDict << /ColorTransform 1 /QFactor \graphicscache at qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
-          /GrayImageResolution \graphicscache at dpi\space
-        >> setdistillerparams'
-        -f \graphicscache at cachedir/graphicscacheout.pdf || rm \graphicscache at output
-      }%
-    \fi
+    \PackageInfo{graphicscache}{With compression: \graphicscache at compress@mode}%
+    \graphicscache at callgs
   \else
-    \message{Direct}%
+    \PackageInfo{graphicscache}{Direct}%
     \ifwindows
-      \immediate\write18{
+      \graphicscache at ShellEscape{
         copy \graphicscache at cachedir\string\graphicscacheout.pdf \graphicscache at output
       }%
     \else
-      \immediate\write18{
+      \graphicscache at ShellEscape{
         cp \graphicscache at cachedir/graphicscacheout.pdf \graphicscache at output
       }%
     \fi
@@ -205,7 +239,7 @@
     \filemodcmp{\graphicscache at fname}{\graphicscache at output}{% input is newer
       \graphicscache at dorender%
     }{% Output is newer
-      \message{Already have \graphicscache at outputhash: \graphicscache at fname}%
+      \PackageInfo{graphicscache}{Already have \graphicscache at outputhash: \graphicscache at fname}%
     }%
     \filemodcmp{\graphicscache at fname}{\graphicscache at output}{% input is newer/output does not exist
       \graphicscache at native
@@ -301,7 +335,7 @@
     \edef\graphicscache at outputhash{\pdf at mdfivesum{\graphicscache at options\graphicscache at graphicsargs\graphicscache at hashedname}}%
     \edef\graphicscache at output{\graphicscache at cachedir/\graphicscache at outputhash.pdf}%
     \ifgraphicscache at listing
-      \message{graphicscache: includegraphics\{#2\} => \graphicscache at output}%
+      \PackageInfo{graphicscache}{graphicscache: includegraphics\{#2\} => \graphicscache at output}%
       \immediate\write\graphicscache at listout{#2 \graphicscache at fname\space \graphicscache at output}%
     \fi
     \graphicscache at work



More information about the tex-live-commits mailing list.