summaryrefslogtreecommitdiff
path: root/macros/latex/base/ltxdoc.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/base/ltxdoc.dtx')
-rw-r--r--macros/latex/base/ltxdoc.dtx18
1 files changed, 14 insertions, 4 deletions
diff --git a/macros/latex/base/ltxdoc.dtx b/macros/latex/base/ltxdoc.dtx
index f250b2cb19..696af32ab1 100644
--- a/macros/latex/base/ltxdoc.dtx
+++ b/macros/latex/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2019/09/16 v2.0y Standard LaTeX documentation class]
+%<class> [2020/08/21 v2.1a Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -54,6 +54,7 @@
%
% \changes{v2.0i}{1994/04/29}{Update the documentation.}
% \changes{v2.0s}{1998/08/17}{(RmS) Documentation fixes.}
+% \changes{v2.1a}{2020/08/21}{Integration of new hook management interface}
%
% \section{Documentation of the \LaTeX\ sources}
%
@@ -422,6 +423,10 @@
\def\partname{File}
% \end{macrocode}
%
+%
+%
+% \changes{v2.0z}{2020/05/17}{Support spaces \emph{within} filenames
+% (gh/218)}
% \begin{macrocode}
\newcommand*{\DocInclude}[1]{%
\relax
@@ -432,14 +437,19 @@
{\def\currentfile{#1.dtx}}%
\ifnum\@auxout=\@partaux
\@latexerr{\string\include\space cannot be nested}\@eha
- \else \@docinclude#1 \fi}
+ \else
+ \set@curr@file{#1}%
+ \edef\@curr@file{\@strip@tex@ext\@curr@file}%
+ \expandafter\@docinclude\expandafter{\@curr@file}
+ \fi}
\def\@docinclude#1 {\clearpage
-\if@filesw \immediate\write\@mainaux{\string\@input{#1.aux}}\fi
+\if@filesw \immediate\write\@mainaux{\string\@input{"#1.aux"}}\fi
\@tempswatrue\if@partsw \@tempswafalse\edef\@tempb{#1}\@for
\@tempa:=\@partlist\do{\ifx\@tempa\@tempb\@tempswatrue\fi}\fi
\if@tempswa \let\@auxout\@partaux \if@filesw
-\immediate\openout\@partaux #1.aux
+\immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}\fi
+\@filehook@set@CurrentFile
% \end{macrocode}
% We need to save (and later restore) various index-related
% commands which might be changed by the included file.