3

I have a problem running the following code, which uses imsart package and aop option:

\documentclass[aop]{imsart}
\RequirePackage[colorlinks]{hyperref}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\begin{theorem}\label{thm}
    This is a Theorem.
\end{theorem}
\begin{appendix}
\section{Proof to Theorem \ref{thm}}
Proof of Theorem \ref{thm}
\end{appendix}
\end{document}

The outcome is this:enter image description here

it fails to add the hyperlink to the theorem in the title of the appendix. Any solution?

1 Answer 1

2

After \appendix, \section is redefined to apply \MakeUppercase to each title, which has the unfortunate consequence of uppercasing also thm.

Indeed, you get

LaTeX Warning: Reference `THM' on page 1 undefined on input line 11.

You can work around the issue by loading textcase with the overload option, that will avoid \MakeUppercase touching the argument to \ref.

\documentclass[aop]{imsart}
\usepackage[overload]{textcase} % <---- added
\usepackage[colorlinks]{hyperref}

\newtheorem{theorem}{Theorem}[section]

\begin{document}
\begin{theorem}\label{thm}
    This is a Theorem.
\end{theorem}

\appendix
\section{Proof to Theorem \ref{thm}}
Proof of Theorem \ref{thm}

\end{document}

enter image description here

By the way, there is no appendix environment defined. Just the \appendix declaration.

1
  • The perfect answer, thank you!
    – mmg
    Mar 11, 2020 at 14:58

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.