セクションの見出しでは参照(ハイパーリファレンスを使用)が機能しません(疑問符のみが表示されます)

セクションの見出しでは参照(ハイパーリファレンスを使用)が機能しません(疑問符のみが表示されます)

ここに画像の説明を入力してください次のような奇妙な問題があります。以下の最小限の動作例は説明不要だと思います。imsartスタイルのファイルを見つけてください。ここ

\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}

答え1

クラスは を実行し\MakeUppercase、引数も に変換します\ref

textcaseオプションと一緒に使用しますoverload

不要な を削除したことに注意してください\texorpdfstring。 もappendix環境ではないので、 を使用してください\appendix

また、\RequirePackageであるべきです\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}

ここに画像の説明を入力してください

を使って「定理1.1」全体をリンクにすることができますが、引数を大文字にしないコマンドのリスト\autorefを補足する必要があります。textcaseそして名前を変更しますautoref

\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}

ここに画像の説明を入力してください

関連情報