Consider the following MWE:






The former section ranges from page~\pageref{section:test-a-start} to \pageref{section:test-a-end}.


It seems to me that \pageref{section:test-a-end} gives the page number at the very end of the first section which is what I want.

However, when using hyperref, \pageref{section:test-a-end} links to the beginning of the last subsection. Can I somehow link to the end of the subsection (and thereby the end of the section) rather than to the beginning of it?


Insert a \phantomsection to mark a different location to what was set with the previous \refstepcounter:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.