我是 TeX 新手,最近\enumerate
在定理环境中使用环境时遇到了一个问题。如果某个项目延伸到第二行或更多行,我该如何删除左侧的空白而不影响标签的位置?(这不能通过简单地调整参数来实现leftmargin
,因为它会影响标签。)或者,我怎样才能将所有文本行与左侧的标签对齐,如下图红线所示?
此外,我已经尝试过\leavevmode
,按照其他问题中的建议,但这不是我想要的。
代码在这里:
\documentclass{article}
\usepackage{amsthm}
\usepackage{enumitem}
\newtheorem{thm}{Theorem}[section]
\renewcommand{\labelenumi}{(\roman{enumi})}
\begin{document}
\section{A title here}
\begin{thm}
\begin{enumerate}
\item Long sentence. Really long sentence. Really really long sentence. Really.
\item Sentence presented here for comparison. creativity bull car nonsense filter choke smug
\end{enumerate}
\end{thm}
\end{document)
答案1
您想要的就是这样的东西吗?我认为在定理的上下文中,枚举在 upshape 中看起来更好。如果您只想要括号 upshape,请使用label=$(\roman*)$
。
\documentclass{article}
\usepackage{amsthm}
\usepackage{enumitem}
\newtheorem{thm}{Theorem}[section]
\setlist[enumerate, 1]{label=(\roman*)}
\begin{document}
\section{A title here}
\begin{thm}
\begin{enumerate}[font=\upshape, wide=0pt, labelsep=-0.3em, leftmargin =*]
\item Long sentence. Really long sentence. Really really long sentence. Really.
\item Sentence presented here for comparison. creativity bull car nonsense filter choke smug – Fiddle dee dee!
\end{enumerate}
\end{thm}
\end{docum