tl;dr: \pageref{} gives section name and other info additional to pagenumber
I want to display the page numbers in my document in a "current page / all pages" form and defined
\fancyfoot[LE,RO]{\thepage/\pageref{preLastPage}}
however, \pageref{} shows not only the page number, but also the section name and other info, so it displays: 4/122Discussionsection.6
same with other \pageref{} cases, eg when I want to refer to a part on another page:
For caption see page~\pageref{graph_abstract_caption}.
It displays: "For caption see page 33Introductionfigure.caption.10."
It seems to be a marker problem, but I did not redefine anything as far as I know. I am using
\usepackage{nameref,hyperref,lastpage,fancyhdr}
In case I did mess with markers somewhere, how do I fix it? Thanks!
namerefdoes. If you don't want it, removenamereffrom\usepackage. In itselfnamerefdoes it only with the use of\namerefbut maybe your\pagerefhas been redefined to include somenamerefstuff. If you removenameref, you might get an error message that shows where that is done. Without your code, I'm just guessing, of course. – Pieter van Oostrum May 27 '22 at 19:28hyperref, notnameref. Any idea how to approach this? – Mew Apr 03 '23 at 13:56\RequirePackage[2020-02-02]{latexrelease}and\usepackage{hyperref}. I needed the former based on this thread, and hyperref is obviously necessary. Seems to be an ordinary bug. – Mew Apr 28 '23 at 14:12