Includes and section numbering

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Includes and section numbering

nicoulaj
Hi,

Hi, I have a document with includes, and I want sections to be globally numbered, whatever the depth and if it is in the main document or from an included one.

So I have the attributes sectnums and toclevels=10.

But in both the HTML and PDF backends, the section numbering works for the main document sections, but not for the sections from the included documents...

Any idea how to make it work ?

Regards,
Julien
Reply | Threaded
Open this post in threaded view
|

Re: Includes and section numbering

siemsen
Hi Julien,

the following works for me:
In main document:

// push child documents down one level
:leveloffset: +1
include::subdocument.adoc[]
:leveloffset: -1

This works for my document with several hundred pages and hundreds of includes.

Hope that helps!
Eike
Reply | Threaded
Open this post in threaded view
|

Re: Includes and section numbering

nicoulaj
Thank you for answering!
This is also what I do:
:leveloffset: +4
include::{project-build-directory}/generated-resources/documentation/asciidoc/{project-packaging}/parameters.adoc[]
:leveloffset: -4

And the document compiles without warnings, so I'm not sure what is wrong here. Julien
Reply | Threaded
Open this post in threaded view
|

Re: Includes and section numbering

rockyallen
Possibly your +4 has taken the heading level too low.
By default, only levels 1, 2 and 3 are numbered (:sectnumlevels: 3).
You can make numbering go lower (but only down to level 5) using
:sectnumlevels: 5
Reply | Threaded
Open this post in threaded view
|

Re: Includes and section numbering

nicoulaj
Indeed, I only needed to increase sectnumlevels, thank you.

2017-02-12 1:59 GMT+01:00 rockyallen [via Asciidoctor :: Discussion] <[hidden email]>:
Possibly your +4 has taken the heading level too low.
By default, only levels 1, 2 and 3 are numbered (:sectnumlevels: 3).
You can make numbering go lower (but only down to level 5) using
:sectnumlevels: 5


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Includes-and-section-numbering-tp5260p5268.html
To unsubscribe from Includes and section numbering, click here.
NAML