Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-12-2016, 07:54 PM   #1
San Zamoyski
Member
San Zamoyski began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Device: none
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, 12:33 PM   #2
San Zamoyski
Member
San Zamoyski began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2015
Device: none
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
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:57 AM
TOC problem ruefrex Conversion 4 05-28-2011 05:17 PM
Problem with TOC bobcdy Sigil 3 07-23-2010 05:09 PM
TOC Problem Zipr Calibre 0 03-19-2010 06:01 PM
Problem with TOC Soxendom OpenInkpot 4 10-28-2009 02:47 PM


All times are GMT -4. The time now is 05:56 AM.


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