08-11-2009, 11:27 PM | #1 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Why two separate page break xpaths in 0.6.x?
This is with regard to bug #2718, which was about page breaks being inserted.
I understand now why the bug is invalid, I wasn't aware that an additional xpath had been intentionally added to insert more page breaks in final release. I'm just wondering why? It seems like a fair number of books could have a chapter headings that look like the following: Code:
<h1>CHAPTER X</h1> <h2>chapter title</h2> <p>beginning of chapter text</p> I can see the benefit of having an additional xpath available to detect page breaks in some other fashion, but I'm not sure that it makes sense to have both the chapter detection xpath AND this one enabled by default.... Last edited by ldolse; 08-11-2009 at 11:43 PM. |
08-12-2009, 12:09 AM | #2 |
creator of calibre
Posts: 44,334
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The reasoning is that what's really important for chapters is inserting page breaks before them. Since the chapter detection expression requires the word chapter/part etc it wont match a lot of cases the page break expression will.
And having a few extra page breaks is not too bad. What could be done is make the page break insertion a little more intelligent so that it does not insert page breaks for elements "close" together if the expression is the default one |
Advert | |
|
08-12-2009, 02:27 AM | #3 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Agree that inserting page breaks before chapters is important, the chapter detection xpath is the one accomplishing this if I understand correctly.
Adding a bit of smarts to when the second xpath triggers works for me, will just disable it for now when it causes trouble. |
08-12-2009, 01:00 PM | #4 |
creator of calibre
Posts: 44,334
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Opena ticket for it and I'll get around to it
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mobi to epub page break | mr.ninja13 | Calibre | 23 | 08-09-2011 02:06 PM |
iPad Page Break Doesn't support iPad? | bala07 | Apple Devices | 9 | 11-10-2010 07:21 AM |
Page break before h2 question | Amalthia | Calibre | 9 | 04-17-2009 06:33 PM |
Page break before <b> | flowoeB | Calibre | 14 | 04-12-2009 03:05 PM |
PRS-500 makelrf3 and Unexpected Page-Break | EatingPie | Sony Reader Dev Corner | 0 | 04-19-2007 01:28 AM |