Skip to content

Stop adding negative leveloffset for EPUB #1389

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

Merged
merged 1 commit into from
Nov 8, 2020
Merged

Conversation

slonopotamus
Copy link
Contributor

@slonopotamus slonopotamus commented Mar 1, 2020

asciidoctor-epub3 1.5.0-alpha-14 and newer now parses whole book as a single document.

Negative leveloffset

  1. Breaks appendix hierarchy because Asciidoctor doesn't allow appendix subsections to be higher that level 3. When leveloffset is applied to them, they become level 2 and are no longer children of appendix and instead become standalone chapters
  2. Transforms progit into a multi-part book instead of multi-chapter book, what I think is wrong

After removal of negative offset, EPUB is structurally equivalent to other formats.

@slonopotamus
Copy link
Contributor Author

@ben ping? Are there any concerns that prevent this PR from being merged?

@ben
Copy link
Member

ben commented Jun 16, 2020

I'd love to. @jnavila do you have an idea about what effect this would have? Why did we add this setting in the first place?

@jnavila
Copy link
Member

jnavila commented Jun 16, 2020

This setting was needed for proper part slicing of the book in epub format. IIRC, otherwise, the whole book structure would be included in one file, and cross links would not work.

Now, @slonopotamus is in charge of asciidoctor-epub3, so we can trust his judgement on the capabilities of newer versions. Do we need anything else? Maybe a version condition in Gemfile?

@slonopotamus
Copy link
Contributor Author

Your Gemfile accepts all asciidoctor-epub3 1.5.x versions. As I already said, major rework happened in alpha.14 and only minor fixes were done since then. So you could change lower bound to 1.5.0.alpha.14 to ensure that users get better results.

@HonkingGoose
Copy link
Contributor

Hi @slonopotamus! 👋

As you might have seen, we've migrated from Asciidoctor 1.5.6.2 to Asciidoctor 2.0.11.

We've also upgraded from 'asciidoctor-epub3', '~> 1.5.0.alpha.9' to 'asciidoctor-epub3', '1.5.0.alpha.18'

Can you pull in the current progit2/master branch into this branch and see if this change is still needed?

Thanks! 😄 👍

asciidoctor-epub3 1.5.0-alpha-14 now handles whole book as a single document.

Negative leveloffset
1. Breaks appendix because appendix subsections are not allowed to be higher that level 3. When leveloffset is applied to them, they become level 2 and are no longer children of appendix and instead become standalone chapters
2. Transforms progit into a multi-part book instead of multi-chapter book, what is wrong

After removal of negative offset, epub is structurally equivalent to other formats.
@slonopotamus
Copy link
Contributor Author

slonopotamus commented Nov 7, 2020

Document structure without patch:

image

Document structure with patch:

image

@jnavila
Copy link
Member

jnavila commented Nov 7, 2020

I have to check that our script on git-scm does not break on this.

@jnavila
Copy link
Member

jnavila commented Nov 7, 2020

Sorry, I'm dumb. This is only for epub format and we use raw html format for the script.

@ben ben merged commit 651fda5 into progit:master Nov 8, 2020
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

Successfully merging this pull request may close these issues.

4 participants