I've created a custom list of examples. Now I want to add this to to my toc, but in doing so the formatting gets messed up: I would like to have sequences presented the same way tables and figures are presented in the toc.
Code: Select all
Code, edit and compile here:
\documentclass[a4paper,12pt]{article}\usepackage{tocloft}\newcommand{\listSequencename}{List of Sequences}\newlistof{Sequence}{seq}{\listSequencename}\newcommand{\Sequence}[1]{%\refstepcounter{Sequence}\par\noindent\textbf{Sequence \theSequence #1}\addcontentsline{seq}{Sequence}{\protect\numberline{\theSequence}#1}\par}\begin{document}\tableofcontents\newpage\addcontentsline{toc}{Sequence}{List of Sequences}\listofSequence\newpage\listoffigures\newpage\section{test}\Sequence{bla bla}\begin{figure}•\caption{bla bla}\end{figure}\end{document}