View Single Post
Old 06-09-2010, 10:18 AM   #1
HamsterRage
Evangelist
HamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notesHamsterRage can name that song in three notes
 
HamsterRage's Avatar
 
Posts: 435
Karma: 24326
Join Date: Jun 2010
Device: Kobo
Font Scaling and TOC

Forgive me if this has already been hashed to death on this forum, but I've been goofing around with the ePubs in Sigil and this is what I've found.

Font Scaling:

So far, I've had 100% success by simply removing any "font size" tags in the css stylesheet of the ePubs. All of the other formatting seems to stay intact, like bold text and italics, but the Kobo reader will now be able to scale the text size. Yeah!

Most of the ePubs I've had to change had the font size set to "1em" but I've also seen some ePubs where the font size was specified "small" or "medium". From what I can tell, the relative font sizes work fine with font scaling on the Kobo reader without any need to change them.

TOC:

OK, so maybe this is obvious, but the Kobo reader builds it's TOC by gathering up all of the text in the body of the book that has "h#" tags around it. These are tags that indicate that the text is a heading. In addition to contributing to the TOC, these will also be formatted differently in the body of the document. H1 tags will have a really huge font, and h3 have a large but not silly font size. Most ePubs that I've seen that are set up properly seem to use h3 tags.

Regardless, the Kobo reader doesn't seem to handle the h1, h2 or h3 tags any differently when it builds the TOC, so there's no point in having H1 tags for section titles and h3 tags for chapter titles. They'll all just look the same in the Kobo reader TOC.

What I've generally done so far is to find an ePub that works properly and then copy the h# tag info from a chapter entry and then paste in around the chapter titles in the ePub that doesn't work. They all seem to have some extraneous attributes defined in them, and I'm not sure how much you can strip out before it ceases to be enough to look right or create a TOC in the Kobo reader. I'm hoping that a simple <h3>Chapter XX</h3> will be enough to do the trick.

I've also been been inserting Sigil chapter breaks right above the chapter titles. This causes the software to split the current XML file into two, but isn't enough by itself to generate a TOC entry. I have a feeling that the Kobo reader would let you do the "Next Chapter" menu function based on this split though. I'm going to test that tonight.

Anyways, I hope this helps anyone frustrated with ePubs that aren't looking quite right on their Kobo reader. Let me know if I've made a mistake or if you have any suggestions.

Last edited by HamsterRage; 06-09-2010 at 10:23 AM.
HamsterRage is offline   Reply With Quote