View Single Post
Old 05-24-2012, 02:49 PM   #26
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by JSWolf View Post
The easiest way to do chapters headings for a ToC is to be in book view. Highlight the title, select the second heading style from headings and when done.
If the chapter heading text has *no style* associated with it, the book view trick works.

However ever since 0.4.something, this feature is "broken" in my opinion if the text you are already highlight has a style. I am sure it *used* to be the case that applying a heading style using book view would result in whatever paragraph tags the text had being replaced with a plain <h3> type of tag. Now however it gets it wrong and just replaces the p with h3.

So if your text looks like this:
<p class="text">CHAPTER ONE</p>
You will end up with:
<h3 class="text">CHAPTER ONE</h3>

Which is *rarely* (i.e. never) what I want. So you end up having to do a regex afterwards, which you may as well have just done in the first place, much faster.

Last edited by kiwidude; 05-24-2012 at 03:45 PM. Reason: Fix the closing h3 tag for pedantics like JSWolf
kiwidude is offline   Reply With Quote