View Single Post
Old 04-08-2012, 05:40 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,904
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JimLL View Post
Thanks.

Search & replace is the first thing I tried, but I never figured how to put an h1 setting operation into the replace line. (I use only h1.) If there's a way, I'm listening.


I can't use OOo to output HTML, because it makes a separate HTML for each chapter, and that throws more complication into Sigil than I can handle. If there's a way to stop that, I don't know it.

Yeah, I stumbled across the fact that TOC needs to be last.
You do it in code view (Where you will also see a class='blahblah' in some/all tags.

Search (the tag might look like): <p class="chapno">(Chapter \d+)</p>
The paren is the 'capture' area, the \d+ matches any amount of consecutive digits.

Replace (using REGEX) <h1 class="mychapterheadclass">\1</h1>

the \1 puts what was captured (includes the digits) in this place (between tags)
theducks is offline   Reply With Quote