使用 \tab 时,长行文本会跳转到 itemize 环境中的下一行

使用 \tab 时,长行文本会跳转到 itemize 环境中的下一行

为了编写itemize环境内项目列表的描述,我使用了该\tab命令。但是,它会产生相当大的空白,导致长行文本跳到下一行,如下图所示:

项目和选项卡列表

我希望第三项的长行文本与其他项的制表方式相同。

此外,我想知道是否可以控制\tab间距。

笔记:答案产生项目符号列表将被优先考虑。


代码:

\documentclass{article}

\usepackage[a4paper,top=1.75truecm,bottom=1.75truecm,left=1.75truecm,right=1.75truecm]{geometry}
\usepackage{enumitem}
\usepackage{tabto}

\begin{document}
    \begin{itemize}[noitemsep]
        \item Lion
        \tab{This is the description of the first item.}

        \item Elephant
        \tab{This is the description of the second item.}

        \item Rabbit
        \tab{This is the description of the third item, which turns out to be a little longer and jumps to the next line.}

        \item Horse
        \tab{This is the description of the fourth item.}
    \end{itemize}
\end{document}

答案1

具有描述环境的解决方案和etoolbox

\documentclass{article}

\usepackage[a4paper,top=1.75truecm,bottom=1.75truecm,left=1.75truecm,right=1.75truecm]{geometry}
\usepackage{enumitem}
\usepackage{etoolbox} {}
\newlist{bulletdescr}{description}{1}
\setlist[bulletdescr]{noitemsep, labelwidth=0.5\linewidth, leftmargin=0.5\linewidth, labelsep=0pt, font=\normalfont}
\AtBeginEnvironment{bulletdescr}{\let\olditem\item \renewcommand\item[1][]{\olditem[{\textbullet\enspace}#1]}}

\begin{document}

\begin{bulletdescr}
 \item[Item 1]
 This is the description of the first item.

 \item[Item 2]
 This is the description of the second item.

 \item[Item 3]
This is the description of the third item, which turns out to be a little longer and jumps to the next line.

 \item[item 4]
 This is the description of the fourth item.
 \end{bulletdescr}

\end{document} 

在此处输入图片描述

答案2

在此处输入图片描述

\documentclass{article}

\usepackage[a4paper,top=1.75truecm,bottom=1.75truecm,left=1.75truecm,right=1.75truecm]{geometry}
\usepackage{enumitem}


\begin{document}
    \begin{description}[labelwidth=3cm, itemindent=0pt,labelsep=0pt,leftmargin=3cm]
        \item[Lion]
        This is the description of the first item.

        \item[Elephant]
        This is the description of the second item.

        \item[Rabbit]
        This is the description of the third item, which turns out to be a little longer and jumps to the next line.

        \item[Horse]
        This is the description of the fourth item.
    \end{description}
\end{document}

相关内容