summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tools/xr.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/tools/xr.dtx')
-rw-r--r--Master/texmf-dist/source/latex/tools/xr.dtx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/tools/xr.dtx b/Master/texmf-dist/source/latex/tools/xr.dtx
index 5cd0cebc4bc..c4bd41e9164 100644
--- a/Master/texmf-dist/source/latex/tools/xr.dtx
+++ b/Master/texmf-dist/source/latex/tools/xr.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
-% 2006 2008 2009
+% 2006 2008 2009 2018
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -21,11 +21,11 @@
%
% \fi
% \iffalse
-%% File: xr.dtx Copyright (C) 1994-1994 David Carlisle
+%% File: xr.dtx Copyright (C) 1994-1994 2018 David Carlisle
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr}
-%<package> [1994/05/28 v5.02 eXternal References (DPC)]
+%<package> [2018/10/01 v5.03 eXternal References (DPC)]
%
%<*driver>
\documentclass{ltxdoc}
@@ -56,6 +56,7 @@
% aux files of \cmd\include'ed files. (Reported by J-PD)}
%
% \changes{v5.02}{1994/05/28}{Update for LaTeX2e}
+% \changes{v5.02}{1994/05/28}{Fix for conditionals in aux file}
%
%
% This package implements a system for eXternal References.
@@ -152,13 +153,17 @@
% filename to the list of files to process. Otherwise ignore.
% Go around the loop if not at end of file. Finally process the next
% file in the list.
+%
+% 2018 update: make sure the arguments are handled outside the |\ifx| test,
% \begin{macrocode}
\long\def\XR@test#1#2#3#4\XR@{%
+ \let\XR@next\@gobbletwo
\ifx#1\newlabel
- \newlabel{\XR@prefix#2}{#3}%
+ \let\XR@next\@firstoftwo%
\else\ifx#1\@input
- \edef\XR@list{\XR@list#2\relax}%
+ \let\XR@next\@secondoftwo
\fi\fi
+ \XR@next{\newlabel{\XR@prefix#2}{#3}}{\edef\XR@list{\XR@list#2\relax}}%
\ifeof\@inputcheck\expandafter\XR@aux
\else\expandafter\XR@read\fi}
% \end{macrocode}