It seems that the listings package, doesn't give any command to
include a list of listings but without including it in the table of
contents. Is there a way to include a list of listings without the
table of contents line?
Cheers,
Paulo Matos
I don't understand what you mean. The list of listings is not in the
table of contents:
\documentclass{article}
\usepackage{listings}
\begin{document}
\tableofcontents
\lstlistoflistings
\section{A}
\begin{lstlisting}[caption=Test lst]
a
\end{lstlisting}
\end{document}
--
Ulrike Fischer
Hummf, interesting... I wonder why it's showing up. Maybe it's a
memoir thing...
very interesting, I'll have a look at memoir after lunch
btw: it is always a good idea to include a minimal example. How should
we have known that you were using memoir.
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
ahh, interesting feature
\lst@UserCommand\lstlistoflistings{\bgroup
\let\contentsname\lstlistlistingname
\let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}%
\tableofcontents \egroup}
i.e. listings use \tableofcontents internally to typeset the
listoflistings, which is just to add a header to the \lst@temp{lol}
But in memoir this causes the \contentsname to be added to the main TOC.
and \tableofcontents* removes it from the TOC.
I'll see if we can come up with a switch to locally remove this feature
without having to change listings
Thanks for your help. Sorry for not providing a small example in my
original post. From your reply it seems there is no way, currently, of
removing the listings entry from the table of contents (without
messing up with .toc manually)?
you could redefine the macro above (I haven't tried it)
besides, the next version of memoir will have a feature that makes all
memoir created lists of into their starred counter parts (can be used
locally to solve your problem).
/daleif