[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: expand and stringify filename before removing quotes, not after (2bb99ae1)

David Carlisle d.p.carlisle at gmail.com
Sun Nov 10 09:35:56 CET 2019


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/2bb99ae184016cdad7218985d775f9eb172cc322

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

commit 2bb99ae184016cdad7218985d775f9eb172cc322
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Nov 9 12:17:40 2019 +0000

    expand and stringify filename before removing quotes, not after


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

2bb99ae184016cdad7218985d775f9eb172cc322
 base/ltfiles.dtx                                        |  6 ++++--
 base/testfiles/tlb-filename-01.lvt                      | 13 +++++++++++++
 base/testfiles/{github-0094.tlg => tlb-filename-01.tlg} |  8 ++++++--
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/base/ltfiles.dtx b/base/ltfiles.dtx
index d0d33a4c..9c8b634f 100644
--- a/base/ltfiles.dtx
+++ b/base/ltfiles.dtx
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfiles.dtx}
-             [2019/10/26 v1.2d LaTeX Kernel (File Handling)]
+             [2019/11/09 v1.2e LaTeX Kernel (File Handling)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfiles.dtx}
@@ -715,6 +715,7 @@
 %  \changes{v1.2a}{2019/07/01}{Support UTF-8}
 %  \changes{v1.2c}{2019/10/11}{Remove one brace group}
 %  \changes{v1.2d}{2019/10/26}{remove quotes}
+%  \changes{v1.2e}{2019/10/26}{expand and \cs{\string} before removing quotes}
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
@@ -725,7 +726,8 @@
     \escapechar\m at ne
     \xdef\@curr at file{%
       \expandafter\string
-        \csname\expandafter\unquote at name\expandafter{\@firstofone#1\@empty}\endcsname}%
+        \csname\@firstofone#1\@empty\endcsname}%
+    \xdef\@curr at file{\expandafter\unquote at name\expandafter{\@curr at file}}%
   \endgroup
 }
 %    \end{macrocode}
diff --git a/base/testfiles/tlb-filename-01.lvt b/base/testfiles/tlb-filename-01.lvt
new file mode 100644
index 00000000..033f4a7f
--- /dev/null
+++ b/base/testfiles/tlb-filename-01.lvt
@@ -0,0 +1,13 @@
+\documentclass{article}
+\input{test2e}
+
+\begin{document}
+\START
+\sbox0{\IfFileExists{"no file here"}{\typeout{1: yes}}{\typeout{1: no}}}
+\showthe\wd0
+
+\newcommand\myname{"no file here"}
+\sbox0{\IfFileExists{\myname}{\typeout{2: yes}}{\typeout{2: no}}}
+\showthe\wd0
+
+\END
diff --git a/base/testfiles/github-0094.tlg b/base/testfiles/tlb-filename-01.tlg
similarity index 59%
copy from base/testfiles/github-0094.tlg
copy to base/testfiles/tlb-filename-01.tlg
index 982addfb..d1f7a903 100644
--- a/base/testfiles/github-0094.tlg
+++ b/base/testfiles/tlb-filename-01.tlg
@@ -1,4 +1,8 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
-[2
-] (github-0094.aux)
+1: no
+> 0.0pt.
+l. ...\showthe\wd0
+2: no
+> 0.0pt.
+l. ...\showthe\wd0





More information about the latex3-commits mailing list