X 的对齐列表

X 的对齐列表

我如何修复此处的论文列表中的缩进问题: 在此处输入图片描述

\documentclass{book}

\usepackage{lipsum} 
\usepackage{tocloft} 

\newcommand{\listthesisname}{List of Theses}
\newlistof{thesis}{the}{\listthesisname}
\newcommand{\thesis}[1]{%
\refstepcounter{thesis}
{(T\thethesis) #1}
\addcontentsline{the}{thesis}
{\protect\numberline{(T\thethesis)} #1} \par}
\setlength{\cftthesisnumwidth}{15mm}
\setlength{\cftthesisindent}{6mm}
\setlength{\cftbeforethesisskip}{5mm}

\newcommand{\tref}[1]{(T\ref{#1})}


\begin{document}      
\lipsum[1]

\thesis{Metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus
eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium
quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean}

\thesis{Lorem ipsum dolor sit amet, consectetuer adipisc
stibulum ut, placerat ac, adipiscing vitae, felis. Cu
auris. Nam arcu libero, nonummy eget, consectetuer }

\newpage
\listofthesis
\end{document}

答案1

未受保护的行尾。

\newcommand{\listthesisname}{List of Theses}
\newlistof{thesis}{the}{\listthesisname}
\newcommand{\thesis}[1]{% <-- here
  \refstepcounter{thesis}% <-- here
  (T\thethesis) #1% <-- here
  \addcontentsline{the}{thesis}{\protect\numberline{(T\thethesis)}% <-- here
  #1}\par
}

在此处输入图片描述

相关内容