\documentclass{report}
\usepackage{enumitem}
\begin{document}
\begin{description}[style=unboxed,leftmargin=4.75cm,labelwidth=!,labelsep=0cm,align=left]
\item[C]High-level programming language.
\item[Monovalent heat pump system]The entire demand for space heating, ventilation heating and heating of DHW is covered by the heat pump.
\end{description}
\end{document}
我怎样才能将“单价热泵系统”拆分成两行?我尝试使用 stackexchange 上另一个提示中的“style=unboxed”,但没有任何变化。
“单价
热泵系统”
答案1
\documentclass{report}
\usepackage{enumitem}
\begin{document}
\begin{description}[style=multiline,leftmargin=4.75cm,labelsep=0cm]
\item[C]High-level programming language.
\item[Monovalent heat pump system]The entire demand for space heating, ventilation heating and heating of DHW is covered by the heat pump.
\end{description}
\end{document}
答案2
在允许手动中断的结构中插入手动中断:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[leftmargin=10em,labelwidth=!,labelsep=0pt,align=left]
\item[C]High-level programming language.
\item[\smash{\begin{tabular}[t]{@{}l}Monovalent heat \\ pump system\end{tabular}}]
The entire demand for space heating, ventilation heating and heating of
DHW is covered by the heat pump.
\end{description}
\end{document}
上面我使用了左对齐的列(而不是tabular
因为)在左侧。它会删除任何垂直高度/深度组件,否则会导致右侧的行高问题。l
\tabcolsep
@{}
\smash
如果这是您的设置中反复出现的主题,您可以考虑使用宏:
\newcommand{\stackitemdesc}[1]{\smash{%
\begin{tabular}[t]{@{}l} #1 \end{tabular}}}