
У меня есть одна проблема с перечислением. Символы для элементов выглядят по-разному, когда перечисление делается ''внутри'' предложений, чем когда перечисление делается ''внутри'' доказательства.
Код
\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
пакет cleverref`, поскольку это позволяет не вводить тип объекта, на который ссылаются, а только его метку — так что если теорема в более поздней версии станет предложением, вам не придется выполнять поиск и замену.
\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}