3

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.

lockstep
  • 250,273
BertS
  • 415

0 Answers0