
我從那裡了解到可恢復的這回答。然而,當我把定理放在附錄時,它的參考文獻沒有編號。這是一個 MWE:
\documentclass{amsart}
\usepackage{thmtools}
\usepackage{thm-restate}
\newtheorem{theorem}{Theorem}[section]
\usepackage{hyperref}
\begin{document}
\begin{restatable*}{theorem}{thm}
Everybody knows that $1 + 1 = 2$.
\end{restatable*}
I would like this \ref{thm} to display A.1.
\appendix
\section{Proofs}
\thm\label{thm}
\begin{proof}
Proof is trivial.
\end{proof}
\end{document}
答案1
將其\label{thm}
移入restatable*
環境:
\documentclass{amsart}
\usepackage{thmtools}
\usepackage{thm-restate}
\newtheorem{theorem}{Theorem}[section]
\usepackage{hyperref}
\begin{document}
\begin{restatable*}{theorem}{thm}\label{thm} % <<< \label moved to here
Everybody knows that $1 + 1 = 2$.
\end{restatable*}
I would like this \ref{thm} to display A.1.
\appendix
\section{Proofs}
\thm
\begin{proof}
Proof is trivial.
\end{proof}
\end{document}