枚举内容对齐

枚举内容对齐

代码:

\documentclass[12pt]{article}
\usepackage{enumitem}
\usepackage[margin=1in]{geometry} 
\begin{document} 
    \noindent
    Hello
    \begin{enumerate}[leftmargin =*, label = \textbf{Problem \arabic*.}]
        \item Find the Th\'evenin equivalent with respect to this resistor. Use this result to determine the conditions under which $R_9$ absorbs \textit{maximal} power.
        \item Based on the results obtained in Problem 1, select the resistor so that $\eta$ is maximized with the following additional constraint:
    \end{enumerate}
\end{document}

输出(带注释): 在此处输入图片描述

有没有办法移动第二行,使其与枚举对齐?我的目标是,每当创建新行时,它都会与枚举标签对齐,而不是与第一行对齐。

编辑:这是我想要的手绘草图: 在此处输入图片描述

答案1

您可以使用enumitem的键来修改环境中的长度enumerate。此外,特别是如果您想使用多个这样的列表,您可以定义一个新的列表类型。

\documentclass[12pt]{article}
\usepackage{enumitem}
\usepackage[margin=1in]{geometry} 
\usepackage{calc}
\newlist{problems}{enumerate}{1}
\setlist[problems]{
    label=\textbf{Problem \arabic*.},
    labelwidth={\widthof{\textbf{Problem 0.}} + \labelsep},
    itemindent=\labelwidth,
    leftmargin=0pt,
}
\begin{document} 
    \noindent
    Hello
    \begin{problems}
        \item Find the Th\'evenin equivalent with respect to this resistor. Use this result to determine the conditions under which $R_9$ absorbs \textit{maximal} power.
        \item Based on the results obtained in Problem 1, select the resistor so that $\eta$ is maximized with the following additional constraint:
    \end{problems}
\end{document}

相关内容