[latex3-commits] [git/LaTeX3-latex3-latex2e] unquote: unquote \@curr at file and special case .gz (d3d7c8d1)
David Carlisle
d.p.carlisle at gmail.com
Sun Nov 3 20:28:38 CET 2019
Repository : https://github.com/latex3/latex2e
On branch : unquote
Link : https://github.com/latex3/latex2e/commit/d3d7c8d15ffc48c75b6e60e64bf3bf5dad41ceed
>---------------------------------------------------------------
commit d3d7c8d15ffc48c75b6e60e64bf3bf5dad41ceed
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Sun Nov 3 19:28:38 2019 +0000
unquote \@curr at file and special case .gz
>---------------------------------------------------------------
d3d7c8d15ffc48c75b6e60e64bf3bf5dad41ceed
required/graphics/graphics.dtx | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/required/graphics/graphics.dtx b/required/graphics/graphics.dtx
index b6de6023..b431162e 100644
--- a/required/graphics/graphics.dtx
+++ b/required/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 at sepdefault}
% \changes{v0.6a}{1994/11/29}
% {remove \cs{Gin at sep}}
+% \begin{macro}{\Gin at gzext}
+% \changes{v1.3d}{2019/11/01}
+% {macro added}
% This must match the token used by |\filename at parse| to delimit the
% extension.
% \begin{macrocode}
\def\Gin at sepdefault{.}
% \end{macrocode}
+%
+% \begin{macrocode}
+\edef\Gin at gzext{\detokenize{gz}}
+% \edef{macrocode}
% \end{macro}
%
% \begin{macro}{\set at 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 at name} now unquoted}
% \begin{macrocode}
\set at curr@file{#1}%
- \edef\uq at curr@file{\expandafter\unquote at name\expandafter{\@curr at file}}%
- \expandafter\filename at parse\expandafter{\uq at curr@file}%
- \edef\filename at area{\expandafter\quote at name\expandafter{\filename at area}}%
- \edef\filename at base{\expandafter\quote at name\expandafter{\filename at base}}%
+ \expandafter\filename at parse\expandafter{\@curr at file}%
+% \end{macrocode}
+% If extension is |.gz| tack on to previous extension, eg |.eps.gz| if available.
+% \begin{macrocode}
+ \ifx\filename at ext\Gin at gzext
+ \expandafter\filename at parse\expandafter{\filename at base}%
+ \ifx\filename at ext\relax
+ \let\filename at ext\Gin at gzext
+ \else
+ \edef\Gin at ext{\Gin at ext.\Gin at gzext}%
+ \fi
+ \fi
\ifx\filename at ext\relax
\@for\Gin at temp:=\Gin at extensions\do{%
\ifx\Gin at ext\relax
More information about the latex3-commits
mailing list