%20n%C3%A3o%20funciona%20no%20cabe%C3%A7alho%20da%20se%C3%A7%C3%A3o%20(mostra%20apenas%20pontos%20de%20interroga%C3%A7%C3%A3o).png)
Eu tenho o seguinte problema estranho. Acho que o exemplo mínimo de trabalho abaixo é autoexplicativo. Você pode encontrar o arquivo estilo imsartaqui.
\documentclass[aop,preprint]{imsart}
\RequirePackage{amsthm,amsmath,amsfonts,amssymb}
\RequirePackage[numbers]{natbib}
\RequirePackage{mathtools}
\RequirePackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\startlocaldefs
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\endlocaldefs
\begin{document}
\tableofcontents
\section{Introduction}
\begin{theorem} \label{theo} This is the first theorem.
\end{theorem}
\section{Proof of \texorpdfstring{\hyperref[theo]{Theorem \ref*{theo}}}{Theorem 1.1}}
In this section heading the reference does work.
\begin{appendix}
\section{Proof of \texorpdfstring{\hyperref[theo]{Theorem \ref*{theo}}}{Theorem 1.1}}
In this section heading the reference does not work. Surprisingly, in the table of contents both references work.
\end{appendix}
\end{document}
Responder1
A classe faz \MakeUppercase
, o que também transforma o argumento em \ref
.
Use textcase
com a overload
opção.
Observe que removi o desnecessário \texorpdfstring
. Também appendix
não é um ambiente, use \appendix
.
Também \RequirePackage
deveria ser \usepackage
.
\documentclass[aop,preprint]{imsart}
\usepackage{amsthm,amsmath,amsfonts,amssymb}
\usepackage[numbers]{natbib}
\usepackage{mathtools}
\usepackage[overload]{textcase}
\usepackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\startlocaldefs
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\endlocaldefs
\begin{document}
\tableofcontents
\section{Introduction}
\begin{theorem} \label{theo} This is the first theorem.
\end{theorem}
\section{Proof of Theorem \ref{theo}}
In this section heading the reference does work.
\appendix
\section{Proof of Theorem \ref{theo}}
In this section heading the reference does not work. Surprisingly, in the table of contents both references work.
\end{document}
Você pode transformar todo o “Teorema 1.1” em um link usando \autoref
, mas você precisa complementar textcase
a lista de comandos isentos de letras maiúsculas em seus argumentosepara mudar o autoref
nome.
\documentclass[aop,preprint]{imsart}
\usepackage{amsthm,amsmath,amsfonts,amssymb}
\usepackage[numbers]{natbib}
\usepackage{mathtools}
\usepackage[overload]{textcase}
\usepackage{etoolbox}
\usepackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\startlocaldefs
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\makeatletter
\patchcmd{\@uclcnotmath}
{\ref}
{\ref\@nonchangecase\autoref}
{}{}
\makeatother
\endlocaldefs
\begin{document}
\tableofcontents
\section{Introduction}
\begin{theorem} \label{theo} This is the first theorem.
\end{theorem}
\section{Proof of \autoref{theo}}
In this section heading the reference does work.
\appendix
\renewcommand{\theoremautorefname}{THEOREM}
\section{Proof of \autoref{theo}}
In this section heading the reference does not work. Surprisingly,
in the table of contents both references work.
\end{document}