[latex3-commits] [git/LaTeX3-latex3-latex2e] master: rearrange so possible to skip over if tests in the aux file (bcccc7c)

David Carlisle d.p.carlisle at gmail.com
Mon Oct 1 22:50:37 CEST 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/bcccc7c42356b000ade01f457f409bf9d825be9a

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

commit bcccc7c42356b000ade01f457f409bf9d825be9a
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Mon Oct 1 21:50:37 2018 +0100

    rearrange so possible to skip over if tests in the aux file


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

bcccc7c42356b000ade01f457f409bf9d825be9a
 required/tools/changes.txt |    5 +++++
 required/tools/xr.dtx      |   14 +++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index fbf8d19..c912d2f 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2018-10-01  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* xr.dtx: Update to handle \if tests in the aux file.
+	  https://tex.stackexchange.com/a/452321
+
 2018-09-13  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* array.dtx (section{The macros \@classz):
diff --git a/required/tools/xr.dtx b/required/tools/xr.dtx
index 5cd0ceb..2cd53fe 100644
--- a/required/tools/xr.dtx
+++ b/required/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,16 @@
 % 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 aruments are handles outside the |\ifx| test,
 %    \begin{macrocode}
 \long\def\XR at test#1#2#3#4\XR@{%
+  \let\XR at next\@gobbletwo
   \ifx#1\newlabel
-    \newlabel{\XR at prefix#2}{#3}%
+    \let\XR at next\@firstoftwo%
   \else\ifx#1\@input
-     \edef\XR at list{\XR at list#2\relax}%
+     \let\XR at next@secondoftwo
   \fi\fi
+   \XR at next{\newlabel{\XR at prefix#2}{#3}}{\edef\XR at list{\XR at list#2\relax}}%
   \ifeof\@inputcheck\expandafter\XR at aux
   \else\expandafter\XR at read\fi}
 %    \end{macrocode}





More information about the latex3-commits mailing list