[latex3-commits] [git/LaTeX3-latex3-latex2e] 2019-10-01-PL3: expand and stringify filename before removing quotes, not after (c7b21318)

David Carlisle d.p.carlisle at gmail.com
Sat Nov 9 13:17:40 CET 2019


Repository : https://github.com/latex3/latex2e
On branch  : 2019-10-01-PL3
Link       : https://github.com/latex3/latex2e/commit/c7b21318929114f54abdb3fb0bd6ea8753ea9281

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

commit c7b21318929114f54abdb3fb0bd6ea8753ea9281
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


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

c7b21318929114f54abdb3fb0bd6ea8753ea9281
 base/ltfiles.dtx                                        |  6 ++++--
 base/ltvers.dtx                                         |  2 +-
 base/testfiles/tlb-filename-01.lvt                      | 13 +++++++++++++
 base/testfiles/{github-0094.tlg => tlb-filename-01.tlg} |  8 ++++++--
 4 files changed, 24 insertions(+), 5 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/ltvers.dtx b/base/ltvers.dtx
index 89d72953..813dd68f 100644
--- a/base/ltvers.dtx
+++ b/base/ltvers.dtx
@@ -115,7 +115,7 @@
    {2019-10-01}
 %</2ekernel|latexrelease>
 %<*2ekernel>
-\def\patch at level{2}
+\def\patch at level{3}
 %    \end{macrocode}
 %    
 % \begin{macro}{\development at branch@name}
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