summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required/tools/xr.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/required/tools/xr.dtx')
-rw-r--r--macros/latex-dev/required/tools/xr.dtx13
1 files changed, 9 insertions, 4 deletions
diff --git a/macros/latex-dev/required/tools/xr.dtx b/macros/latex-dev/required/tools/xr.dtx
index a6b2ffd819..a2dbea7c1e 100644
--- a/macros/latex-dev/required/tools/xr.dtx
+++ b/macros/latex-dev/required/tools/xr.dtx
@@ -25,7 +25,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr}
-%<package> [2019/07/22 v5.05 eXternal References (DPC)]
+%<package> [2020-05-10 v5.06 eXternal References (DPC)]
%
%<*driver>
\documentclass{ltxdoc}
@@ -103,12 +103,15 @@
\let\externalcitedocument\externaldocument
% \end{macrocode}
%
-% Save the optional prefix. Start processing the first |aux| file.
+% Save the optional prefix. Start processing the first |aux| file.
+% \changes{v5.06}{2020-05-10}{Remove leading and trailing sapces from
+% the filename (gh/2223)}
% \begin{macrocode}
\def\XR@[#1]#2{{%
\makeatletter
\def\XR@prefix{#1}%
- \XR@next#2.aux\relax\\}}
+ \set@curr@file@trim@spaces{#2}%
+ \expandafter\XR@next\@curr@file.aux\relax\\}}
% \end{macrocode}
%
% Process the next |aux| file in the list and remove it from the head of
@@ -135,8 +138,10 @@
% If the |aux| file exists, loop through line by line, looking for
% |\newlabel| and |\@input|. Otherwise process the next file in the
% list.
+% \changes{v5.06}{2020-05-10}{Add braces around the filename to
+% support filenames with spaces (gh/223)}
% \begin{macrocode}
-\def\XR@loop#1{\openin\@inputcheck#1\relax
+\def\XR@loop#1{\openin\@inputcheck{#1}\relax
\ifeof\@inputcheck
\PackageWarning{xr}{^^JNo file #1^^JLABELS NOT IMPORTED.^^J}%
\expandafter\XR@aux