Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
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
Old 06-09-2010, 06:08 PM   #2
Stinger
Asha'man
Stinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-booksStinger has learned how to read e-books
 
Stinger's Avatar
 
Posts: 335
Karma: 844
Join Date: May 2010
Location: Canada
Device: Kobo
You're absolutely correct about the font scaling issue, and the workaround by removing the font-size: lines in the CSS file. You might be interested in a little tool one of the forum members here created for us, which automates the process of parsing and removing those troublesome lines:
https://www.mobileread.com/forums/showthread.php?t=83209

Quote:
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.
This isn't actually correct. The TOC in an epub is fixed when the epub is created. You can find it in the 'TOC.NCX' file within the epub.

However, most programs (such as calibre) use the 'Heading #' tags to auto-generate this TOC.

Quote:
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.
Most ePub readers CAN differentiate between the heading levels and allow a hierarchical structure like you would expect (like you see in Sigil). Obviously you've noted that the Kobo doesn't have this functionality yet, but it is quite possible that a future firmware upgrade will bring it to us.

Quote:
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.
It's a good idea to split the HTML/XML files, like you mention, as much as possible. It will help the load times when you flip between those breaks on the Kobo. However, the Kobo does not use these breaks as indications for chapter breaks.

Quote:
I'm hoping that a simple <h3>Chapter XX</h3> will be enough to do the trick.
Correct. It might also help you to know that you can do this through point&click within Sigil by just highlighting the chapter heading and adding the 'Heading #' style from the toolbar. (it might be worth it to use the 'remove formatting' function first, to remove all those other attributes and tags, as these can sometimes create redundant entries in the TOC).


Happy Tinkering!

Last edited by Stinger; 06-09-2010 at 07:58 PM. Reason: typo
Stinger is offline   Reply With Quote
Advert
Old 06-09-2010, 07:26 PM   #3
artificial
Groupie
artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.artificial got an A in P-Chem.
 
artificial's Avatar
 
Posts: 179
Karma: 6328
Join Date: May 2010
Location: Melbourne, Australia
Device: Kobo eReader
Quote:
Originally Posted by Stinger View Post
you can do this through point&click within Sigil
Thanks for the tip about Sigil, I'd not heard of it before. Will check it out.

I've been doing all my ePub editing manually using my standard web development IDE, but I'd love a tool that is geared specifically towards the ePub format.
artificial is offline   Reply With Quote
Old 06-09-2010, 08:32 PM   #4
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
Quote:
Originally Posted by artificial View Post
Thanks for the tip about Sigil, I'd not heard of it before. Will check it out.

I've been doing all my ePub editing manually using my standard web development IDE, but I'd love a tool that is geared specifically towards the ePub format.
Sigil's a tad slow at times, for doing things like splitting XML files, but seems to be a pretty handy tool for sorting out little glitches with ePUBs.
HamsterRage is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac OSX: Idiot-Proof Font Scaling Fix [Step-by-step] Jelbee Kobo Reader 2 06-14-2010 12:16 PM
PRS-500 and font scaling dorkydood Sony Reader 1 04-10-2010 08:39 PM
Sony font scaling : time to change? jotas Sony Reader 9 09-07-2009 09:08 PM
Scaling down PDF to work on BeBook spaze PDF 14 08-09-2009 11:49 AM
scaling pdfs davec67 Sony Reader 4 10-01-2006 08:07 AM


All times are GMT -4. The time now is 09:37 AM.


MobileRead.com is a privately owned, operated and funded community.