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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2009, 11:27 PM   #1
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
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>
Which all displays on a single page at the beginning of the chapter. This additional xpath will now cause <h1>Chapter X</h1> to appear on a page all by itself.

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.
ldolse is offline   Reply With Quote
Old 08-12-2009, 12:09 AM   #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: 43,835
Karma: 22666666
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
kovidgoyal is offline   Reply With Quote
Advert
Old 08-12-2009, 02:27 AM   #3
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
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.
ldolse is offline   Reply With Quote
Old 08-12-2009, 01:00 PM   #4
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: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Opena ticket for it and I'll get around to it
kovidgoyal 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
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


All times are GMT -4. The time now is 07:14 AM.


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