-
Notifications
You must be signed in to change notification settings - Fork 102
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
Create section-numbers-tree-processor extension #90
Conversation
Disables numbering for any levels deeper than :sectnumlevels: Also adjusted sample.adoc somewhat, to show that.
…t levels; namespaced (sorta) global vars
Makes use of the :partnums: facility new in 1.5.7.
This seems very useful for those who need fine-grained control over section numerals. I wonder, though, whether it would be better putting this in asciidoctor-fopub. What do you think? Does it make sense outside of that context? |
Well, the scheme I've adopted here is to add the sec.-numbering before we get to fopub--on the way from AsciiDoc to DocBook XML. (The idea being, to have nice control over such numbering, in not only HTML5 conversion, but also the XML conversion--rather than trying to handle all that by tweaking your XSL/fopub parameters or whatnot.) So I confess, I don't see how it could work as a direct inclusion in fopub... which presupposes the DocBook XML as its input. Have I missed some premise of the question? |
Also, consigning it to FOPUB (assuming that is possible) seems to suppose that nobody using the Asciidoctor-thru-DocBook toolchain would ever want to do it apart from fopub. Which may be true, but seems to me a hefty assumption... |
The previous code broke when hitting an AsciiDoc appendix (for which the supplied block.number turns out to be a letter: A, B, ...). This improvement not only fixes that glitch, but also makes appendix-numbering as flexible as it makes the chapter- and section-numbering.
Just emending the long comment in the general file for the extension.
Massaging the long comment's wording (some more).
Improved the way the extension converts to the user-specified style the supplied block.number; which, for an Appendix, is an uppercase Roman letter and must therefore be first turned into an integer.
This extension is entirely too complex for this lab. You are welcome to publish it out of your own repository if you would like to share it with others. |
Allows you to control your DocBook section numbering from within AsciiDoc, with your sectnums and leveloffset attributes (just like they work with the HTML5 backend). Control over styles--at each level--and more. Updated to work with Asciidoctor 1.5.7, including Parts-numbering.
This extension was inspired by the Asciidoctor discussion topic http://discuss.asciidoctor.org/asciidoctor-fopub-tp6285.html