![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Oct 2008
Device: prs-505
|
Table of content troubles with HTML2LRF
I just can not fugure out how to do this so please help me :-)
In the HTML book I am marking up I am using chapterheadings and subheadings. A chapter would thus look something like this in the HTML : <h2>CHAPTER I</h2> <h3>name of chapter</h3> Now I want to have a nice table of content in my LRF book, but I want the entries to look slightly differently! I want this to show up as "CHAPTER 1: name of chapter" in the TOC.This is what I have tried, trying to use "hidden" headings so they would not show up in the book itself but (and I was naive enough to think that it would still show up in the TOC :-( ) <h2 class='lrfchapter' style='visibility: hidden'>CHAPTER I: name of chapter</h2> <h2>CHAPTER I</h2> <h3>name of chapter</h3> --no-links-in-toc --add-chapters-to-toc --chapter-attr="h2,class,lrfchapter" This doesnt work because the entries show up with "unknown" due to the visibility: hidden style. Does anyone have any suggestions on how I can do this? Is it possible? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,279
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can use lrf2lrs+lrs2lrf and edit the entries manually. Or you can use html2epub and style="height:0pt" for the elements you want hidden.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Oct 2008
Device: prs-505
|
Quote:
But I found a way that worked well enough, not exactly what i wanted, but good enough. In case someone else has a similar issue : SOLUTION: It is possible to have multiple lines for a chapter heading/subheading in the book but still have it collapsed to a single line in the table of contents : ('lrfchapter' is just a dummy class that does not exist) <div class='lrfchapter'> Can be used togehter with <h2>CHAPTER X</h2> <h3>On the road again</h3> </div> --no-links-in-toc --add-chapters-to-toc --chapter-regex="lrfchapter" --chapter-attr="div,class,lrfchapter" This will show up in the table of content as : CHAPTER X On the road again
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
No table of content in pdb ereader | Jonimeesermann | Calibre | 0 | 05-21-2010 05:10 PM |
text file and table of content | skao | Calibre | 1 | 04-09-2010 12:15 PM |
kindle DX table of content inactive | Maupassant | Amazon Kindle | 1 | 02-06-2010 10:44 AM |
Placement of Table of Content AFTER Dedication? | micfranxon | Kindle Formats | 1 | 01-19-2010 04:37 AM |
Table Of Content | tomcool420 | Sony Reader Dev Corner | 3 | 03-16-2008 12:14 PM |