\addcontentsline{ext}{level}{content}
doesn't seem to work correctly for nonstandard ext
when multitoc
is being used. In particular, the .ext
file (.thn
in the example below) doesn't seem to be generated at all (or touched, if it already exists).
Commenting out the multitoc
import causes the custom list to get populated correctly. Commenting it back in causes the custom list to be blank again, even if the .thn
file persists from a previous run.
\addcontentsline{toc}...
works correctly in both cases.
\documentclass{article}
\usepackage[toc]{multitoc} % <-- Doesn't seem to matter where this line goes
\usepackage{tocloft}
\newlistof{things}{thn}{List of Things}
\newcommand{\thing}[1]{#1 -- #1\addcontentsline{thn}{things}{#1}}
\begin{document}
\tableofcontents
\listofthings
\section{Things}
\thing{Foo}
\thing{Flang}
\thing{Bar}
\addcontentsline{toc}{section}{Fake section}
\addcontentsline{thn}{things}{Fake Thing}
\end{document}