swathesis
swathesis copied to clipboard
Listing Numbers are not unique (+ solution)
An exemplary "list of listings" using the current template appears as follows:
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:
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.
There's a assumption in the code at some point where the couter is specifically set up that way. I ought to probably fix that somewhen ( it bit @onsetsu already)