View Single Post
Old 11-30-2017, 10:28 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,362
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
^^^ What they said.

Here's an example:

Code:
search: <body>\s*<p>Chapter (.*?)</p>
replace: <body>\n<h1>Chapter \1</h1>\n
...although I wouldn't use <h1> for a chapter title. I'd use <h2> or even <h3>. Sigil will automagically indent your TOC based on the level of the header tag you use. For example:

Code:
<h1>Title Page</h1>
<h2>maps</h2>
<h2>epigraph</h2>
<h2>Part 1</h2>
<h3>Chapter 1</h3>
<h3>Chapter 2</h3>
<h3>Chapter 3</h3>
<h2>Part 2</h2>
<h3>Chapter 4</h3>
<h3>Chapter 5</h3>
<h3>Chapter 6</h3>
Would look like this (subject to your css styling if you also make an inline TOC)
Code:
Title Page
     maps
     epigraph
     Part 1
          Chapter 1
          Chapter 2
          Chapter 3
     Part 2
          Chapter 4
          Chapter 5
          Chapter 6

Last edited by Turtle91; 11-30-2017 at 10:30 AM.
Turtle91 is offline   Reply With Quote