11-25-2010, 01:59 AM | #1 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
yet another heading question
I want to turn this
<p class="calibre10"><span class="calibre8 bold calibre11 calibre8">2</span></p> Into this: <H2>Chapter 2</H2> But there are 100 chapters and I'd rather not do it one by one, is there a way to do that? I've tried the \d+ thing from earlier, but maybe I'm not using it right....any help would be great! Thanks! |
11-25-2010, 06:40 AM | #2 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
If all of the chapters contain exactly the same
Code:
<p class="calibre10"><span class="calibre8 bold calibre11 calibre8"> Code:
</span></p> Code:
<p class="calibre10"><span class="calibre8 bold calibre11 calibre8">(\d+)</span></p> Code:
<h2>Chapter \1</h2> |
Advert | |
|
11-25-2010, 06:45 AM | #3 |
Wizard
Posts: 2,157
Karma: 7068605
Join Date: Dec 2007
Device: Amazon Kindle Paperwhite, B&N Nook Colro
|
use the parentheses as well is that right?
|
11-25-2010, 07:58 AM | #4 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Yes, the parenthesis, means to store that as a group, which can be inserted in the replace, hence the \1 in the replace (meaning the first saved group, and in this case our only saved group)
Edit: we're storing the chapter number to be used in the replace |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Keyboard shortcuts for heading styles? | Tryphan | Sigil | 4 | 09-26-2011 06:54 AM |
Recomendation about Heading in Sigil | sergiodongala | Sigil | 6 | 07-06-2011 08:12 PM |
Kindle Heading to Best Buy | kindle79 | Amazon Kindle | 2 | 09-09-2010 04:22 PM |
How to avoid page break after heading/chapter | tkirke | ePub | 6 | 01-22-2010 02:12 PM |
Controlling chapter heading sizes? | Djehuty | Calibre | 3 | 04-27-2009 08:02 PM |