[latex3-commits] [git/LaTeX3-latex3-latex2e] graphics-compat: discard one brace group for {foo.bar}.png (b67c6d50)

David Carlisle d.p.carlisle at gmail.com
Wed Oct 9 00:38:17 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : graphics-compat
Link       : https://github.com/latex3/latex2e/commit/b67c6d5035cee1b1951492d0f2d8db6b869d9a03

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

commit b67c6d5035cee1b1951492d0f2d8db6b869d9a03
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Tue Oct 8 23:38:17 2019 +0100

    discard one brace group for {foo.bar}.png


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

b67c6d5035cee1b1951492d0f2d8db6b869d9a03
 required/graphics/graphics.dtx                              |   8 +++++++-
 .../graphics/{cat.eps => testfiles/support/foo.bar.eps}     |   0
 .../graphics/testfiles/support/foo.bar.png                  | Bin
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/required/graphics/graphics.dtx b/required/graphics/graphics.dtx
index 8f7d54a9..6ab4190c 100644
--- a/required/graphics/graphics.dtx
+++ b/required/graphics/graphics.dtx
@@ -1089,8 +1089,14 @@
   \let\input at path\Ginput at path
 %    \end{macrocode}
 %    A lot of quote juggling going on here (room for improvements).
+%
+% \changes{v1.3c}{2019/10/08}
+%     {strip one brace group}
+% Earlier versions required |{foo.bar}.png| to hide dots in filenames, we support this
+% by discarding any brace group that starts the filename (this means that spaces at the
+% start of the filename are also lost).
 %    \begin{macrocode}
-  \set at curr@file{#1}%
+  \expandafter\set at curr@file\expandafter{\@firstofone#1\@empty}%
   \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}}%
diff --git a/required/graphics/cat.eps b/required/graphics/testfiles/support/foo.bar.eps
similarity index 100%
copy from required/graphics/cat.eps
copy to required/graphics/testfiles/support/foo.bar.eps
diff --git a/base/testfiles-filename/foo bar.png b/required/graphics/testfiles/support/foo.bar.png
similarity index 100%
copy from base/testfiles-filename/foo bar.png
copy to required/graphics/testfiles/support/foo.bar.png





More information about the latex3-commits mailing list