Doubts about EPUB rendering

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Doubts about EPUB rendering

abelsromero
I am preparing a maven epub3 example and I found some possible issues that I'd like confirm before spamming the GitHub repo, specially because I am not sure if all of the  are issues or this is expected and did not find any reference in the github repo.
The project is here https://github.com/abelsromero/asciidoctor-maven-examples/tree/improvement/add_epub_example/asciidoctor-epub3-example, the document can be rendered just using "mvn" command.
I also tested with the gem and got the same results.

- Short chapters have a trailing green "</>". This can be seen in the introduction.
- There's a white page after a chapter that ends with an admonitions. Removing the admonition removes the page.
- Odd bold text. First line on page 9 appears in bold, even when no format is on the source file.
- Code highlighting does not seem to work for coderay or pygments as explained in the README. I suspect a black & white style is used, but the test just appears normal with grey background, no bold or nothing. Is that the normal style?
Reply | Threaded
Open this post in threaded view
|

Re: Doubts about EPUB rendering

mojavelinux
Administrator

On Tue, Apr 11, 2017 at 3:16 PM, abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
- Short chapters have a trailing green "</>". This can be seen in the introduction.

This is a stylistic indicator to indicate the end of the chapter has been reached. eReaders tend to just flow from one page to the next, so this is a creative way to indicate the end of the current document has been reached.

 
- There's a white page after a chapter that ends with an admonitions. Removing the admonition removes the page.

We have little to no control over what an eReader does. This probably happens because the admonition is very close to the bottom of a page and the eReader reserves a whole new page despite there being no more content. Different eReaders will do different things.
 
- Odd bold text. First line on page 9 appears in bold, even when no format is on the source file.

Again, this is a stylistic choice of how the preamble / abstract is rendered. It's controlled by the stylesheet.

 
- Code highlighting does not seem to work for coderay or pygments as explained in the README. I suspect a black & white style is used, but the test just appears normal with grey background, no bold or nothing. Is that the normal style?

Pygments is configured to use the black and white style by default (though this can be overridden). However, remember on AsciidoctorJ, you can't (yet) use Pygments.

If you switch to CodeRay, syntax highlighting won't work unless you set `coderay-css: style`. That's because we don't include a stylesheet by default.

-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Doubts about EPUB rendering

abelsromero
Thanks a lot, really!

Just for the record, I am testing with iBooks on MacOS, I will try with Aldiko on the phone and see the results.
Reply | Threaded
Open this post in threaded view
|

Re: Doubts about EPUB rendering

mojavelinux
Administrator
Thank you for your through review and feedback! Due to the fact that ereading platforms vary so widely, we can never do enough testing ;) And just because I made something a certain way doesn't make it right. I just want you to understand what the logic is behind it so we can come to the right decision.

> I will try with Aldiko on the phone and see the results. 

You'll notice a very different result when you view the book on Aldiko. That's because Aldiko is based on Adobe Digital Editions, which does not use a modern web rendering engine like Kindle or iBooks. It's hard to describe exactly what spec Adobe Digital Editions follows. It's what I call EPUB2+ (which is EPUB3 packaging with CSS2 capabilities).

Cheers,

-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux