我想防止在所有项目之后添加换行符enumerate
。
我的代码:
\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
Start an enumeration:
\begin{enumerate*}[label=(\arabic*),itemjoin=\\]
\item[$(i)$] The first item
\item[$(ii)$] Second item
\item[$(iii)$] Third item
\item[$(iv-vi)$] Fourth,fifth, and sixt item.
\end{enumerate*}
\end{document}
生成的输出,默认情况下所有项目末尾都有换行符:
Start an enumeration: (i) The first item
(ii) Second item
(iii) Third item
(iv-vi) Fourth,fifth, and sixt item.
想要的输出(项目之间没有新行):
Start an enumeration: (i) The first item (ii) Second item (iii) Third item (iv-vi) Fourth,fifth, and sixt item.
答案1
替换 \itemjoin=\\
为\itemjoin=\quad
(或任何你喜欢的水平空格),一切正常:
\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
Start an enumeration:
\begin{enumerate*}[label=(\arabic*),itemjoin=\quad]
\item[$(i)$] The first item
\item[$(ii)$] Second item
\item[$(iii)$] Third item
\item[$(iv)$] Third item.
\end{enumerate*}
\end{document}