I am writing a LaTex document using the jmlr2e.sty package.

In the main text I want to refer to the Appendix using links. On the pdf when I click on the links they redirect me to the current section instead of redirecting me to the appendix.

Here is a MWE


     See Appendix~\ref{app:appendix} for more details.


\section{The Details}
     Here are more details


When I click on A on the pdf document I am redirected to the section Introduction instead of the Appendix.

I am quite lost in the jmlr2e.sty file that I am not supposed to modify. Here is what I read on the appendix:

         {\large\bf\raggedright Appendix\ }}}}

1 Answer 1


The solution is to add the following line before the \appendix instruction.

  • 1
    Add it to the preamble instead. Littering these commands throughout your article gives it a bad structure. You seem to be able to get away with just \renewcommand\theHsection{\thesection}. The issue is the hyperref anchor nit being unique as it takes the number value of the section counter, and thus there are now two labelled 1
    – daleif
    Sep 17, 2019 at 10:39
  • Thank you for the explanation of the matter. However putting this line in the preamble does not work...
    – fonfonx
    Sep 17, 2019 at 10:43
  • It did for me on your MWE
    – daleif
    Sep 17, 2019 at 10:46
  • Hmm that's strange, it does not work on the MWE for me...
    – fonfonx
    Sep 17, 2019 at 10:51
  • 1
    You should of course not be using \renewcommand{\theHsection}{A\arabic{section}} but something similar to \renewcommand\theHsection{\thesection}, adding your version to the preamble does not make it unique.
    – daleif
    Sep 17, 2019 at 10:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .