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 08-08-2014, 02:20 PM   #1
hymie
Enthusiast
hymie began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Oct 2011
Device: iPhone
Can't stop the page breaks

Greetings.

So I have an HTML file which, I suspect, was generated from a Texi (GNU TexInfo) file. I don't have the Texi file, just the HTML file.

This HTML file has some unfortunate features. First, all of the h2 tags have the "chapter" class attached to them. Next, all of the chapter / subchapter headings look like this:

Code:
<div class="node">
<a name="Introduction"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Document-Structure">Document Structure</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">1 Introduction</h2>
You can see a sample here
http://orgmode.org/manual/Document-Structure.html
Note that the "a" anchor is above the <hr>

So I'm trying to use the command-line ebook-convert program to convert this file to an epub. But try as I might, I cannot prevent the h2/chapter tag from creating a page-break in my epub. I've tried

Code:
--chapter=/
--chapter-mark=none
--dont-split-on-page-breaks
--sr1-search='<h2 class="chapter">' --sr1-replace='<h2>'
--chapter=//h:div\[@class=\"node\"\]
but nothing seems to prevent the page breaks from appearing.

I'm running out of ideas. My last option is to edit the file and try to adjust it, but I'm hoping to automate the process.

Is there something I'm missing?
hymie is offline   Reply With Quote
Old 08-08-2014, 11:01 PM   #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: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
--page-breaks-before=/
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with page breaks? Greg7976 Sigil 4 05-27-2013 07:52 AM
Page Breaks etc genfind General Discussions 6 02-24-2012 02:20 PM
epub to mobi h1 page breaks not starting on new page wannabee Conversion 4 08-02-2011 12:46 AM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 01:23 PM
Page breaks enarchay Calibre 18 05-31-2009 06:57 PM


All times are GMT -4. The time now is 05:39 PM.


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