如何在不影响其他设置的情况下控制后续行的缩进?也就是说,我希望前三个部分的间距保持原样,但是当行的内容溢出到第二行时,第二行应该进一步缩进。
A简单的解决方案是将第二和第三项作为标签的一部分,但不希望诉诸于此。
代码:
\documentclass{article}
\usepackage{showframe}
\usepackage{enumitem}
\usepackage{ragged2e}
\begin{document}
\begin{description}[
leftmargin=!,
labelwidth=!,
labelsep=5pt,
parsep=0pt,
itemsep=0pt,
itemindent=0pt,
]\RaggedRight
\item [ABC] DEF GHI abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\item [ABC] DEF GHI 1-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\item [XYZ] ABC KYJ efp-higj-akdf-dggg-vfv-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\end{description}%
\end{document}
答案1
也许我误解了这个问题。您可以更改leftmargin
并itemindent
:
\documentclass{article}
\usepackage{showframe}
\usepackage{enumitem}
\usepackage{ragged2e}
\begin{document}
\begin{description}[
leftmargin=40pt,
labelwidth=!,
labelsep=5pt,
parsep=0pt,
itemsep=0pt,
itemindent=-10pt,
]\RaggedRight
\item [ABC] DEF GHI abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\item [ABC] DEF GHI 1-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\item [XYZ] ABC KYJ efp-higj-akdf-dggg-vfv-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\end{description}
\begin{description}[
leftmargin=30pt,
labelwidth=!,
labelsep=5pt,
parsep=0pt,
itemsep=0pt,
itemindent=-10pt,
]\RaggedRight
\item [ABC] DEF GHI abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\item [ABC] DEF GHI 1-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\item [XYZ] ABC KYJ efp-higj-akdf-dggg-vfv-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd
\end{description}
\end{document}