Numbering
Joseph Hesse
joe.hesse at actcx.com
Tue Feb 8 07:59:48 UTC 2022
On 2/8/22 09:31, Jürgen Spitzmüller via lyx-users wrote:
> 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
>
>
Thank you, it works with no issues.
Joe
More information about the lyx-users
mailing list