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 01-12-2016, 06:54 PM   #1
San Zamoyski
Enthusiast
San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.
 
Posts: 48
Karma: 41612
Join Date: Jan 2015
Location: Poland, Warsaw
Device: Kindle 3G
TOC problem

Hi!

I am creating a plugin for WordPress to generate ebooks from PDF of plain text. Work is almost done (with some dirty workarounds and small glitches).

So I'm generating ZIP file as epub thats being converted to mobi with kindlegen.

One thing I'm missing is TOC. When I go to menu 'go to*', toc is grayed out and i have no idea why.

*i have polish menu, so it is possible it is called somehow diffrent.

Here are some files from example epub:

toc.html:
Code:
<!DOCTYPE html>
	            <html lang="pl" xmlns="http://www.w3.org/1999/xhtml"> 
	                <head>
	                    <meta charset="utf-8" />
	                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	                    <link rel="stylesheet" type="text/css" href="style.css" />
	                	<title>Flaj</title></head>
	                <body><h1 style="text-align:center;" >Spis treści</h1><p><a href="1.html">Flaj</a></p>
	                </body>
	            </html>
toc.ncx:
Code:
<?xml version="1.0" encoding="UTF-8"?>
				<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
				  "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
				<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1" xml:lang="en" dir="ltr">
					<head>
						<meta name="dtb:uid" content="zabałaganionemiejsce.pl" />
						<meta name="dtb:depth" content="3" />
						<meta name="dtb:totalPageCount" content="0" />
						<meta name="dtb:maxPageNumber" content="0" />
					</head>
				
					<docTitle>
						<text>Flaj</text>
					</docTitle>
				
					<docAuthor>
						<text>Tomasz Bilski</text>
					</docAuthor>
					
					<navMap>
						<navPoint class="tyt" id="tyt" playOrder="1">
						   <navLabel><text>Spis treści</text></navLabel>
						   <content src="tyt.html" />
						</navPoint>
						<navPoint class="toc" id="toc" playOrder="2">
						   <navLabel><text>Spis treści</text></navLabel>
						   <content src="toc.html" />
						</navPoint>
							<navPoint class="chapter" id="p1" playOrder="3">
							   <navLabel><text>Flaj</text></navLabel>
							   <content src="1.html" />
	  						</navPoint>
						</navMap>
					</ncx>
book.opf:
Code:
<?xml version="1.0" encoding="UTF-8"?>
			            <package xmlns:xx="http://saxon.sf.net/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/metadata/dublin_core" 
			                unique-identifier="BookId" version="2.0" xmlns="http://www.idpf.org/2007/opf">
			
			            	<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
			            		<meta name="book-type" content="b/d"/>
			            		<dc-metadata xmlns:dc="http://purl.org/metadata/dublin_core" xmlns:oebpackage="http://openbook.org/namespaces/oeb-package/1.0/"> 
			            			<dc:title>Flaj</dc:title>
			            			<dc:language>pl</dc:language>
			            			<dc:creator>Tomasz Bilski</dc:creator>
			            			<dc:publisher>zabałaganionemiejsce.pl</dc:publisher>
			            			<dc:rights>Niniejsza publikacja została utworzona przy użyciu skryptów dostępnych na zabałaganionemiejsce.pl. Serwis nie odpowiada za przetwarzanie nielegalnych materiałów.
			    				    </dc:rights>
			                    </dc-metadata>
			                    <meta name="cover" content="cover-image" />
			            	</metadata>
			    
			    	        <manifest>
			                    
						<item id="tyt" href="tyt.html" media-type="application/xhtml+xml"/>
						<item id="toc" href="toc.html" media-type="application/xhtml+xml"/>
							<item id="p1" href="1.html" media-type="application/xhtml+xml"/>
			                    <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" />
								<item id="cover-image" href="cover.png" media-type="image/png" />
								<item id="Style" href="style.css" media-type="text/css" /></manifest>
			    
			            	<spine toc="ncx">
			            		
							<itemref idref="tyt" />
							<itemref idref="toc" />
							<itemref idref="p1" />
			            	</spine>
							
							<guide>
							
							</guide>
			            </package>
Any idea what's wrong?

Best regards!
San Zamoyski is offline   Reply With Quote
Old 01-13-2016, 11:33 AM   #2
San Zamoyski
Enthusiast
San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.San Zamoyski is an enigma wrapped up in a mystery.
 
Posts: 48
Karma: 41612
Join Date: Jan 2015
Location: Poland, Warsaw
Device: Kindle 3G
Found it!

I was missing, in opf:
Code:
<guide>
   <reference href="toc.html" type="toc" title="Table of Contents"/>
</guide>
San Zamoyski is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch Do you have this problem in 1.9.17 (TOC) John F Kobo Reader 14 03-23-2012 06:57 AM
TOC problem ruefrex Conversion 4 05-28-2011 04:17 PM
Problem with TOC bobcdy Sigil 3 07-23-2010 04:09 PM
TOC Problem Zipr Calibre 0 03-19-2010 05:01 PM
Problem with TOC Soxendom OpenInkpot 4 10-28-2009 01:47 PM


All times are GMT -4. The time now is 02:42 PM.


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