![]() |
#1 |
Enthusiast
![]() 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: <a rel="next" accesskey="n" href="#Document-Structure">Document Structure</a>, Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>, Up: <a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">1 Introduction</h2> 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\"\] 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? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,349
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--page-breaks-before=/
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
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 |