diff --git a/base/doc/ltnews30.tex b/base/doc/ltnews30.tex index a515fd11b..7e43b39d0 100644 --- a/base/doc/ltnews30.tex +++ b/base/doc/ltnews30.tex @@ -362,6 +362,21 @@ \subsection{\pkg{varioref}: } +\subsection{\pkg{xr}: Support citations to bibiographies in external documents} + +The \pkg{xr} package can be used to reference labels in external +document, e.g., when a work is split over different documents that +need to be processed separateley, but has \cs{ref} or \cs{pageref} +links between each other. With this update \cs{cite} commands and +their cousins can now also reference bibliographies in external +documents, a feature that was originally made available by the package +\pkg{xcite} by Enrico Gregorio. + +Note that for technical reasons \pkg{xr} doesn't work with +\pkg{hyperref}. Use \pkg{xr-hyper} instead if you need the latter +package. + + \section{Changes to packages in the \pkg{amsmath} category} \subsection{\pkg{amsmath}: Introduce \texttt{overunderset} command} diff --git a/required/tools/xr.dtx b/required/tools/xr.dtx index ee2861803..417a98c1c 100644 --- a/required/tools/xr.dtx +++ b/required/tools/xr.dtx @@ -21,11 +21,11 @@ % % \fi % \iffalse -%% File: xr.dtx Copyright (C) 1994-1994 2018 2019 David Carlisle +%% File: xr.dtx Copyright (C) 1993-2019 David Carlisle % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{xr} -% [2019/01/05 v5.04 eXternal References (DPC)] +% [2019/07/22 v5.05 eXternal References (DPC)] % %<*driver> \documentclass{ltxdoc} @@ -56,7 +56,8 @@ % 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} +% \changes{v5.03}{2018/10/01}{Fix for conditionals in aux file} +% \changes{v5.05}{2019/07/20}{include xcite} % % % This package implements a system for eXternal References. @@ -83,6 +84,11 @@ % characters can not usually be used in |\label|, and similarly may not % be used in the optional argument to |\externaldocument|. % +% As first suggested in Enrico Gregorio's |xcite| package, the current version +% also allows |\cite| to reference |\bibitem| in the external document. +% For fcompatibility with |xcite|, |\externalcitedocument| is made available +% as an alias for |\externaldocument| +% % \StopEventually{} % % \section{The macros} @@ -94,6 +100,7 @@ % Check for the optional argument. % \begin{macrocode} \def\externaldocument{\@ifnextchar[\XR@{\XR@[]}} +\let\externalcitedocument\externaldocument % \end{macrocode} % % Save the optional prefix. Start processing the first |aux| file. @@ -159,11 +166,13 @@ \long\def\XR@test#1#2#3#4\XR@{% \let\XR@tempa\@gobbletwo \ifx#1\newlabel - \let\XR@tempa\@firstoftwo% + \let\XR@tempa\@firstoftwo + \else\ifx#1\bibcite + \let\XR@tempa\@firstoftwo \else\ifx#1\@input \let\XR@tempa\@secondoftwo - \fi\fi - \XR@tempa{\newlabel{\XR@prefix#2}{#3}}{\edef\XR@list{\XR@list#2\relax}}% + \fi\fi\fi + \XR@tempa{#1{\XR@prefix#2}{#3}}{\edef\XR@list{\XR@list#2\relax}}% \ifeof\@inputcheck\expandafter\XR@aux \else\expandafter\XR@read\fi} % \end{macrocode}