View Single Post
Old 02-16-2014, 10:31 AM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Suggestion: Book level variables

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
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	405
Size:	179.4 KB
ID:	119151  
phossler is offline   Reply With Quote