Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-27-2009, 09:59 PM   #1
emellaich
Wizard
emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.
 
Posts: 1,101
Karma: 4388403
Join Date: Oct 2007
Device: Palm>Ebookman>IPaq>Axim>Cybook>Kndl2>IPAD>Kndl3SO>Voyager>Oasis
XPath Help and Pagebreak

Hello all,

I'm just looking for some clarification on XPath. I've been playing around and its not doing what I expected, so I thought I would ask a quick question here. In the Calibre help it gives the following:

//h2[re:test(., 'chapter|section', 'i')]
(Selects <h2> tags that contain the words chapter or section)

What exactly is meant by contains? Does 1) or 2) below contain 'chapter'?

1) <h2 attribute=chapter>Headline</h2>

2) <h2>Chapter</h2>

Also, what do I do to force a pagebreak before a chapter break. I am converting from epub (html) to mobi. I've checked the appropriate meta data box, but it doesn't seem to be working. Maybe its my XPath problem. Or is there some other trick?
emellaich is offline   Reply With Quote
Old 07-27-2009, 10:17 PM   #2
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
I insert page breaks by hand. Here is what I use:

<div style="page-break-before:always" />
Nate the great is offline   Reply With Quote
Advert
Old 07-27-2009, 10:58 PM   #3
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
2) and the calibre viewer doesn't support page breaks in MOBI, so check it with another viewer
kovidgoyal is offline   Reply With Quote
Old 07-28-2009, 02:17 PM   #4
emellaich
Wizard
emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.emellaich ought to be getting tired of karma fortunes by now.
 
Posts: 1,101
Karma: 4388403
Join Date: Oct 2007
Device: Palm>Ebookman>IPaq>Axim>Cybook>Kndl2>IPAD>Kndl3SO>Voyager>Oasis
Thanks for the info
emellaich is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with XPath NASCARaddicted ePub 13 02-20-2015 06:04 AM
0.6.3 pagebreak before h2 only every second time? flowoeB Calibre 4 07-31-2009 01:47 AM
Detect Mobi pocket pagebreak in calibre 0.4.99 Icarusbop Calibre 5 10-24-2008 03:12 AM
BD: Auto pagebreak preceding chapter? Xsavior Sony Reader 5 07-15-2007 04:21 PM


All times are GMT -4. The time now is 01:48 AM.


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