View Single Post
Old 05-24-2012, 03:10 PM   #27
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by kiwidude View Post
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</p>

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.
Actually, I think leaving the class tag is right. You've just told it to change the p tag to a heading tag, not to get rid of the class tags - which in some cases you might want. So what you want to do is erase the basic formatting/classes before applying the header tag - which isn't available yet but will be in the next version.

But if you've got classes or styles and are trying to control the layout that much, then certainly Code View and Find & Replace is the best approach. Trying to get Book View to format it exactly the way you want when you are fully aware of Code View, HTML and CSS will probably just drive you crazy
meme is offline   Reply With Quote