View Single Post
Old 02-12-2015, 04:00 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,752
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
Use some fancy Regex (not shown) on the source lines in the book to add a:
title="\3: \2 " inside the H1 tag

fwiw
\3 is the author captured
\2 is the title captered

title= "" overrides the normal H# text choice for the TOC generator
Quote:
Originally Posted by Skeeve View Post
Thanks for your replies.

So it seems what I wanted to do isn't possible.

Sigil I can't use (at the moment) as my OS X is too old and it won't work here.

Regex to set the title attribute could be an idea - maybe I'll take that approach. Thanks for that hint!

Update: Tried it by manually setting the title attribute in one of the stories: No success. The title attribute wasn't taken by Calibre 1.48's automatic ToC creation. Maybe my Calibre is too old (same issue as with sigil: My OS X is too old)
Quote:
Originally Posted by theducks View Post
@Skeeve
Seems to work in Sigil but not in Calibre TOC generator (2.19 W7x64)

the title =solution does work if you get it correct

title = must be part of the H tag
I'm wondering if the Function Mode for Search & Replace in the Editor feature could be used to inject metadata element values into the Headers. If not then maybe the editor could be enhanced to make them available.

BR
BetterRed is offline   Reply With Quote