swathesis icon indicating copy to clipboard operation
swathesis copied to clipboard

Listing Numbers are not unique (+ solution)

Open f4lco opened this issue 5 years ago • 1 comments

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.

f4lco avatar Jul 30 '19 08:07 f4lco

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)

krono avatar Jun 11 '24 12:06 krono