GeneralCustom "List of …"

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
larschrjensen
Posts: 10
Joined: Thu Dec 29, 2011 3:30 pm

Custom "List of …"

Post by larschrjensen »

Hi there,

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:
custom-ListOf.png
custom-ListOf.png (17.71 KiB) Viewed 2704 times
I would like to have sequences presented the same way tables and figures are presented in the toc.

Code: Select all

\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}
Any help is appreciated
Last edited by localghost on Wed May 09, 2012 5:32 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

larschrjensen
Posts: 10
Joined: Thu Dec 29, 2011 3:30 pm

Custom "List of …"

Post by larschrjensen »

I was able to solve this by replacing this:

Code: Select all

\addcontentsline{Sequence}{toc}{List of Sequences}
with this:

Code: Select all

\addcontentsline{toc}{section}{List of Sequences}
Thanks to Tom texblog.org
Post Reply