Quote:
Originally Posted by stumped
It's all about tricking sigil to add incremental ids to new h3 tags
I did not invent that 2014 recipe, I just used it.
|
You keep on mentioning this mythical "2014 post" or instructions. Can you link us to the exact post, so we can see what the heck you are talking about?
And why keep using the 2014 method, when multiple people have explained alternate and much better/easier/faster—2023—methods.
Quote:
Originally Posted by stumped
I should also have added, that after creating all temporary h2 lines, I used calibre with structure detect to split the book into lots of html files, one per chapter.
Only then do I regenerate toc in sigil.
|
So your ultimate goal is to SPLIT the HTML files based on chapters/headings?
Then just use Sigil's:
- Edit > Split at Markers (F6)
You can use Search/Replace (or Regular Expressions) to insert this code:
Code:
<hr class="sigil_split_marker" />
wherever you want Sigil to split an HTML file for you:
Code:
<hr class="sigil_split_marker" /><h2>Chapter 1</h2>
<hr class="sigil_split_marker" /><h2>Chapter 2</h2>
<hr class="sigil_split_marker" /><h2>Chapter 3</h2>
Then you press that shortcut, and boom... Sigil splits the HTML files exactly where that <hr> code existed.
I think it's WAY easier than Calibre's Xpath stuff.
- - -
I explained step-by-step instructions for Sigil's "Split Markers" multiple times:
- - -
Quote:
Originally Posted by Turtle91
Quote:
Originally Posted by stumped
I see no other way to generate chapter numbers across 144 files. My example has 144 chapters, too many to number them manually
E.g. find <h2 toc_id(\d+) >placeholder
Replace <h2 > \1
|
Did you see my responses above??
I’m starting to think you have my posts blocked… lol
|
lol. I sense another ghostly turtle-shaped presence!