Open tradej opened 8 years ago
At the time I wrote docbookrx, Asciidoctor didn't yet support relative level offsets. Now that it does, I definitely agree they should be used.
Even better is to define the offset directly on the include directive.
include::other-file.adoc[leveloffset=<n>]
Oh, I didn't know you can do that. I'm absolutely for specifying it in the directive.
When converting a file that includes another file (let's call them parent and child), DocBookRx prepends and suffixes the
include::[]
commands in the parent with:leveloffset: 1
and:leveloffset: 0
lines to adjust for the shifted levels in the child. That is IMHO not entirely correct, because it resets theleveloffset
set in any document that may include the parent.I believe that the lines preceding and following the inclusion commands in the parent should be
:leveloffset: +1
and:leveloffset: -1
as then they would retain the value set in any document that may include the parent.