对于enumerate
如图所示修改了标签的环境,使用enumitem
包,如何组合各种其他选项(labelindent
,leftmargin
等)enumerate
以便:
- 每个完整标签“Case (a)”或“Case{b}”的开头都按正常段落缩进的量缩进;并且
- 每个项目的主体是否与左边距齐平?
下面示例输出的彩色标记应该以图形方式表明我想要的内容。
enumerate
[当环境使用小写罗马数字时,可以通过选项来提出类似的问题 — — 并且大概可以使用相同的方法label= \upshape(\roman*)
。]
\documentclass[12pt]{memoir}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{lipsum}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
Very important!
\end{theorem}
\begin{proof}
To begin we consider all the possibilities of what may happen and what may not actually happen at all.
We now distinguish two cases.
\begin{enumerate}[label=\emph{Case (\alph*):}]
\item $a = b$.
%
Now we see that\dots\lipsum[1]
\item $a \neq b$. In this case \dots \qedhere
\end{enumerate}
\end{proof}
After establishing that result, to which we shall refer later, we now return to the previous thread of ideas.
\end{document}
答案1
对运用wide
选项enumerate
,并设itemsep
和topsep
为 0pt:
\documentclass[12pt]{memoir}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{lipsum}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
Very important!
\end{theorem}
\begin{proof}
To begin we consider all the possibilities of what may happen and what may not actually happen at all.
We now distinguish two cases.
\begin{enumerate}[label=\emph{Case (\alph*):},wide, itemsep =0pt, topsep=0pt]
\item $a = b$.
%
Now we see that ... \lipsum[1]
\item $a ≠ b$. In this case ... \qedhere
\end{enumerate}
\end{proof}
After establishing that result, to which we shall refer later, we now return to the previous thread of ideas.
\end{document}
答案2
在这种情况下,定义类似环境的东西似乎更方便,每次调用(或说)时theoremcases
,只需将Case (.):
标题设置在段落的开头:\item
\caseitem
\documentclass{memoir}
\usepackage{amsthm}
\usepackage{lipsum}
\newtheorem{theorem}{Theorem}
\newcounter{theoremcases}[theorem]
\renewcommand{\thetheoremcases}{\alph{theoremcases}}
\newcommand{\caseitem}{%
\par\refstepcounter{theoremcases}%
\textit{Case~(\thetheoremcases): }%
\ignorespaces
}
\newenvironment{theoremcases}
{\let\item\caseitem}
{}
\begin{document}
\begin{theorem}
Very important!
\end{theorem}
\begin{proof}
To begin we consider all the possibilities of what may happen and what may not actually happen at all.
We now distinguish two cases.
\begin{theoremcases}
\item $a = b$.
%
Now we see that\dots\lipsum[1]
\item $a \neq b$. In this case \dots \qedhere
\end{theoremcases}
\end{proof}
After establishing that result, to which we shall refer later, we now return to the previous thread of ideas.
\end{document}
为了方便起见,环境theoremcases
只是使\item
等同于\caseitem
。您还可以\label
-and-\ref
案例,就像使用enumitem
。