summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/graphics
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-06 22:12:38 +0000
committerKarl Berry <karl@freefriends.org>2019-11-06 22:12:38 +0000
commit7c55167ecf36309f45793303eea23651cb983f12 (patch)
tree11c014344f975231c0cb0ed300b892849a481db8 /Master/texmf-dist/source/latex/graphics
parent7b810bfb3e61d6cd1564c490490d6d005dd64813 (diff)
l2e (6nov19)
git-svn-id: svn://tug.org/texlive/trunk@52656 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/graphics')
-rw-r--r--Master/texmf-dist/source/latex/graphics/graphics.dtx55
1 files changed, 50 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/graphics/graphics.dtx b/Master/texmf-dist/source/latex/graphics/graphics.dtx
index b6de6023d44..ac570c02278 100644
--- a/Master/texmf-dist/source/latex/graphics/graphics.dtx
+++ b/Master/texmf-dist/source/latex/graphics/graphics.dtx
@@ -25,7 +25,7 @@
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2019/10/08 v1.3c Standard LaTeX Graphics (DPC,SPQR)]
+ [2019/11/01 v1.3d Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1036,11 +1036,18 @@
% \begin{macro}{\Gin@sepdefault}
% \changes{v0.6a}{1994/11/29}
% {remove \cs{Gin@sep}}
+% \begin{macro}{\Gin@gzext}
+% \changes{v1.3d}{2019/11/01}
+% {macro added}
% This must match the token used by |\filename@parse| to delimit the
% extension.
% \begin{macrocode}
\def\Gin@sepdefault{.}
% \end{macrocode}
+%
+% \begin{macrocode}
+\edef\Gin@gzext{\detokenize{gz}}
+% \edef{macrocode}
% \end{macro}
%
% \begin{macro}{\set@curr@file}
@@ -1102,12 +1109,22 @@
% \end{macrocode}
% A lot of quote juggling going on here (room for improvements).
%
+% \changes{v1.3d}{2019/11/01}
+% {\cs{curr@name} now unquoted}
% \begin{macrocode}
\set@curr@file{#1}%
- \edef\uq@curr@file{\expandafter\unquote@name\expandafter{\@curr@file}}%
- \expandafter\filename@parse\expandafter{\uq@curr@file}%
- \edef\filename@area{\expandafter\quote@name\expandafter{\filename@area}}%
- \edef\filename@base{\expandafter\quote@name\expandafter{\filename@base}}%
+ \expandafter\filename@parse\expandafter{\@curr@file}%
+% \end{macrocode}
+% If extension is |.gz| tack on to previous extension, eg |.eps.gz| if available.
+% \begin{macrocode}
+ \ifx\filename@ext\Gin@gzext
+ \expandafter\filename@parse\expandafter{\filename@base}%
+ \ifx\filename@ext\relax
+ \let\filename@ext\Gin@gzext
+ \else
+ \edef\Gin@ext{\Gin@ext\Gin@sepdefault\Gin@gzext}%
+ \fi
+ \fi
\ifx\filename@ext\relax
\@for\Gin@temp:=\Gin@extensions\do{%
\ifx\Gin@ext\relax
@@ -1116,6 +1133,34 @@
\else
\Gin@getbase{\Gin@sepdefault\filename@ext}%
% \end{macrocode}
+% At this point try adding an extension, even if the filename has one so
+% that \verb|a.b| may find \verb|a.b.png| if no file is found then revert
+% to the extension as given to get better error reporting.
+%
+% \changes{v1.3d}{2019/11/01}
+% {Try adding an extension even if the filenam had a dot.}
+% \begin{macrocode}
+\ifx\Gin@ext\relax
+\let\Gin@savedbase\filename@base
+\let\Gin@savedext\filename@ext
+ \edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}%
+ \let\filename@ext\relax
+ \@for\Gin@temp:=\Gin@extensions\do{%
+ \ifx\Gin@ext\relax
+ \Gin@getbase\Gin@temp
+ \fi}%
+% \end{macrocode}
+% Restore if no file found using theknown extensions.
+% \begin{macrocode}
+ \ifx\Gin@ext\relax
+ \let\filename@base\Gin@savedbase
+ \let\filename@ext\Gin@savedext
+ \fi
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% \end{macrocode}
% \changes{v0.4d}{1994/05/06}
% {Make file not found a warning not an error}
% \changes{v0.6a}{1994/11/29}