# Problem with hyperref's pagebackref, modroman and thebibliography

Following @yiannis-lazarides comment here, I decided to use the modroman package for my frontmatters.

In my actual project I don't have that many references, and thus decided to use the thebibliography environment.

The problem is that I'm also using hyperref with the pagebackrefs option enabled, and this gives me some very strange warnings; not strange because of the warning per se, but rather because of when it happens (which baffles me).

The warning itself is:

name{page.xiij} has been referenced but does not exist, replaced by a fixed one


and its raised when LaTeX is typesetting the pagebackrefs in question.

A minimal working example (exercising the warnings further) follows:

\documentclass{book}
\usepackage[pagebackref]{hyperref}
\usepackage{modroman}
\begin{document}
\frontmatter
\renewcommand{\thepage}{\texorpdfstring{\modroman{page}}{\roman{page}}}
\setcounter{page}{10}
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage
Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\cleardoublepage
\begin{thebibliography}{9}
\bibitem{bib}
A.~N.~Author.
Some title here.
\emph{Another one here}, (12):3--5,
September 1990.

\end{thebibliography}
\end{document}


Thoughts anyone? :)

-

The problem is that hyperref is using the two distinct representations when doing its business and gets out of synch when \modroman{page} and \roman{page} differ.

With \renewcommand{\thepage}{\modroman{page}} the error does not show; you'll get xiij also in the bookmarks, but it doesn't seem much of a problem. Happily, \modroman is completely expandable.

-
Thanks for explaining what's going on! I still don't understand... the link generated in the backreferences of the affected citations point to the first page no matter where they're cited... is there any way to fix this? –  mpr Oct 21 '11 at 13:10
The backreferences works fine for me if I use Enricos suggestion. (current miktex 2.9.) Btw: In your minimal example there should be an empty line before \end{bibliography} to enable the backreferences. –  Ulrike Fischer Oct 21 '11 at 13:20
@mpr Remember that back references need that each bibliography entry is followed by a blank line (you're missing it and you should be receiving an error message). –  egreg Oct 21 '11 at 13:21
Edited to add blank line after bibliography entry ;) still, backreferences are pointing to the first output page... @ulrike-fischer what suggestion are you referring to? –  mpr Oct 21 '11 at 13:46
@mpr: I mean the \renewcommand{\thepage}{\modroman{page}}. I'm using hyperref 2011/10/01 v6.82j –  Ulrike Fischer Oct 21 '11 at 14:05
show 1 more comment