Skip to content

Listing Numbers are not unique (+ solution) #43

@f4lco

Description

@f4lco

An exemplary "list of listings" using the current template appears as follows:

image

The listing numbering is restarted per chapter, however, the chapter number is not part of the counter. Hence, there are two listings with identifier "1".
The reader should be able to tell apart different listings by their number:

image

I worked around this issue the following way:

\usepackage{chngcntr}

\begin{document}

\counterwithin{lstlisting}{chapter}
...

and think this would be a nice addition to the template, but I am not sure how to integrate it.
With the change, the numbering of listings is consistent with the numbering of figures and tables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions