03-27-2009, 06:44 PM | #1 |
Enthusiast
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 |
03-31-2009, 07:27 AM | #2 |
Wizzard
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
|
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?
|
Advert | |
|
03-31-2009, 04:48 PM | #3 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
post an extract from the source file showing one of these headings
|
03-31-2009, 07:30 PM | #4 |
Enthusiast
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> </p> henry |
03-31-2009, 07:56 PM | #5 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use p,class,Heading and make sure you have Add chapters to TOC checked
|
Advert | |
|
03-31-2009, 08:45 PM | #6 |
Enthusiast
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 |
03-31-2009, 09:27 PM | #7 |
creator of calibre
Posts: 44,566
Karma: 24495948
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 |
03-31-2009, 09:52 PM | #8 |
Enthusiast
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
|
Thanks, Kovid. That's good news.
hp |
04-02-2009, 07:16 AM | #9 |
Wizzard
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
|
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" |
04-02-2009, 01:34 PM | #10 |
Wizard
Posts: 4,553
Karma: 950151
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 01:37 PM. |
04-03-2009, 05:08 AM | #11 | |
Enthusiast
Posts: 43
Karma: 24
Join Date: Feb 2009
Location: Australia
Device: Sony 505
|
LRF Chapter detection
Quote:
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 |
|
04-03-2009, 05:55 AM | #12 |
Wizzard
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
|
> 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... |
04-03-2009, 09:22 AM | #13 |
Enthusiast
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 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Chapter detection | ubergeeksov | Calibre | 0 | 09-02-2010 05:56 AM |
xpath for chapter detection | romnempire | Calibre | 7 | 07-26-2010 06:34 PM |
chapter detection in any book | yuki86 | Calibre | 9 | 05-06-2009 07:54 AM |
Cant find help for chapter detection | fallwood | Calibre | 6 | 12-10-2008 02:20 PM |
Calibre chapter detection | AKninja04 | Calibre | 5 | 09-14-2008 01:09 PM |