0

I am writing a document with memoir, and am having a formatting problem with my List of Listings.

I am setting up the Listing type as follows:

\newfloat[chapter]{listing}{lol}{Listing}
\newcommand{\listlistingname}{List of Listings}
\newlistof{listoflistings}{lol}{\listlistingname}

My \listoflistings invocation, however, is producing the following result:

enter image description here

The built-in lists (\listoffigures, \listoftables) are working properly. I have also examined the contents of the .lol file, and it is indistinguishable form the lot and lof files. I do not have listing, lstlistings, or listings loaded.

How might I debug this problem and get my list of listings to behave correctly?

4
\documentclass{memoir}

\newfloat[chapter]{listing}{lol}{Listing}
\newcommand{\listlistingname}{List of Listings}
\newlistof{listoflistings}{lol}{\listlistingname}
\newlistentry{listing}{lol}{0} % added
% "The other part of creating a new 'List of...', is to specify the formatting of
% the entries" (memoir manual, section 9.3)

\begin{document}

\listoflistings

\chapter{One}

\begin{listing}
Here goes some content.
\caption{\label{lst:one} Listing 1}
\end{listing}

\begin{listing}
Here goes some content.
\caption{\label{lst:two} Listing 2}
\end{listing}

\chapter{Two}

\begin{listing}
Here goes some content.
\caption{\label{lst:three} Listing 3}
\end{listing}

\end{document}

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.