像普通段落一样缩进枚举中的项目标签,项目主体与边距齐平

像普通段落一样缩进枚举中的项目标签,项目主体与边距齐平

对于enumerate如图所示修改了标签的环境,使用enumitem包,如何组合各种其他选项(labelindentleftmargin等)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,并设itemseptopsep为 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

相关内容