0

How to count the number of pages between two labels? I tried to fined a way using this answer but not helpful.

\documentclass[12pt]{book}
\usepackage{lipsum}
\begin{document}
\lipsum[1-20]\label{start}
\lipsum[1-20]\label{end}

As mentioned in $\the\numexpr\pageref{end}-\pageref{start}$ pages ...
\end{document}
  • Somehow, but this https://tex.stackexchange.com/a/38143/108724 is better for me. –  Jan 06 '20 at 09:26
  • So is it better to delete my question? –  Jan 06 '20 at 09:26
  • It is an exact duplicate of the latter, so either you delete it, or we vote to close it as duplicate... – Skillmon Jan 06 '20 at 09:28
  • 1
    I would use the zref package and the abspage counter. See e.g. https://tex.stackexchange.com/a/4258/2388 – Ulrike Fischer Jan 06 '20 at 09:28
  • 1
    It's not necessary to delete the question, if five people agree to close as a duplicate then the system will mark the question as closed but it can be useful to leave the new question also here. Other people might find this question and not the other, but when it is marked as duplicate it will link to the other question so people can find the answer they are looking for in the other answer through this one. – Marijn Jan 06 '20 at 09:31
  • And for information: the "Does this answer your question" comment is automatically generated by the system when somebody marks the question as possible duplicate, so it is not a real question from @Skillmon if that answers your question. – Marijn Jan 06 '20 at 09:32
  • @Marijn: Thanks for your comments. –  Jan 06 '20 at 09:33

0 Answers0