-
Notifications
You must be signed in to change notification settings - Fork 69
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
Allow overriding chapter header look-and-feel #41
Comments
Changing the style and layout of the EPUB output is as simple as customizing the stylesheet. In fact, an EPUB is really just a webpage. Copy the the CSS from this repository into a local directory (e.g.,
By default it will look for the following two files:
The second file can be empty, but gives you the opportunity to add styles that are only understood by CSS3-compliant readers (anything based on Webkit). The current styles are just a default theme. They were designed with a specific use case in mind. I have plans to make them more generic now that the CSS can be replaced. |
Thanks @mojavelinux - I'll give this a try. On a related note, is it possible to add the table of contents to the epub version? I realize it's embedded and visible in the reader, but my publisher is asking if it can be included in the body of the document. I've attached a screenshot of where I see it in the reader. |
We did not include the TOC in the document since all ereaders have a built-in TOC capabilities. If you wanted to add it into the document itself, you'd need to override methods in the converter like you did for Asciidoctor PDF. Although there's no dedicated method in Asciidoctor EPUB3, the method Having said that, I encourage you to challenge InfoQ on this one because it's completely illogical to put a TOC in the flow of the content for EPUB3. That goes against the recommendations of the EPUB3 working group and is a really bad user experience. All ereaders have a built-in TOC for good reason. Honoring this recommendation is critical to accessibility as well. |
Thanks! I was able to successfully customize things using |
It's all or nothing atm, so you'll want to copy them all. We should implement something like |
I've opened an issue to document how to provide your own styles in the README. See #43. |
I'd like change the chapter headers to use a bold font and a white background, instead of a dark background with white text. I'd also like to remove the icon and author name.
Is this possible?
If not, why is the current look-and-feel recommended?
The text was updated successfully, but these errors were encountered: