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-21-2009, 09:53 PM   #1
Phonella
Enthusiast
Phonella began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2008
Location: Winnipeg, Canada
Device: Sony PRS700
Problem Converting Book Designer HTML to LRF

At Kovid's suggestion I have just uninstalled/reinstalled Calibre (auto-update wasn't working as discussed in another thread).

And now I have a new problem with the newest version of Calibre:

I am an avid fan of Book Designer especially for its ability to strip out all sorts of junk from Word-generated htmls, etc. I have always run an html through BD before converting from BD html to Lrf in Calibre. And the output has always been perfect. Now with this new version of Calibre there are problems:

BD shows the book title and author in H2 tags:

<H2 id=BookTitle align=center><B>blah</B></H2>
<H2 id=BookAuthor align=center><B>blah blah</B></H2>

and in prior lrf's they always appeared on the same page (as they should) but now the title is on one page and the author on another -- not good. So I tried changing the H2 tags to H3 tags to avoid this problem and suddenly Calibre no longer recognized any <HR>'s as page breaks and just printed them out as horizontal rules with no new pages for anything.

And furthermore some books are divided into "Parts", i.e. Part One, Two, etc. and BD shows this as:

<SPAN id=title><DIV align=center><B>Part One</B></DIV>

and precedes the line with an <HR>. The "new" Calibre somehow sees the <HR> as a page break and ALSO seems triggered by the word "Part" and inserts another page break thus resulting in a completely blank page preceding anything marked as "Part".

Can you help me adjust for these anomalies? I don't want all this empty-page stuff in my lrf's. I know BD is an old program but it certainly fits my needs and Calibre used to deal with it fine before just not so much now.
Phonella is offline   Reply With Quote
Old 10-21-2009, 10:12 PM   #2
Phonella
Enthusiast
Phonella began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2008
Location: Winnipeg, Canada
Device: Sony PRS700
Okay, I've solved part of the problem:

I've set "Detect Chapters at (Xpath Expression)" to:

//h:hr

and now I get page breaks at every one of the <HR>'s inserted by Book Designer. But I've tried a gazillion ways to get the Book Title/Author on the same page and have failed miserably!

Still looking for help.
Phonella is offline   Reply With Quote
Old 10-21-2009, 10:15 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,646
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The problem is that Calibre detects <h2>,/h2> as a chapter. So why not do it like this....

<h2>Name of Book
Author Name</h2>
JSWolf is online now   Reply With Quote
Old 10-21-2009, 10:38 PM   #4
Phonella
Enthusiast
Phonella began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2008
Location: Winnipeg, Canada
Device: Sony PRS700
Thanks JSWolf. But when I investigated the Calibre-generated html in the zip folder I found that there was no pagebreak shown between the Title and Author. Hmm. And then I found this section in Calibre under Preferences/Conversion/Page Structure:

Insert page breaks before (Xpath Expression):
//*[name()='h1' or name()='h2']

I thought this section was part of the one above that deals with preprocessing and since I didn't have that checked I thought it wasn't applied by Calibre. Seems I was wrong.

As soon as I removed that jazz above (just completely cut it out) the book titles and authors now appear on the same page.

It's all there, one just has to track it down

So problem solved!
Phonella is offline   Reply With Quote
Old 10-21-2009, 10:45 PM   #5
AnemicOak
Bookaholic
AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.
 
AnemicOak's Avatar
 
Posts: 14,391
Karma: 54969924
Join Date: Oct 2007
Location: Minnesota
Device: iPad Mini 4, AuraHD, iPhone XR +
Quote:
Originally Posted by Phonella View Post
And then I found this section in Calibre under Preferences/Conversion/Page Structure:

Insert page breaks before (Xpath Expression):
//*[name()='h1' or name()='h2']

I thought this section was part of the one above that deals with preprocessing and since I didn't have that checked I thought it wasn't applied by Calibre. Seems I was wrong.

As soon as I removed that jazz above (just completely cut it out) the book titles and authors now appear on the same page.

It's all there, one just has to track it down

So problem solved!
Good catch. It was doing the same thing for me when making ePubs and then I'd have to manually fix it. Just tried your solution and it worked great.
AnemicOak is offline   Reply With Quote
Old 10-22-2009, 09:20 AM   #6
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Why not generating the LRF inside BD?
Pablo is offline   Reply With Quote
Old 10-22-2009, 01:21 PM   #7
Phonella
Enthusiast
Phonella began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2008
Location: Winnipeg, Canada
Device: Sony PRS700
Quote:
Originally Posted by Pablo View Post
Why not generating the LRF inside BD?
Because I find Calibre to do a better job on preparing an LRF and as well (and at the same time) it manages my library for me.
Phonella 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
align="right" problem converting html to lrf flowoeB Calibre 0 10-06-2009 07:30 AM
Problem converting HTML files to LRF red_five Calibre 2 06-09-2009 03:03 AM
Problem converting a webpage html to LRF, what program should I use? Long page turns seajewel Workshop 1 08-01-2008 06:32 AM
Book Designer problem with making html, txt, doc formats Namtar Workshop 5 04-22-2008 10:56 AM
Fixing Book Designer problem with italics when converting from LIT angelyne Sony Reader 3 07-09-2007 11:32 AM


All times are GMT -4. The time now is 12:02 PM.


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