I remember that this question (or a very similar one) was posed here some time ago, but I haven't been able to find the thread. I am using \pageref to retrieve the number of certain pages of a document and then I need to perform integer operations using those values. How can I convert the value given by \pageref to a (La)TeX integer?
The following code obviously doesn't work:
Code: Select all
\documentclass{article}
\usepackage{intcalc}
\setcounter{page}{40}
\begin{document}
\section{Test}
\label{sec:test}
\intcalcMod{\pageref{sec:test}}{3}
\end{document}