![]() |
#1 |
Enthusiast
![]() Posts: 27
Karma: 32
Join Date: Aug 2009
Device: Kindle 2
|
![]()
OK, this is driving me bananas. I've spent the past two days off and on trying to clean up some RTF books into html and then convert them to LRF for viewing on my PRS-505. I've saved the RTF out to html using the microsoft word "filtered html" option and then run it through HTML tidy to clean things up. I've then created an XPath expression to detect my chapters, it looks like this:
Code:
//*[((@class = 'c1') and re:test(., 'chapter|book|section|part\s+', 'i')) or @class = 'chapter'] ![]() |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 27
Karma: 32
Join Date: Aug 2009
Device: Kindle 2
|
![]()
OK, shedding some more light on the subject... my chapter headings are inside <span></span> tags... when I manually remove them and put them in <p></p> tags, the TOC is created correctly... I really don't want to go in and manually reformat 7 books worth of chapter headings though...
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,276
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This is with what version of calibre?
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 27
Karma: 32
Join Date: Aug 2009
Device: Kindle 2
|
Hi kovidgoyal, thanks for responding! (You the man by the way...) This is with the latest version 0.6.5. I've attached a trimmed-down version of what I'm trying to get to work, perhaps it'll help.
|
![]() |
![]() |
![]() |
#5 | |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Enthusiast
![]() Posts: 27
Karma: 32
Join Date: Aug 2009
Device: Kindle 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,276
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's because the HTML to LRF conversion doesn't support anchors on inline elements like <span>
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 27
Karma: 32
Join Date: Aug 2009
Device: Kindle 2
|
So I need to get rid of all my <span> elements? That'll be fun... here I was hoping to keep the formatting of this book as close as possible to the original...
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC not showing in eBook created by InDesign | gabrieleale | Sony Reader | 0 | 07-30-2010 04:02 PM |
505 TOC from PDF to EPUB/LRF | wayamauro | Sony Reader | 18 | 09-27-2009 04:21 AM |
TOC not created converting from FB2 | regul8or | Calibre | 1 | 08-03-2009 12:26 PM |
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 01:25 PM |
TOC in LRF | sAGV | Sony Reader | 14 | 12-18-2007 10:50 AM |