Restatable ไม่แสดงหมายเลขทฤษฎีบท
Sep 22 2020
ผมได้เรียนรู้เกี่ยวกับ restatable จากนี้คำตอบ อย่างไรก็ตามเมื่อฉันใส่ทฤษฎีบทในภาคผนวกการอ้างอิงจะไม่มีตัวเลข นี่คือ 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}
คำตอบ
2 muzimuzhiZ Sep 22 2020 at 14:40
ย้าย\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}