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 03-27-2009, 05:44 PM   #1
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
Chapter detection for LRF

Hello,
I'm having trouble with Calibre chapter detection for LRF output. I was advised to use the tag detection option with the following regular expression syntax: .*,class,Heading.
; i.e., where the attribute = 'Heading'. The 'Heading' attribute works like a charm on mobi and epub output but the chapters steadfastly refuse to appear on the Calibre viewer for LRF.
I must have misunderstood something but none of my attempts to figure this out has worked so far and I'd appreciate someone's help, here, please.

henry
HenryP is offline   Reply With Quote
Old 03-31-2009, 06:27 AM   #2
gwynevans
Wizard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,343
Karma: 1065246
Join Date: Nov 2007
Location: UK
Device: Sony 505 (retired), iPad2, iPhone 3GS & Nexus 7 3G
Hmm - that would seem to match the documentation, at least. I'm not really familiar with it, but I'd be tempted to try to see if there was a way you could avoid the ".*" section and put in a specific tag?
gwynevans is offline   Reply With Quote
Old 03-31-2009, 03:48 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,154
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
post an extract from the source file showing one of these headings
kovidgoyal is offline   Reply With Quote
Old 03-31-2009, 06:30 PM   #4
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
thanks for the response, and apologies for the tardiness in replying but I missed seeing the message until just now:
here's the code for chapter headings:

<p class=Heading>Chapter 1 Mercury V8</p>

<p class=MsoBodyTextCxSpFirst>&nbsp;</p>

henry
HenryP is offline   Reply With Quote
Old 03-31-2009, 06:56 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,154
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use p,class,Heading and make sure you have Add chapters to TOC checked
kovidgoyal is offline   Reply With Quote
Old 03-31-2009, 07:45 PM   #6
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
Thanks Kovid,
I've tried this a few times but the output file I see through Calibre viewer is invariably the same; i.e., it looks like it should in all respects except that it differs from the .mobi and .epub versions in that there's no visible Table of Contents.
I recognise that since everyone else has Headings as H1 or H2, and so on, I must have screwed up in that department right from the word 'Go' by having 'Heading'. I'm not too hot in the html syntax department yet but shall keep working on it.

hp
HenryP is offline   Reply With Quote
Old 03-31-2009, 08:27 PM   #7
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,154
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah the calibre LRF viewer doesn't suport Table of Contents. It will be there on the reader You can check it if you want by running

lrf2lrs on the lrf file. In the output lrs file you will see a <TOC> tag
kovidgoyal is offline   Reply With Quote
Old 03-31-2009, 08:52 PM   #8
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
Thanks, Kovid. That's good news.

hp
HenryP is offline   Reply With Quote
Old 04-02-2009, 06:16 AM   #9
gwynevans
Wizard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,343
Karma: 1065246
Join Date: Nov 2007
Location: UK
Device: Sony 505 (retired), iPad2, iPhone 3GS & Nexus 7 3G
A better way to check if you can (i.e. you're running Windows) would be to use the Sony software, as that can show the contants.

Anyway, with the current upload, you've got a TOC with the chapters but the problems are that you've also got footnotes also appearing there first twice! The first set of "[1]" to "[51]" link to the footnotes at the end, while the second set link to their positions in the text. There's also a blank entry, which links to a blank page between Ch1 & Ch2. On the upside, the chapter links themselves are there & working, e.g. "Chapter 1 Mercury V8"
gwynevans is offline   Reply With Quote
Old 04-02-2009, 12:34 PM   #10
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,076
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
This post has appeared in the wrong thread- and I do not seem to be able to delete it!

Last edited by itimpi; 04-02-2009 at 12:37 PM.
itimpi is offline   Reply With Quote
Old 04-03-2009, 04:08 AM   #11
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
LRF Chapter detection

Quote:
Originally Posted by gwynevans View Post
A better way to check if you can (i.e. you're running Windows) would be to use the Sony software, as that can show the contants.

Anyway, with the current upload, you've got ... footnotes also appearing there ... twice! The first set of "[1]" to "[51]" link to the footnotes at the end, while the second set link to their positions in the text. There's also a blank entry, which links to a blank page between Ch1 & Ch2.
Thankyou, Gwyne, for your notice; I'm only able to see .mobi file output so your message if valuable.
I'll take your advice and download Sony ereader software to check the text out on my laptop. I hadn't realised that was an option.

A friend suggested I should not have uploaded all of volume one, that it's too much for the reader. She's right, I guess. But to hear what you've found inclines me to overwrite it with a single unreferences chapter and go back to the drawing board. An ebook with references running amok is not the ideal start for this story. Not to mention the fact that I've upset some folks with what I thought were uncontroversial statements.

henry
HenryP is offline   Reply With Quote
Old 04-03-2009, 04:55 AM   #12
gwynevans
Wizard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,343
Karma: 1065246
Join Date: Nov 2007
Location: UK
Device: Sony 505 (retired), iPad2, iPhone 3GS & Nexus 7 3G
> I hadn't realised that was an option.

The UI's a bit basic, but it does do a decent representation of what it looks like on the reader.

> too much for the reader. She's right, I guess.

Not sure I'm familiar with that concept! :-) Seriously, it's your call, but it's not that unusual. My perception might be skewed as I tend to read a lot of SF&F, which means that Baen, who have a lot of free books, are one of the major players in the area I'm focussed on. Most, actually thinking about it, all of my recent eBook purchases have been as a result of first reading the author's free books then buying others of their's...

> go back to the drawing board.

Maybe - it seems to me that it might just be a matter of tagging more specifically, as the technique works.

> Not to mention the fact that I've upset some folks with what I thought were uncontroversial statements.

Ah! It's probably like software development these days, where you can hardly write "print 'Hello World'" without someone being ready to claim a patent infringment...
gwynevans is offline   Reply With Quote
Old 04-03-2009, 08:22 AM   #13
HenryP
Enthusiast
HenryP began at the beginning.
 
HenryP's Avatar
 
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
It's Friday night, here, and I've been listening to Nashville session musicians on good quality equipment. Deeply satisfying.
I logged on before turning in and have just read your message. Just the ticket. I'm much obliged for your sober assessment.
henry
HenryP 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
Help with Chapter detection ubergeeksov Calibre 0 09-02-2010 04:56 AM
xpath for chapter detection romnempire Calibre 7 07-26-2010 05:34 PM
chapter detection in any book yuki86 Calibre 9 05-06-2009 06:54 AM
Cant find help for chapter detection fallwood Calibre 6 12-10-2008 01:20 PM
Calibre chapter detection AKninja04 Calibre 5 09-14-2008 12:09 PM


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


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