我想使用headings
頁面樣式的回憶錄,但是 LaTeX 抱怨由於某些名為 的部分而缺少引用Proof of Theorem~\ref{theorem_label}
。除了透過命令的可選參數對定理數進行硬編碼之外,還有其他方法可以解決此問題嗎\section
?
更新1:看來罪魁禍首是超引用包裹。這是一個最小的工作範例;請注意,需要\clearpage
強制建立帶有標題中引用的頁面,否則文件編譯時不會出現問題。
\documentclass{memoir}
\usepackage{amsthm}
\usepackage{hyperref}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\pagestyle{headings}
\begin{document}
\chapter{A theorem}
\begin{theorem}
\label{thm:fermat}
There are no non-trivial integer solutions to $x^n + y^n = z^n$ for $n > 2$.
\end{theorem}
\clearpage
\section{Proof of Theorem~\ref{thm:fermat}}
\clearpage
See Wiles.
\end{document}
但我仍然不知所措。我在手冊中唯一能找到的回憶錄那是記憶體修復程式需要包來修復與超引用,這是自動加載的。但是,即使明確載入它也不能解決問題。
更新2:這個問題似乎是由於標籤的大寫引起的。不知何故超引用破壞\uppercaseheads
宏回憶錄,它是使用\MakeTextUppercase
from定義的文字方塊。作為一種解決方法,人們可以使用\nouppercaseheads
,儘管這似乎是一個次優的解決方案。
答案1
不幸的是,這個問題是由於一個錯誤造成的超引用。至少有兩種可能的解決方法可以保留headings
頁面樣式的整體感覺:
- 使用小型大寫標題:
\nouppercaseheads % Disable automatic capitalisation
\pagestyle{headings}
\makeevenhead{headings}{\thepage}{}{\slshape\scshape\leftmark}
\makeoddhead{headings}{\slshape\scshape\rightmark}{}{\thepage}
- 正如 @barbarabeeton 在評論中所建議的,在發生錯誤的地方使用全大寫標籤。