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 10-24-2009, 03:22 PM   #1
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 601
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-505
Problem with --page-breaks-before

At the moment I am running Calibre 0.6.13 (I know there's a 0.6.19 out, but I can't run it as I don't have VC90 runtime installed and it refuses my attempts to install it, and in any case I can't find anything relevant in the changelog). I am having trouble with ebook-convert.exe's --page-breaks-before parameter - it just doesn't work for me. In older versions of Calibre (I guess some 0.6.7 or something like that), I used
Code:
ebook-convert.exe book.htm book.lrf --page-breaks-before=//h2
and it would indeed insert a pagebreak before every H2 tag. In 0.6.13 the parameter seems to be ignored and the only way to get a pagebreak is through --chapter-mark=pagebreak. The problem is, of course, that not all of my H2's are chapters, and vice versa.
pepak is offline   Reply With Quote
Old 10-24-2009, 03:39 PM   #2
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 601
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-505
Interesting: If I use a lot more complicated XPath instead:
Code:
--page-breaks-before="//*[re:test(name(), '^h2', 'i')]"
I get my page breaks where I want them. (For the inquiring minds: of course I use my h2 tags in lower-case; that 'i' is just something I add to all my regexps by default.)
pepak is offline   Reply With Quote
Old 10-24-2009, 04:04 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: 26,131
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
//h:h2
kovidgoyal is offline   Reply With Quote
Old 10-24-2009, 04:17 PM   #4
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 601
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-505
Why is that? The tutorial says that "//h2" should match any h2's wherever in the document tree they are. What does the "h:" prefix mean?
pepak is offline   Reply With Quote
Old 10-24-2009, 04:43 PM   #5
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: 26,131
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
h: stands for html

The tutorial is out of date (needs to be updated for 0.6)
kovidgoyal is offline   Reply With Quote
Old 10-24-2009, 04:50 PM   #6
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 601
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-505
OK. Thanks for clarification.
pepak 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
Page breaks in ebooks, Yes or No? nomesque General Discussions 30 06-12-2010 06:43 AM
Page breaks not working EnsignRicki Calibre 0 06-26-2009 11:47 AM
Page breaks enarchay Calibre 18 05-31-2009 06:57 PM
losing page breaks rholscher Calibre 8 04-16-2009 09:44 AM
Page breaks in Plucker? K12 Handhelds Reading and Management 2 02-19-2005 03:05 PM


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


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