Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leveloffset before/after inclusion resets any previously defined value #46

Open
tradej opened this issue May 26, 2016 · 2 comments
Open

Comments

@tradej
Copy link

tradej commented May 26, 2016

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 the leveloffset 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.

@mojavelinux
Copy link
Member

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>]

@tradej
Copy link
Author

tradej commented May 27, 2016

Oh, I didn't know you can do that. I'm absolutely for specifying it in the directive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants