
我在枚舉時遇到一個問題。當枚舉在命題「內部」完成時,項目的符號與在證明「內部」完成枚舉時看起來不同。
程式碼
\documentclass[11pt,a5paperfootinclude=true,headinclude=true]{scrbook} % KOMA-Script book
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters
\usepackage[bitstream-charter]{mathdesign}
%\usepackage[osf]{libertine}
\titleformat{\section}
{\normalfont\bfseries}{\thesection}{1em}{}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{IEEEtrantools}
\usepackage{anysize}
\marginsize{0.1\paperwidth}{0.1\paperheight}{2cm}{2cm}
\newcommand{\bigslant}[2]{{\raisebox{.2em}{$#1$}\left/\raisebox{-.2em}{$#2$}\right.}}
\usepackage{enumerate}
\begin{document}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{exmp}[thm]{Example}
\theoremstyle{corollary}
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{lemma}
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{proposition}
\newtheorem{prop}[thm]{Proposition}
\newcommand{\ndiv}{\hspace{-4pt}\not|\hspace{2pt}}
\begin{prop}
\begin{enumerate}[(a)] % (a), (b), (c), ...
\item
\item
\end{enumerate}
\end{prop}
\begin{proof}
\begin{enumerate}[(a)] % (a), (b), (c), ...
\item
\item
\end{enumerate}
\end{proof}
\end{document}
和結果
有什麼補救措施可以讓它們看起來相同還是不可能?我們是否也可以參考列舉的項目?
謝謝
答案1
我會使用enumitem
比定理和證明中的此類枚舉更靈活的包enumerate
,並為定理和證明中的此類枚舉定義一個新環境。
\documentclass[11pt,a5paper,footinclude=true,headinclude=true]{scrbook} % KOMA-Script book
\usepackage[T1]{fontenc}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters
\usepackage[bitstream-charter]{mathdesign}
\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{enumitem}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{exmp}[thm]{Example}
\newenvironment{roster}
{\begin{enumerate}[font=\upshape,label=(\alph*)]}
{\end{enumerate}}
\begin{document}
\begin{prop}
\begin{roster}
\item Something
\item Something else
\end{roster}
\end{prop}
\begin{proof}
\begin{roster}
\item Easy
\item The same\qedhere
\end{roster}
\end{proof}
\end{document}
請注意,定理聲明應該放在前面,\begin{document}
並且您使用的是不存在的樣式。我刪除了不重要的部分。
要結束枚舉中的證明,請使用\qedhere
,以便墓碑將放置在最後一行。
答案2
您可以將項目標籤設定為[\upshape (a)]
而不是[(a)]
。請注意,這\textup{(a)}
不適用於enumarate
包,並且佔位符a
隱藏在群組中{...}
。
\documentclass{article}
\usepackage{amsthm,enumerate}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\begin{theorem}
This has two parts.
\begin{enumerate}[\upshape (a)]
\item First part.
\item Second part.
\end{enumerate}
\end{theorem}
\begin{proof}
Also two parts to the proof.
\begin{enumerate}[\upshape (a)]
\item Proof of first part.
\item Proof of second part.
\end{enumerate}
\end{proof}
\end{document}
答案3
與 類似的解決方案enumitem
,但強調交叉引用項目within a theorem environment works with enumitem, while it did not with
枚舉. I also loaded the
smartref` 包,因為它允許不鍵入正在引用的對象類型,而僅鍵入其標籤 - 這樣,如果定理在更高版本中出現一個命題,您不必進行搜尋和取代。
\documentclass[11pt,a5paperfootinclude=true,headinclude=true]{scrbook} % KOMA-Script book
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{titlesec}
\titleformat{\section} {\normalfont\bfseries}{\thesection}{1em}{}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage[shortlabels]{enumitem}
\usepackage{cleveref}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers \newtheorem{exmp}[thm]{Example}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\begin{document}
\begin{prop}\label{pr1}
\begin{enumerate}[\upshape(a)] % (a), (b), (c), ...
\item \label{item1} Once upon a time…
\item So what?
\end{enumerate}
\end{prop}
\begin{proof} \begin{enumerate}[(a)] % (a), (b), (c), ...
\item According to \cref{pr1}\ref{item1}
\item What else? \qedhere
\end{enumerate}
\end{proof}
\end{document}