为什么描述项的第二行要进一步缩进?

为什么描述项的第二行要进一步缩进?

当我编译此代码时,第二行进一步缩进。我希望它与第一行齐平。我希望保持编号可选且手动,因此描述的使用非常方便。

\documentclass{article}

\begin{document}
    \begin{description}
        \item[1.] This item takes up two lines and the second line has an extra indent which I would like to remove, is there any way I can do that ?
    \end{description}

\end{document}

在此处输入图片描述

答案1

有多种方法可以实现均匀的线条。问题是您想如何格式化标签?

\documentclass{article}

\begin{document}
    \begin{enumerate}
        \item This item takes up two lines and the second line has an extra indent which I would like to remove, is there any way I can do that ?
    \end{enumerate}

    \begin{itemize}
        \item[{\makebox[\labelwidth][l]{1.}}] This item takes up two lines and the second line has an extra indent which I would like to remove, is there any way I can do that ?
    \end{itemize}

    \begin{description}
        \item[{\makebox[\dimexpr \leftmargini-\labelsep][l]{1.}}] This item takes up two lines and the second line has an extra indent which I would like to remove, is there any way I can do that ?
    \end{description}

\end{document}

相关内容