Skip to content

Commit

Permalink
merge from xcite branch
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Sep 9, 2019
2 parents d88dc70 + 7afbbb6 commit b0aaf81
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
15 changes: 15 additions & 0 deletions base/doc/ltnews30.tex
Expand Up @@ -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}
Expand Down
21 changes: 15 additions & 6 deletions required/tools/xr.dtx
Expand Up @@ -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
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr}
%<package> [2019/01/05 v5.04 eXternal References (DPC)]
%<package> [2019/07/22 v5.05 eXternal References (DPC)]
%
%<*driver>
\documentclass{ltxdoc}
Expand Down Expand Up @@ -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.
Expand All @@ -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}
Expand All @@ -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.
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit b0aaf81

Please sign in to comment.