如何在项目列表中添加新行

如何在项目列表中添加新行

如果\item(in \begin{enumerate) 包含很长的一行,我需要添加换行符,以便其余部分转到另一行(但枚举号相同)。在下面的代码中,我添加了\allowbreak希望将其余部分换行到新行,但它不起作用。我该怎么做?谢谢。

\begin{enumerate}   
\item  $T(\phi_{1}(x)\barwedge\left(\phi_{2}(y)\veebar\phi_{3}(z)\right))\,=\,T(\left(\phi_{1}(x)\barwedge\phi_{2}(y) \right) \veebar\left(\phi_{1}(x)\barwedge\phi_{3}(z)\right))$, \quad\allowbreak $T(\phi_{1}(x)\veebar \left(\phi_{2}(y)\barwedge\phi_{3}(z)\right))\,=\, T(\left(\phi_{1}(x)\veebar\phi_{2}(y)\right)\barwedge \left(\phi_{1}(x)\veebar\phi_{3}(z)\right))$.
\end{enumerate}

答案1

如果您只想要换行符,您可以添加\\而不是\quad\allowbreak

如果您想要两个具有相同编号的列表项,则可以使用\item\setcounter{enumi}{1}“1”进行设置,其中“1”应该是比您想要的数字小一的数字。

以下是包含两个选项的 MWE:

\documentclass[]{article}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{enumerate}   
\item  $T(\phi_{1}(x)\barwedge\left(\phi_{2}(y)\veebar\phi_{3}(z)\right))\,=\,T(\left(\phi_{1}(x)\barwedge\phi_{2}(y) \right) \veebar\left(\phi_{1}(x)\barwedge\phi_{3}(z)\right))$\\$T(\phi_{1}(x)\veebar \left(\phi_{2}(y)\barwedge\phi_{3}(z)\right))\,=\, T(\left(\phi_{1}(x)\veebar\phi_{2}(y)\right)\barwedge \left(\phi_{1}(x)\veebar\phi_{3}(z)\right))$.
\end{enumerate}

\hrule

\begin{enumerate}   
\item\setcounter{enumi}{0} $T(\phi_{1}(x)\barwedge\left(\phi_{2}(y)\veebar\phi_{3}(z)\right))\,=\,T(\left(\phi_{1}(x)\barwedge\phi_{2}(y) \right) \veebar\left(\phi_{1}(x)\barwedge\phi_{3}(z)\right))$
\item $T(\phi_{1}(x)\veebar \left(\phi_{2}(y)\barwedge\phi_{3}(z)\right))\,=\, T(\left(\phi_{1}(x)\veebar\phi_{2}(y)\right)\barwedge \left(\phi_{1}(x)\veebar\phi_{3}(z)\right))$.
\item This is the third item
\item This is the fourth item
\end{enumerate}

\hrule

\begin{enumerate}  
\item This is the first item
\item This is the second item 
\item\setcounter{enumi}{2} $T(\phi_{1}(x)\barwedge\left(\phi_{2}(y)\veebar\phi_{3}(z)\right))\,=\,T(\left(\phi_{1}(x)\barwedge\phi_{2}(y) \right) \veebar\left(\phi_{1}(x)\barwedge\phi_{3}(z)\right))$
\item $T(\phi_{1}(x)\veebar \left(\phi_{2}(y)\barwedge\phi_{3}(z)\right))\,=\, T(\left(\phi_{1}(x)\veebar\phi_{2}(y)\right)\barwedge \left(\phi_{1}(x)\veebar\phi_{3}(z)\right))$.
\item This is the fourth item
\item This is the fifth item
\end{enumerate}

\end{document} 

我提供了两个版本的选项,\setcounter\enumi{}以便您更好地了解其工作原理。

在此处输入图片描述

相关内容