複数巻の本を作成するために xr-hyper パッケージを使用するときにスマート参照を有効にする方法を教えてください。

複数巻の本を作成するために xr-hyper パッケージを使用するときにスマート参照を有効にする方法を教えてください。

私は、xr-hyper@David Carlisle のパッケージとsmartrefGiuseppe 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\newsmartlabelsmartrefaux

\newlabel{ch01}{{1}{6}{Общие сведения о плазме}{chapter.4}{}}
\newsmartlabel{ch01}{{1}{1}}

私の質問は

と タグのxr-hyper両方を読み取るように指示するにはどうすればよいですか?\newlabel\newsmartlabel

xr-hyperおそらく、適切なコードがパッケージの新しいバージョンに含まれる可能性があります。

関連情報