独立包是否与 crossref (xr) 包兼容?有人问过这个问题前,但答案对我来说不起作用。
MWE: main.tex
\documentclass[]{article}
\usepackage{standalone}
\begin{document}
An equation
\begin{equation}
\label{eq:test_eq}
a=b+c
\end{equation}
\begin{figure}
\centering
\includestandalone[mode=build]{sub}
\caption{A figure}
\end{figure}
\end{document}
亚特克斯
\documentclass[tikz]{standalone}
\usepackage{xr}
\externaldocument[main::]{main}
\begin{document}
\tikzstyle{block} = [rectangle]
\begin{tikzpicture}[auto]
% Place nodes
\begin{scope}
% title
\node [block]{Reference to equation Eq.~(\ref{main::eq:test_eq}) };
\end{scope}
\end{tikzpicture}
\end{document}