1

Testing tocloft with this example, \listofrequirement makes a list without space between reference and title.

Why ? (I use lualatex)

Merak
  • 23

1 Answers1

1

Since package tocloft is used, the horizontal space for the number is controlled by \cftXnumwidth, for example:

\settowidth{\cftrequirementnumwidth}{R000}

Applied to the example:

\documentclass{article}
\usepackage{lipsum}
\usepackage{fmtcount}
\usepackage{tocloft}
\newlistof{requirement}{lor}{List of Requirements}
\settowidth{\cftrequirementnumwidth}{R000}

\renewcommand\therequirement{R\padzeroes[3]{\decimal{requirement}}}
\newcommand{\newreq}[1]{%
  \refstepcounter{requirement}%
  \par\noindent\textbf{\therequirement. }#1%
  \addcontentsline{lor}{requirement}{\protect\numberline{\therequirement} #1}%
}


\begin{document}

\section{First Chapter}

\lipsum

\newreq{This is the first requirement.}
\newreq{This is the second requirement.}


\lipsum

\newreq{This is the third requirement.}

\lipsum

\newpage
\listofrequirement

\end{document}

Last page with list of requirements

Heiko Oberdiek
  • 271,626