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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-28-2011, 08:26 PM   #1
larlarcook
Member
larlarcook began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2010
Location: Utah
Device: ipad; kindle
Split file when converting files in Calibre

I have an ePub file that I added to Calibre and then converted it to ePub in order to automatically have the date put in the file. Calibre splits chapter 13 into two files: Section2chps-3_split_000.xhtml (which is actually just the title) and Section2chps-3_split_001.xhtml (which is the remainder of the chapter). I’m not sure why it does this. When I open the file up in Adobe Digital Editions before I convert it, the file looks fine and the chapter No. and Chapter title appear on the same page, which is what I want. When I put the converted file through ePub check the following error occurs:


ERROR: /Calbre Library of books/Wade B. Cook/Home Based Income (118)/Home Based Income - Wade B. Cook.epub/OEBPS/Section2chps-3_split_000.xhtml(9): element “a” from namespace “http://www.w3.org/1999/xhtml” not allowed in this context


The following is the the actual file and line (9) is the one that starts with: <a id=”anchor-14-anchor”. How do I fix this problem and how can I prevent this from spliting?


<?xml version=’1.0’ encoding=’utf-8’?>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Section2chps-3.xhtml</title>
<meta content=”http://www.w3.org/1999/xhtml; charset=utf-8” http-equiv=”Content-Type”/><link href=”../stylesheet.css” type=”text/css” rel=”stylesheet”/><style type=”text/css”>
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }</style></head>
<body class=”calibre”>
<div style=”height:0pt” id=”anchor-13-anchor”></div><div style=”height:0pt” id=”section2chps”></div><h1 class=”chp-head” xml:lang=”en-us” id=”toc-anchor”>Chapter 13</h1>
<a id=”anchor-14-anchor” class=”calibre3”></a><div class=”calibre4” id=”calibre_pb_1”></div></body>
</html>
larlarcook is offline   Reply With Quote
Old 01-28-2011, 11:34 PM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Someone else will need to comment on why that's causing Calibre to cause the epub to fail the flightcrew check, but you can prevent Calibre from splitting the file by enabling 'do not split on page breaks' under epub output.

Also delete the xpath for 'insert page breaks before' under structure detection, and if you already have a TOC you're happy with then you can also delete the chapter detection xpath - If you want Calibre to re-build a TOC but not split the file set the Chapter detection to not insert a page break.

All that advice is predicated on you having a backup of the original epub, if you don't you'll need to use Sigil to re-merge the file. Sigil will rebuild the TOC based on the file's <h1> tags, so you can safely remove the <a> tag Calibre inserted, just delete this part:
Code:
<a id=”anchor-14-anchor” class=”calibre3”></a>
ldolse is offline   Reply With Quote
Advert
Old 01-29-2011, 12:26 AM   #3
larlarcook
Member
larlarcook began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2010
Location: Utah
Device: ipad; kindle
I clicked the "do not split on page breaks" and it fixed the problem. Thanks for your input!
larlarcook is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem converting LDS MOBI file to ePub with Calibre 0.7.29 jbennion Calibre 6 10-21-2012 10:03 PM
[Old Thread] New to Calibre--problems converting files rxmom03 Calibre 4 07-04-2012 09:46 PM
Problem Converting pdf files to epub file clover_kid Calibre 2 10-28-2010 05:32 PM
Converting PDF files in Calibre BJWanlund Calibre 0 12-07-2008 10:28 PM
Converting a large file to lrf in calibre bnajari Calibre 6 05-22-2008 10:50 AM


All times are GMT -4. The time now is 11:55 AM.


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