Potential automation capability would be to allow book level variables and some simple math to change them.
Keep them disguised as html comments until the resolved values are inserted with a special save, but leave the comments in the epub
I'd like to see them work at the book level, across all files
CSS allows intra-file numbering, but not between files.
Meta-data about the epub could also be exposed.
VERY simple picture attached to show 3 files (or what would be) with a ##chapnum and a ##endnotenum variable being defined on the fly and initialized
Code:
<!--##person = "Fred"-->
<!--##chapnum = 1-->
<!--##endnotenum = 1-->
<h1>Chapter Number <!--##chapnum--></h1>
<!--##chapnum=##chapnum + 1 -->
So as a simple ConOps, the first 3 comments define and initialize the variables, the fourth comment inserts the current value of the variable, and the fifth performs some simple math.
I envision the comments remaining, but only the 'inserts' actually having their values inserted after the placeholder comment
Some thoughts