Я использую xr-hyper
пакет @David Carlisle и smartref
пакет Giuseppe Bilotta для компиляции многотомной книги. xr-hyper
Это позволяет создавать перекрестные ссылки между разными томами, как показано в следующем фрагменте кода:
\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
И пакет smartref
используется для сокрытия части номера уравнения, как объяснено вКак отбросить часть номера уравнения при перекрестных ссылках?
\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}})}
К сожалению, smartref
механизм работает только в пределах одного тома. Я думаю, это потому, что xr-hyper
пакет считывает только \newlabel
строки из aux
файлов и игнорирует \newsmartlabel
теги, записанные, smartref
как показано в следующем примере, заимствованном из реального aux
файла:
\newlabel{ch01}{{1}{6}{Общие сведения о плазме}{chapter.4}{}}
\newsmartlabel{ch01}{{1}{1}}
Итак, мой вопрос:
как дать указание
xr-hyper
читать оба тега\newlabel
и\newsmartlabel
?
Возможно, соответствующий код можно будет включить в новую версию xr-hyper
пакета.