-
Notifications
You must be signed in to change notification settings - Fork 68
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
Invalid warnings for section titles out of sequence #65
Comments
This is very closely related to #47. At the moment, Asciidoctor EPUB3 enforces a very strict structure described here: https://github.com/asciidoctor/asciidoctor-epub3#declaring-the-spine. We want to lift this requirement, which is the focus of #47. |
But the document is well structured, it just uses level offsets on imports? |
The spine document cannot contain any content other than include directives. I think that is the problem. Again, I want to get rid of this restriction...that's just how it works currently. |
I'm double checking that assessment. |
Okay, thanks for clarifying. |
First, for the Preface to show correctly, you need a blank line after the Second, the content in the spine document outside of includes is simply ignored. It doesn't break the converter in anyway. Finally, the problem is that the includes must start with a level-0 section. The problem right now is that you are using The other converters need the chapter sections to be a level-1, so this is the setting I recommend in the header of the spine document.
I'd probably then exclude the parts from the EPUB3 as well using:
or as a one-liner:
|
Here's how it looks when I finished editing it:
|
With that new index, you can generate both a PDF and EPUB3 with no warnings. |
If you still want the parts "Reference documentation" and "Appendix" in the EPUB3, you'll need to create include files for them and use includes in those files to include the chapters. Except the chapters will then become sections. This turns out to be a fairly helpful use case because it allows us to see all the dimensions that need to be considered when creating the EPUB3 divisions. |
Also, imagesdir must be set to images, which is this issue: #22. Otherwise, you get a broken image in the chapter header. |
any update on this? |
I think I explained how to solve the problem. Is there a question you have about my explanation? |
@mojavelinux , oh, I thought your explanation was more of a workaround, hence this issue is still open. (should this issue be closed?) |
Yes. Since this is addressed in the documentation, I will close this issue. If there is something that needs clarification, please reopen with a new request. |
I have an Asciidoctor setup producing HTML, EPUB3 and PDF output via Maven. Both HTML and PDF work flawlessly. However, the EPUB3 output spits out warnings about allegedly out of sequence section titles:
Steps to reproduce:
git clone https://github.com/spring-projects/spring-data-commons
cd spring-data-commons
mvn clean generate-resources -Pdistribute
Versions in use:
The text was updated successfully, but these errors were encountered: