有没有办法让分项标签列表不超出边距?

有没有办法让分项标签列表不超出边距?

以下在边距外有项目名称:

\documentclass{article}

\begin{document}

\begin{itemize}

\item[very very very very very long item name] and here are its details
\end{itemize}

\end{document}

我希望它不要穿过边缘,而是从更右边的地方开始。

答案1

另一个选项(除了使用descriptionenumitemmultiline选项,允许标签环绕。必须设置特定的标签宽度 multiline

\documentclass{article}

\usepackage{enumitem}
\begin{document}

\begin{itemize}[style=multiline,labelwidth=50pt]

\item[very very very very very long item name] and here are its details
\end{itemize}

\end{document}

在此处输入图片描述

答案2

如果您偶尔会有较长的项目标题,那么\item[\textbullet]系统地输入可能会很乏味。您可以使用 wide选项enumitem,使标签左对齐,而不是默认的右对齐:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{enumitem}
\usepackage{lipsum}

\begin{document}

\begin{itemize}[wide, leftmargin=*]

\item[\itshape very very very very very long item name] and here are its details:
\lipsum[4]

\item \lipsum[11]
\end{itemize}

\end{document} 

在此处输入图片描述

相关内容