View Single Post
Old 07-16-2014, 12:50 AM   #32
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Changing the header tags is easy. Just use a regex:

search:
Code:
(?=</?h)#(?=( [^>]+)?>)
replace:
Code:
#
And change "#" to 1-2|2-3|3-4 pairs to target each.

Make sure you check afterward to override the look with appropriate CSS. The default look for each is slightly different.

You could also hand edit the ToC. One of the reasons I would rather use calibre IMHO -- it has an editor, but you were trying conversion which is why it changed stuff. I like the calibre ToC editor better.

The problem with editing the ToC is that the book itself is not semantically structured -- you overrode the header semantics -- so auto tools like ToC generators will require more manual work if you ever redo the ToC. But if you just care about results, not code elegance, you could always do it the easy way.

Last edited by eschwartz; 07-16-2014 at 03:08 AM.
eschwartz is offline   Reply With Quote