|
|
#1 |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jun 2009
Location: Vancouver, Canada
Device: iphone, iPad and kindle3
|
ToC generation issue
Does anyone know if there a filter value entry or Chapter detection Xpath expression to insert the actual text value of each h1 tag's title attribute so that the correct value shows up in the generated ToC and thereby keep the output clean and not introduce new text chapter headings? |
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,133
Karma: 3391252
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, KoboGlo, KoboAuraHD
|
You could have your HTML look something like:
Code:
<h1 class="invisible">Chapter 1</h1> Code:
.invisible {display: none}
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jun 2009
Location: Vancouver, Canada
Device: iphone, iPad and kindle3
|
Thanks. I get the first part but I am not a programmer by vocation. Where do I find the CSS? Is that in Calibre somewhere?
The other problem is that this doesn't avoid the editing tedium in the HTML. If it works then great but I was hoping there was a way to grab the existing title value and stick it in the ToC. |
|
|
|
|
|
#4 | ||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,133
Karma: 3391252
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350/650/T1, PB360, KoboGlo, KoboAuraHD
|
Quote:
Alternatively, it may be in an external .css file (often in the same dir as the HTML file). If this is the case then there will be a link in the <head>...</head> section at the top of the HTML file looking something like Code:
<link rel=stylesheet type="text/css" media=all href=xyz.css> Quote:
Code:
<h1 title="Chapter 1"></h1> In the meantime, if this was my file, I would open it in a good text editor (e.g. Notepad++) and use mass Find/Replace to convert the old format to the new using simple regular expressions. But this is only an option if you're comfortable with regular expressions. I would then re-import the new HTML into Calibre and convert as usual. |
||
|
|
|
|
|
#5 | |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jun 2009
Location: Vancouver, Canada
Device: iphone, iPad and kindle3
|
Quote:
You've been very helpful. Thanks again. |
|
|
|
|
|
|
#6 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,954
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
Watch out for wordpad. Notepad++ is a great replacement for (Windows) Notepad (and it is free)
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
|
#7 |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jun 2009
Location: Vancouver, Canada
Device: iphone, iPad and kindle3
|
That solved the problem nicely "theducks". Thank you. Imported into Sigil and output the epub with ToC like a dream. Now I have another ebook editing program to play with... uh oh.
|
|
|
|
![]() |
| Tags |
| calibre, convert, html, toc |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| iPod Which generation? | lene1949 | Apple Devices | 5 | 10-19-2011 08:02 PM |
| How to force TOC generation out of scanned PDF | magphil | Calibre | 5 | 10-01-2009 04:53 PM |
| Creator Issue with Cover and TOC? | S3NTYN3L | Mobi | 20 | 07-26-2009 11:50 AM |
| Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 01:25 PM |
| My Digital Generation | pda247 | Writers' Corner | 2 | 03-03-2009 12:25 AM |