-
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
Suggestion: an option to split the XHTML files at a lower heading level #327
Comments
@programandala-net Great suggestion! I've just implemented this in #328. Would you like to review or test it before it gets merged into |
I've just implemented this in #328. Would you like to review or test it before it gets merged into `master`?
Not necessary. I'l try the new feature as soon as it's merged.
Thank you.
…--
Marcos Cruz
http://programandala.net
|
Aaaaand... It's in the |
Thank you. It works fine, now the glossary can be splitted into XHTML by
subchapters. But its cross references don't work anymore because the
target file is not included in the XHTML link, only the id.
Unless you can guess the reason out of the recent code changes, I will
do some tests with sample files and different values of
`epub-chapter-level` in order to isolate the problem conditions.
…--
Marcos Cruz
http://programandala.net
|
Could you provide a minimal asciidoctor file that reproduces the problem please? |
…ub-chapter-level > 1
…ub-chapter-level > 1
…ub-chapter-level > 1
I found (and fixed) a bug in TOC when epub-chapter-level is > 1, but from what you said I guess you have a different issue. |
I found (and fixed) a bug in TOC when epub-chapter-level is > 1, but
from what you said I guess you have a different issue.
Thanks. Yes, probably it's different. But maybe it's related to another
issue I was investigating: Calibre displayed (in its own contents tree
dialog) the subchapters of my glossary twice: in its chapter and
oustide, as independent chapters. I will test if your recent fix changes
that.
Sorry I had little time to finish isolate the error conditions into
simple small files. I will post them as soon as possible.
…--
Marcos Cruz
http://programandala.net
|
Yeah, that's exactly what I fixed. |
@programandala-net ping? |
@programandala-net ping?
I didn't forget this issue, but didn't had much time for it these days.
I've tried to reproduce the cross references bug in small simplified
versions of the original source, but somehow the XHTML splitting does
not work in those small versions. I'm investigating the problem.
…--
Marcos Cruz
http://programandala.net
|
I have found the reason the XHTML splitting didn't work in my test files: |
Currently, yes:
So, currently Default doctype is article. Articles do not normally have chapters, don't they? Technically, we could change the logic between doctype/epub-chapter-level and say that article defaults to |
I see. I was confused. The current behaviour makes sense. It seems |
Here you are the test files, with |
Hmm... You're using inline anchors inside section titles. Is it valid at all? Sections are normally given anchors via syntax like: [#anchor]
== Section title or [[anchor]]
== Section title |
Yes, it's valid according to the examples included in the manual, and it always worked before as I said. |
I've moved the anchors outside the titles. Now the links work, but the subchapters are repeated in the TOC displayed by Calibre, except when There's another difference: no warning about missing target ids is displayed anymore. This is a problem that already happened before |
I'll split this into a separate issue. We are not currently able to properly handle inline anchors in section titles, that's why you see a warning. Unfortunately, it needs some fixes to asciidoctor core, so in nearest future just try to avoid inline anchors in section titles. UPDATE: #331 |
I think you're using asciidoctor-epub without commit 861afde. I do not observe duplicate TOC entries on your test documents if using latest |
OK. I used the inline syntax because I needed two different anchors per glossary entry, in order to manage the homonyms. Example:
I will think an alternative. |
You're right. Sorry. My local repository was updated indeed, but somehow something went wrong in my latest building and I didn't noticed. Now the TOCs are right. |
alpha-16 was just released, with this feature included. |
I'm finishing the manual of a software project of mine. The Asciidoctor source is built automatically by combining several documents of the project, including parts of the README, with a lot of information extracted from the source code, and marking the cross references during the process. Then the resulting Asciidoctor document is converted into EPUB, PDF and other formats.
The result is great, except one problem with the EPUB format: one of the chapters is a huge glossary (with subchapters for the initials), which becomes a 2-MiB XHTML file in the EPUB. This makes the document too slow to open and navigate.
I suggest an option to force the splitting of the contents into XHTML files at a certain heading level, equivalent to Pandoc's
--epub-chapter-level
.The text was updated successfully, but these errors were encountered: