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 12-03-2011, 03:20 AM   #1
nosnoop
Enthusiast
nosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavens
 
Posts: 45
Karma: 13564
Join Date: Nov 2011
Device: Kindle Paperwhite; PRS-T1
TXT-> EPUB TOC problem

I am converting from Txt-> ePub, and I am trying to generate TOC.
Language is in Unicode Chinese.

I am using this XPath Expression for both Level 1 TOC, Structure Detection and Insert Page break:
//*[re:test(., "第.(章|回)", "i")]

All other settings as default except a @font-face entry in Extra CSS.
I have double checked the regex in search & replace and it should work. All the chapters are referenced properly, except two extra entries on the top.

And I get this in the ePub xhtml:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" id="calibre_toc_1" style="page-break-before:always">
  <head>
....
  <div style="display: block; page-break-after: always"></div>
  <body id="calibre_toc_2" class="calibre">
<div class="calibre1"></div><p id="calibre_toc_3" class="calibre2">第1章</p>
<p class="softbreak">*</p>
So the calibre_toc_1 and calibre_toc_2 are in the wrong place, and the toc.ncx including 1000+ characters from the content in the <text></text> tag for each of them.

Tried checking "Do not add detected chapters..."; same results.
Tried removing all entries in Structure Detection and Insert Page break.... same results.

Any pointers would be most appreciated.
Calibre Portable 0.8.29

Last edited by nosnoop; 12-03-2011 at 03:31 AM.
nosnoop is offline   Reply With Quote
Old 12-04-2011, 11:46 PM   #2
nosnoop
Enthusiast
nosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavensnosnoop is a rising star in the heavens
 
Posts: 45
Karma: 13564
Join Date: Nov 2011
Device: Kindle Paperwhite; PRS-T1
I am adding some additional information from the debug files, and I hope someone can give me some pointers as to how to correct this problem.

This is the parsed/index.html:
Spoiler:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/></head>
<body>
<p>第1章</p>
<p class="softbreak" style="margin-top:.5em; page-break-before:avoid; text-align:center">*</p>
<p>


And this is the structure/index.html:
Spoiler:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" id="calibre_toc_1" style="page-break-before:always">
<head>
<title/>
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/></head>
<body id="calibre_toc_2" style="page-break-before:always">
<p id="calibre_toc_3" style="page-break-before:always">第1章</p>
<p class="softbreak" style="margin-top:.5em; page-break-before:avoid; text-align:center">*</p>
<p>


and this is the structure/toc.ncx:
Spoiler:
<?xml version='1.0' encoding='utf-8'?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1" xml:lang="eng">
<head>
<meta content="131bb764-47d1-46f3-95c5-0afc7c796c8a" name="dtb:uid"/>
<meta content="2" name="dtb:depth"/>
<meta content="calibre (0.8.29)" name="dtb:generator"/>
<meta content="0" name="dtb:totalPageCount"/>
<meta content="0" name="dtb:maxPageNumber"/>
</head>
<docTitle>
<text>如何說再見</text>
</docTitle>
<navMap>
<navPoint id="405a28da-d96d-4f65-b08e-a2e459c314fd" playOrder="0">
<navLabel>
<text>第1章 *   
......
</text>
</navLabel>
<content src="index.html#calibre_toc_1"/>
</navPoint>
<navPoint id="21572947-aefd-4629-a134-f3616149b5c6" playOrder="1">
<navLabel>
<text>第1章
..................
</text>
</navLabel>
<content src="index.html#calibre_toc_2"/>
</navPoint>
<navPoint id="7c6f789b-0497-45e1-9ca5-202b227986fc" playOrder="1">
<navLabel>
<text>第1章</text>
</navLabel>
<content src="index.html#calibre_toc_3"/>
</navPoint>
nosnoop is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
txt/epub - Guillemets conversion problem julo Conversion 16 11-15-2011 10:23 AM
TXT to EPUB, problem with spacing darkhatreader Conversion 4 06-12-2011 02:42 AM
LIT to EPUB TOC problem BlessedPsycho Conversion 6 02-04-2011 04:49 PM
ePub TOC to mobi TOC edmnddntes Conversion 5 01-24-2011 02:56 AM
Txt to Epub: how to create a toc nestol Calibre 0 08-09-2010 08:56 PM


All times are GMT -4. The time now is 04:48 AM.


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