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


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?

    \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*

\renewcommand \theequation {\@arabic\c@equation}
\renewcommand \thefigure   {\@arabic\c@figure}
\renewcommand \thetable    {\@arabic\c@table}


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}{}}

So my question is

how to instruct xr-hyper to read both \newlabel and \newsmartlabel tags?

Perhaps, appropriate code could be included into new version of xr-hyper package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.