In a psmatrix environment, labels are not recognized. Here is a 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}
Prints:
"See Figure 1 in Section 1".
"Did you see Figure ?? in Section ??"
auto-pst-pdf
compiles the image separately and has no idea of the labels – user31729 Sep 10 '15 at 13:06auto-pst-pdf
runs the document withlatex
. Getting correct labels two runs oflatex
are needed. After that, the created image has the right label. – user2478 Sep 10 '15 at 13:46