I would like to perform integer operations on a cross reference.
\documentclass{article}
\usepackage{etoolbox}
\begin{document}
hello \label{here}
\ifnumequal{\pageref{here}}{1}{You are on the 1st page}{...}
\end{document}
I get Missing number, treated as zero, even on a second pass (when the reference is not ?? anymore).
NB: In this MWE, one could obviously use \thepage. But this is not an option in the real document.
\usepackage{refcount}and use\getpagerefnumberinstead of\pageref. – egreg Jun 14 '13 at 13:58refcountpackage... (I wish I could accept your answer). – BertS Jun 14 '13 at 14:14