Numbering
Jürgen Spitzmüller
spitz at lyx.org
Tue Feb 8 07:31:26 UTC 2022
Am Dienstag, dem 08.02.2022 um 02:55 +0200 schrieb Joseph Hesse via
lyx-users:
> My lyx document is a book with chapters in a master document. I add
> computer program listings, from files in other folders, with
> Insert->File->Child Document->Program Listing. This works well for
> me.
>
> The numbering of the program listings is 2.1, 2.2, 2.3, etc. where
> the 2
> is the chapter and the number after the dot is a counter that keeps
> incrementing after a new listing is added. I would like to change
> this
> so the numbering is Chapter.Section.Counter e.g. 2.2.1, 2.2.2, 2.2.3
> where these are listings in chapter 2, section 2.
>
> How do I do this? Please point me to a package that will help me
> implement this.
\usepackage{chngcntr}
\AtBeginDocument{\counterwithin{lstlisting}{section}}
See
https://tex.stackexchange.com/a/238843
HTH,
Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20220208/c4135519/attachment.asc>
More information about the lyx-users
mailing list