Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 07-23-2012, 11:00 AM   #1
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Code showing in mobi (from epub)

What could be causing markup code to be showing sometimes in a finished Mobi file on a Kindle? It only happens when I use the 4-way navigator to skip ahead or back. And it doesn't always happen. I have attached a screen shot from the Kindle (keyboard version).

I create the files in Sigil and then use Calibre to make the mobi. I have looked at pages where it happens and where it doesn't happen and can't see a difference in the code. I have included the code from the page associated with the screenshot below.

Any ideas?

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <link href="../Styles/Stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <h2 class="sutta" id="heading_id_2" title="4. Nandakovādasuttaṃ"><span class="sutnum">4.</span>&nbsp;Nandakovādasuttaṃ</h2>

  <p class="bodytext"><a id="para398"></a><a id="para398_mn3"></a><span class="paranum">398</span>. Evaṃ <a id="T3.0486"></a><a id="V3.0324"></a> me sutaṃ – ekaṃ samayaṃ bhagavā sāvatthiyaṃ viharati jetavane anāthapiṇḍikassa ārāme. Atha kho mahāpajāpatigotamī pañcamattehi bhikkhunisatehi saddhiṃ yena bhagavā tenupasaṅkami; upasaṅkamitvā bhagavantaṃ abhivādetvā ekamantaṃ aṭṭhāsi. Ekamantaṃ ṭhitā kho mahāpajāpatigotamī bhagavantaṃ etadavoca – “ovadatu, bhante, bhagavā bhikkhuniyo; anusāsatu, bhante, bhagavā bhikkhuniyo; karotu, bhante, bhagavā bhikkhunīnaṃ dhammiṃ katha”nti <span class="note">[dhammikathanti (syā. kaṃ. ka.)]</span>.</p>
Attached Thumbnails
Click image for larger version

Name:	screen_shot-4659.gif
Views:	255
Size:	48.4 KB
ID:	89599  
BKh is offline   Reply With Quote
Old 07-23-2012, 11:02 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's a bug in amazon's mobi renderers. If you dont care about supporting older kindles, convert to azw3 instead.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-23-2012, 11:11 AM   #3
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Thanks for the instant reply (and apologies if this has been discussed previously and I missed it in my search).

I was planning on sharing these with the general public. I'm wondering if people with older Kindles have come to expect that they will have to convert some files into regular mobi's?

And thanks, Kovid, for all your work on Calibre.
BKh is offline   Reply With Quote
Old 07-23-2012, 03:22 PM   #4
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
There are ways to construct the source for your MOBIs so that you can drastically limit this behavoir. Namely: "Anchors Must Be Added Before Formatting Tags"

If your NCX file contains a navPoint similar to:
Code:
<navPoint id="navPoint-1" playOrder="1">
  <navLabel>
    <text>Chapter One</text>
  </navLabel>
  <content src="Text/some_file.html#Chapter1"/>
</navPoint>
Then the target html file needs to contain something like the following:
Code:
<a id="Chapter1"/><h1>Chapter 1</h1>
And not:
Code:
<h1><a id=”Chapter1”/>Chapter 1</h1>
or:
Code:
<h1 id="Chapter1">Chapter 1</h1>
The second two both run the risk of html code showing when following a link to "some_file.html#Chapter1" (including jumping from chapter to chapter using the arrow keys)
DiapDealer is offline   Reply With Quote
Old 07-23-2012, 04:08 PM   #5
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
There are ways to construct the source for your MOBIs so that you can drastically limit this behavoir. Namely: "Anchors Must Be Added Before Formatting Tags"
Wow. Thank you. That's fascinating and matches what little I know about Kindles and Mobi. Unfortunately since I am using Sigil to do all of my heavy lifting on the ToC and NCX file I don't think I will be able to code them that way. If I ever create something that really matters now I know what to do to fix it.

I'm guessing there is no way to tell Calibre to move the id's out from inside the h tags when it creates the mobi, is there?
BKh is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata Editor - showing code not text Paxman53 Sigil 7 07-04-2012 06:39 AM
TOC showing up at the end of MOBI ebookn00b Calibre 9 06-10-2012 01:01 AM
Imported Mobi showing as HTMLZ ghostyjack Calibre 8 03-29-2012 10:56 AM
Problem with MOBI - Not showing a page jim.thornton Conversion 2 07-21-2011 07:53 PM
Error code when trying to convert a MOBI to an EPUB Josieb1 Conversion 6 05-20-2011 03:46 PM


All times are GMT -4. The time now is 11:53 PM.


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