Asciidoctor does support multiple 0-level sections. That's the purpose of doctype. An article doctype can only have one level-0 section, the document title. A book doctype (as in this example) can have multiple level-0 sections.
What Asciidoctor gets wrong in this example is that it should treat special sections (preface, dedication, appendix, etc) as level-1 sections instead of level-0 sections as they must be written. It also shouldn't throw a warning that the sub-sections are out of sequence since the first sub-section must be level-2. It's that rule that we need to focus on in this issue.
How hard is this? Well, not hard at all since we already have support for detecting special sections in Asciidoctor. I just wasn't aware that the heading level needed to be incremented on special sections when the doctype is book.
-Dan
Hello all,
In converting the RichFaces docbook xml to asciidoc (using some xslt) then back again to docbook xml (using asciidoctor), I've noticed that asciidoctor doesn't support multi-part books. I've created some gists to demonstrate how asciidoc and asciidoctor differ here:
Some simple multi-part asciidoc source:
https://gist.github.com/bleathem/5360926
The docbook xml rendered using asciidoc:
asciidoc -b docbook45 -o book-multi.asciidoc.xml book-multi.txt
https://gist.github.com/bleathem/5360911
The docbook xml rendered using asciidoctor:
asciidoctor -b docbook45 -o book-multi.asciidoctor.xml book-multi.txt
https://gist.github.com/bleathem/5360921
You can see the asciidoctor xml is missing the <part> tags.
I've filed a github issue requesting support for multi-part support:
https://github.com/asciidoctor/asciidoctor/issues/222
WDYT? How hard would it be to add this to asciidoctor? Or am I just doing something wrong, and the support is already there...
If you reply to this email, your message will be added to the discussion below:http://discuss.asciidoctor.org/Support-for-multi-part-books-tp102.htmlTo start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
Free forum by Nabble | Edit this page |