最佳实践:使用描述环境进行大小写区分

最佳实践:使用描述环境进行大小写区分

在证明中使用描述环境进行大小写区分在语义上是否正确?实际上,似乎描述合适吗?但是它看起来对我来说是正确的。如果不正确,我应该用什么来代替?

\begin{proof}
We can differentiate three cases.
\begin{description}
\item[Case $x > 0$] If $x$ is positive. ...
\item[Case $x = 0$] Trivial.
\item[Case $x < 0$] If $x$ is negative, ...
\end{description}
That completes the proof for all $x \in \mathbb R$.
\end{proof}

答案1

我的印象是 — — 请注意这里有相当多不可避免的主观性 — — 即description环境对于您所概述的用例来说是过度的。

我会坚持使用itemize(未编号的)列表环境,例如,

\begin{proof}
Three separate cases must be examined.
\begin{itemize}
\item Case $x > 0$: ABC
\item Case $x = 0$: DEF
\item Case $x < 0$: GHI
\end{itemize}
That completes the proof for all $x\in\mathbb{R}$.
\end{proof}

或者,如果项目适合以自然的方式枚举,则可以使用enumerate(编号)列表环境,例如,

\begin{enumerate}
\item Case $x > 0$: ABC
\item Case $x = 0$: DEF
\item Case $x < 0$: GHI
\end{enumerate}

借助枚举项包。任何这样的定制可能并不紧急。我会坚持使用默认设置,确保内容列表是可以的,并且稍后再自定义列表的外观——如果有的话。

答案2

我认为这是可能的,但我不会使用默认的粗体,所以我会这样编码(感谢@Mico 添加 \mdseries):

\usepackage{enumitem}

.............
\begin{proof}
We can differentiate three cases.
\begin{description}[font=\mdseries\itshape]
\item[Case $x > 0$] If $x$ is positive. ...
\item[Case $x = 0$] Trivial.
\item[Case $x < 0$] If $x$ is negative, ...
\end{description}
That completes the proof for all $x \in \mathbb R$.
\end{proof}

相关内容