在 psmatrix 环境中,标签无法识别。以下是 MWE:
\documentclass[]{article}
\usepackage[crop=on]{auto-pst-pdf}
\usepackage{pst-node}
\begin{document}
\section{First \label{sec:first}}
\begin{figure}
\caption{this is a figure \label{fig:first}}
\end{figure}
See Figure \ref{fig:first} in Section \ref{sec:first}.
\begin{psmatrix}[colsep=0cm,rowsep=0mm]
Did you see Figure \ref{fig:first} in Section \ref{sec:first}?
\end{psmatrix}
\end{document}
印刷:
"See Figure 1 in Section 1".
"Did you see Figure ?? in Section ??"
答案1
您需要runs=2
选择auto-pst-pdf
——在这种情况下,外部编译将正确执行引用(它在手册中;-))
\documentclass[]{article}
\usepackage[crop=on,runs=2]{auto-pst-pdf}
\usepackage{pst-node}
\begin{document}
\section{First \label{sec:first}}
\begin{figure}
\caption{this is a figure \label{fig:first}}
\end{figure}
See Figure \ref{fig:first} in Section \ref{sec:first}.
\begin{psmatrix}[colsep=0cm,rowsep=0mm]
Did you see Figure \ref{fig:first} in Section \ref{sec:first}?
\end{psmatrix}
\end{document}