-
Notifications
You must be signed in to change notification settings - Fork 48
List of Listings
A list of listings identifies all the listings (program code) that are used in the current document. Each listing is printed with its number, caption and a reference to the page where it is located.
To add a list of listings, add the following lines to the backmatter of your main document (e.g., main.tex
):
\addcontentsline{toc}{chapter}{List of Listings}
\listof{program}{List of Listings}
The \listof{program}
command creates the list of all program environments
(which contain the various code listings), whereas \addcontentsline
places an entry for the list of listings in your table of contents.
The list of listings is usually placed in the back of your document, after the last chapter or the appendices but before the bibliography. Add it after the command \backmatter
to ensure that it is not treated as a regular chapter or an appendix in terms of chapter headings.
The command \listof
is part of the tocbasic
package which is already included in hgb.sty
.