I am typeset the multivolume book. Simplest form looks like:
main file for volume one (vol01.tex)
\documentclass{scrbook}
\usepackage{xr-hyper}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{hyperref}
\begin{document}
\section{First section}\label{section}
\begin{figure}[ht!]
\centering
\includegraphics{example-image-a}
\caption{Units \qty{10}{\m}}
\label{fig:example}
\end{figure}
\end{document}
Tex file for volume two (vol02.tex):
\documentclass{scrbook}
\usepackage{xr-hyper}
\usepackage{hyperref}
\externaldocument[B-]{vol01}[vol01.pdf]%
\begin{document}
Link to file \texttt{vol1} figure \ref{B-fig:example} in section \ref{B-section}.
\end{document}
But the units used in caption leads to error:
...
/uniquecounter.sty")))
! Undefined control sequence.
<argument> Units \qty
{10}{\m }\relax
l.11 ...nt[B-]{vol01}[vol01.pdf]
For previous version of siunitx
package the solution was to use \protect\SI{10}{\protect\m}
according to the Ulrike Fischer solution here. Unfortunately it is no longer be valid.
Is there any other alterntive? For example usage of the zref-xref
package.
vol01
in the second file withvol1
...