[latex3-commits] [git/LaTeX3-latex3-latex2e] input-fix: Update ltfiles.dtx to handle filenames with spaces in them correctly (6175bac7)
Johannes Braams
texniek at braams.xs4all.nl
Sat Jul 4 00:08:38 CEST 2020
Repository : https://github.com/latex3/latex2e
On branch : input-fix
Link : https://github.com/latex3/latex2e/commit/6175bac7a491deedceb1a70f8cb4ee1a1b724b53
>---------------------------------------------------------------
commit 6175bac7a491deedceb1a70f8cb4ee1a1b724b53
Author: Johannes Braams <texniek at braams.xs4all.nl>
Date: Sat Jul 4 00:08:38 2020 +0200
Update ltfiles.dtx to handle filenames with spaces in them correctly
>---------------------------------------------------------------
6175bac7a491deedceb1a70f8cb4ee1a1b724b53
base/ltfiles.dtx | 41 ++++++++++++++++-------------------------
1 file changed, 16 insertions(+), 25 deletions(-)
diff --git a/base/ltfiles.dtx b/base/ltfiles.dtx
index ad524e75..3b7df489 100644
--- a/base/ltfiles.dtx
+++ b/base/ltfiles.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2020-06-05 v1.2h LaTeX Kernel (File Handling)]
+ [2020-07-03 v1.2i LaTeX Kernel (File Handling)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfiles.dtx}
@@ -1114,41 +1114,32 @@
% Define |\@iinput| (i.e., |\input|) in terms of
% |\InputIfIfileExists|.
% \changes{v0.9b}{1993/12/04}{Macro reimplemented}
-% \changes{v1.2h}{2020/06/01}{Trim leading and trailing spaces}
+% \changes{v1.2i}{2020-07-03}{Trim leading and trailing spaces}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease> {\@iinput}{Quote file names}%
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\@iinput}{Accept spaces in filenames}%
\def\@iinput#1{%
- \InputIfFileExists{#1}{}%
+ \set at curr@file at trim@spaces{#1}%
+ \expandafter\InputIfFileExists\expandafter{\@curr at file}{}%
{\filename at parse\@curr at file
\edef\reserved at a{\noexpand\@missingfileerror
{\filename at area\filename at base}%
{\ifx\filename at ext\relax tex\else\filename at ext\fi}}%
\reserved at a}}
-% \end{macrocode}
-% Because the command |\set at curr@file at trim@spaces| needs a
-% control sequence that is undefined until \file{ltexpl.ltx} is
-% loaded into the format (which is currently one of latest action
-% during format building) the new definition can not take effect
-% before that time. The construct which hihacks |\jump| works but
-% is unacceptable. Therefoer this change has been postponed.
-% \begin{macrocode}
-\let\@@dump\dump
-\def\dump{%
- \def\@iinput##1{%
- \set at curr@file at trim@spaces{##1}% JBnew
- \expandafter\InputIfFileExists\expandafter{\@curr at file}{}% JBnew
- {\filename at parse\@curr at file
- \edef\reserved at a{\noexpand\@missingfileerror
- {\filename at area\filename at base}%
- {\ifx\filename at ext\relax tex\else\filename at ext\fi}}%
- \reserved at a}}%
- \@@dump
- }
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}
+%<latexrelease> {\@iinput}{Quote file names}%
+%<latexrelease>\def\@iinput#1{%
+%<latexrelease> \InputIfFileExists{#1}{}%
+%<latexrelease> {\filename at parse\@curr at file
+%<latexrelease> \edef\reserved at a{\noexpand\@missingfileerror
+%<latexrelease> {\filename at area\filename at base}%
+%<latexrelease> {\ifx\filename at ext\relax tex\else\filename at ext\fi}}%
+%<latexrelease> \reserved at a}}
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\@iinput}{Quote file names}%
%<latexrelease>\def\@iinput#1{%
More information about the latex3-commits
mailing list.