I'm using xr-hyper package by @David Carlisle and smartref package by Giuseppe Bilotta to compile a multi-volume book. xr-hyper enables cross-references between different volumes as shows the following code chunk:
\newcommand{Volume}{1}% put this is PlasmaBook1.tex
% This is the code shared by all volumes
\usepackage{xr-hyper}
\usepackage{hyperref}
\ifnum\Volume=1
\externaldocument{PlasmaBook2}
\externaldocument{PlasmaBook3}
\else\ifnum\Volume=2
\externaldocument{PlasmaBook1}
\externaldocument{PlasmaBook3}
\else\ifnum\Volume=3
\externaldocument{PlasmaBook1}
\externaldocument{PlasmaBook2}
\fi\fi\fi
And the package smartref is used to hide a portion of equation number as explained in How do I discard a portion of an equation number when cross-referencing?
\usepackage{smartref}
\addtoreflist{chapter}
\newcommand*{\srefaux}[1]{%
\ischapterchanged{#1}% checks if section number has changed
\ifchapterchanged% if current chapter is different
\chapterref{#1}.% put the section reference
\fi% else do nothing
\ref*{#1}% <- we changed this to ref*
}
\makeatletter
\renewcommand \theequation {\@arabic\c@equation}
\renewcommand \thefigure {\@arabic\c@figure}
\renewcommand \thetable {\@arabic\c@table}
\makeatother
\newcommand*\sref[1]{\hyperref[#1]{\srefaux{#1}}}
\newcommand*\seqref[1]{(\hyperref[#1]{\srefaux{#1}})}
Unfortunately, smartref mechanism is working only within a single volume. I think this is because xr-hyper package reads in only \newlabel strings from aux files and ignores \newsmartlabel tags written by smartref as shows the following example borrowed from an actual aux file:
\newlabel{ch01}{{1}{6}{Общие сведения о плазме}{chapter.4}{}}
\newsmartlabel{ch01}{{1}{1}}
So my question is
how to instruct
xr-hyperto read both\newlabeland\newsmartlabeltags?
Perhaps, appropriate code could be included into new version of xr-hyper package.
zrefsuggestion at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=extref ? – Andrew Swann Dec 28 '13 at 16:47\zrefseems to not work with hyperref package. – Igor Kotelnikov Dec 28 '13 at 19:13