Quantcast
Channel: MobileRead Forums - Kindle Formats
Viewing all articles
Browse latest Browse all 861

Hidden attribute not working properly in some devices

$
0
0
Hello guys!

I'm having a little trouble with the TOC (HTML) of my book... It's a valid (3.0.1) .epub file, which I converted to .mobi using kindlegen without warnings or errors.

The problem is the way my Front Matter section is renderized in some devices. I put a "hidden" attribute in the section (see code below), and I wanna it:
a) to appear in the Device TOC (the one you access via GO TO menu in the Paperwhite, for example), but NOT in the book itself.
b) to work as a jump point when using the arrows to jump to the previous/next section.

So, to sum up, the Front Matter section has all the navigational properties, but is hidden in the TOC in the beginning of the book.

But this is what happens after I copy the .mobi file to my devices, as a test:

1) Kindle Paperwhite, most recent version: everything is ok, the way I expected. The Front Matter section doesn't appears on the TOC of the book itself, but does appears in the GO TO menu with the collapsible arrow feature, and I can successfully jump between each part of it using the arrows ( |< and >| ) in the page flip screen.

2) Kindle 5th generation (Kindle 5, the one with the 5 buttons in the botton): the hidden part of the TOC DOES APPEARS inside the book. I don't know why, since i believe this model does have support for the HTML/EPUB3 features. Am I wrong?

3) Kindle app for Android: This one is very strange. Everything is fine, except the text header "Front Matter" appears 2 times, one inside of another! Like (the > represents a collapsible arrow):

> FRONT MATTER (all uppercase)
> Front Matter (The way is actually writed in the TOC)
Foo
Bar
Foo Bar
Bar Foo
TOC
Chapter 1
Chapter 2
... ... ...

This is the HTML code (just a excerpt)

Code:

<nav epub:type="toc" id="toc-nav">

<ol>

<li hidden="hidden"><span>Front Matter</span>
    <ol>
        <li><a href="foo.xhtml">foo</a></li>
        <li><a href="bar.xhtml">bar</a></li>
        <li><a href="foobar.xhtml">foo bar</a></li>
        <li><a href="barfoo.xhtml">bar foo</a></li>
        <li><a href="toc.xhtml">TOC</a></li>
    </ol>
</li>

<li><a href="c01.xhtml">Chapter 1</a></li>
<li><a href="c02.xhtml">Chapter 2</a></li>
<li><a href="c03.xhtml">Chapter 3</a></li>
...
...
...

What's going on?? Is there anyway of make this work the way it works on the Paperwhite in the others devices?

Tks a lot!

Viewing all articles
Browse latest Browse all 861

Trending Articles