私は、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
おそらく、適切なコードがパッケージの新しいバージョンに含まれる可能性があります。