I'm preparing a document (revtex4-1 class) with figures. I'd like to have bookmark for each figure in the PDF, so I use hyperref with the following command that inserts figures:

\currentpdfbookmark{Figure \arabic{figure}}{name:#1}
%\currentpdfbookmark{Figure \thefigure~[++]}{name:#1}

Everything is OK, but figure numbers start from zero. When I move the \currentpdfbookmark command after the label command, figure numbers in PDF bookmarks are OK. But clicking on the bookmark sends me right after the figure, which is not good.

Is it possible to output not the figure counter, but figure+1? I do not want to mess the figure counter, I just want to output a figure+1.

  • 1
    You can use: Figure \the\numexpr\arabic{figure}+1\relax or you can load the package hypcap Jun 6 '13 at 10:50

\thefigure can print a complex figure number and is not available for calculations in general (e.g. 1.4, (a), ...). A trick is to update the figure counter and reset it afterwards:

\currentpdfbookmark{Figure \thefigure}{name:#1}%

Package bookmark

  • The destination that is generated by \caption can be used for the bookmark, if package bookmark is used. Internally hyperref stores this in macro \@currentHref. (Currently package bookmark does not provide the feature of extracting the destination name from a label.)
  • Also I would put the figure bookmarks a level deeper than the current level without changing the current level afterwards.
  • Package caption (or hypcap) puts the anchor at the top of the figure instead to the location of \caption that usually goes below the actual figure.


\section{Hello World}
\caption{My caption}
  dest=\csname @currentHref\endcsname,
]{Figure \thefigure: My caption}

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.