Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 04-12-2012, 05:16 AM   #1
toothpaste
Junior Member
toothpaste began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: Kindle Touch
html tag broken when jump to next section in book

I use kindlegen to build some mobi file . when I jump to the next section by swiping the finger from down to up on the kindle touch screen , some html tags in the title are broken.
fox example, it's supposed to be displayed as
Code:
测试标题
but it displayed as
Code:
h1 height="0" align="center">测试标题
it's link the kindle eat up the first character "<"
but when I tuned to next page by tap the bottom right of the page, it didn't trigger it . what's more, it's also no problem in kindle preview application, and kinglegen give out no wanning when building the book.

and , this situation only happen when my book contain Chinese character. is it a bug of kindle touch or there is something wrong in my book?

I attached my opf, ncx,and the book ,any help will be appreciated, I have stuck at it for days!

in this book ,it will triggered at the page 3 or 4 and flowing pages
test.zip
toothpaste is offline   Reply With Quote
Old 04-12-2012, 07:08 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Your source file contains Mobipocket tags that are no longer supported by Kindlegen and your .ncx file looked a bit strange.
I'd recommend editing your book with Sigil. The attached .epub version of your book seems to compile fine with Kindlegen.
Attached Files
File Type: epub test.epub (20.0 KB, 141 views)
Doitsu is offline   Reply With Quote
Old 04-12-2012, 07:27 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's a known bug in the mobi format. Move the anchor-point which the href in the toc.ncx entry points to before (and outside of) the block element you're linking to.

If the href in the ncx is "Text/your_html_file.xhtml#chap1"... then the code at that point in the html should be something like:
Code:
<a id="chap1"></a><h1>Chapter 1</h1>
as opposed to:
Code:
<h1 id="chap1">Chapter 1</h1>
Also, this bug won't rear it's ugly head if your chapters are all separate html files. In other words, if the links in the ncx file all just point to a unique html file (with no fragment identifier in the url), this won't happen.

NOTE: I didn't get a chance to view the source to see if this is the exact problem. It just sounds very similar and the bug bites quite few people.

Quote:
Originally Posted by Doitsu
Your source file contains Mobipocket tags that are no longer supported by Kindlegen
Out of curiosity, what tags are being used that kindlegen no longer supports. Most of the old mobipocket tags are still perfectly functional/valid with kindlegen, to my knowledge.

Last edited by DiapDealer; 04-12-2012 at 07:38 AM.
DiapDealer is offline   Reply With Quote
Old 04-12-2012, 07:48 AM   #4
toothpaste
Junior Member
toothpaste began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: Kindle Touch
Quote:
Originally Posted by Doitsu View Post
Your source file contains Mobipocket tags that are no longer supported by Kindlegen and your .ncx file looked a bit strange.
I'd recommend editing your book with Sigil. The attached .epub version of your book seems to compile fine with Kindlegen.
Thanks for reply!

you mentioned the unsupported tags, do you mean "<mbp:nu>" ? when i compile the source file using kindlegen 2.3, it give out the warning ,but some days ago , amazon release kindlegen 2.4 , and no more warning on that tag.

i use kindlegen compile the file you attached, and delivered it to my kindle touch , that broken html tag still exist
toothpaste is offline   Reply With Quote
Old 04-12-2012, 08:01 AM   #5
toothpaste
Junior Member
toothpaste began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: Kindle Touch
Quote:
Originally Posted by DiapDealer View Post
Also, this bug won't rear it's ugly head if your chapters are all separate html files. In other words, if the links in the ncx file all just point to a unique html file (with no fragment identifier in the url), this won't happen.
thanks for pointing that out.

but in my case , no anchor is used in my book, and all the links are pointing to a unique html file.
toothpaste is offline   Reply With Quote
Old 04-12-2012, 08:15 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by toothpaste View Post
i use kindlegen compile the file you attached, and delivered it to my kindle touch , that broken html tag still exist
You're right, I just tested it on my Kindle. (It looked OK both in the Kindle app and the Kindle previewer.)

It seems that the following line in the stylesheet is causing the problems:

Code:
.item_title {
  text-align: center;
  margin: 0 auto;
  width: 70%;
}
Once I deleted it, all headings looked OK.
Doitsu is offline   Reply With Quote
Old 04-12-2012, 08:43 AM   #7
toothpaste
Junior Member
toothpaste began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: Kindle Touch
Quote:
Originally Posted by Doitsu View Post
You're right, I just tested it on my Kindle. (It looked OK both in the Kindle app and the Kindle previewer.)

It seems that the following line in the stylesheet is causing the problems:

Code:
.item_title {
  text-align: center;
  margin: 0 auto;
  width: 70%;
}
Once I deleted it, all headings looked OK.
CSS is new thing to me ,and i pick that lines from web...
I delete that margin line , build the book, and feeling amazing, until i swipe to page 10 from page 9 , it is broken in page 10 and the following pages.
but you say all header is OK , can you attached you file ?
i had tried to remove the css completely(remove the link rel in the <head> tag) , and still got the same.

this is my file book.mobi
toothpaste is offline   Reply With Quote
Old 04-12-2012, 08:58 AM   #8
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
I just double-checked my file on my K3 and it also has the same issue, but on the very last page, which I didn't check.
I'd recommend doing more tests with the stylesheet, since it seems to be causing the problems.
Good luck!
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML Meta tag for cover image URL? MrPLD Conversion 5 01-29-2012 12:15 AM
Conversionproblems from HTML to ePub with the <pre>-Tag matthias2011 Conversion 16 07-29-2011 08:47 AM
Chapter jump tag? wornways Kindle Formats 2 06-02-2011 06:57 AM
Chapter jump tag? wornways Amazon Kindle 2 06-01-2011 04:41 PM


All times are GMT -4. The time now is 07:40 AM.


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