Quote:
Originally Posted by Turtle91
I would like a "just down" or "just up" option if it's possible.
As an example:
Sometimes the books I edit have different "parts", Part 1, Part 2, etc.
Each Part's chapters restart numbering from chapter 1 instead of being continuous through the whole book.
So when I use a search replace to create an id for the chapter head I begin at the new Part and replace all following chapters with the part number and chapter...then do that again with the next part. so I get id="Ch_1-1", id="Ch_1-2"..., id="Ch_2-1", id="Ch_2-2"...etc. Some of these books have > 100 chapters.
If it circles back and replaces the parts that I've done already then it wastes the effort.
Having said that:
There is probably some more elaborate regex I could create to check for the existence of the "-" in an id, I just haven't figured it out.
Ideally, there would be some process where I could use a counter when replacing, so I could just use id="Ch_1" to id="Ch_100"...does anyone know if there is such a "counter"??
And if there is a counter...can I shoot for the moon and get a function that will insert roman numerals??!!?? (id="Ch_69" title="LXIX")
|
I'm not familiar with the Sigil version of RegEx.
My editor (epp) has a counter which will number a list sequentially.
<h2 id="Ch_%MATCH%">
Perhaps there is something similar in Sigil.