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
signature.asc
Description: This is a digitally signed message part
-- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users