Non-incrementing Counter Access

For future consideration. There are some cases where being able to access the current counter number without incrementing the number, would be of use. In MMD, for instance, I could tie the current chapter number to an ID tag. If the syntax were <%n> instead of <$n> for instance:

## Chapter <$n>: Gasoline Additives [ch-<%n>]

Would export as:

<h2 id="ch-12">Chapter 12: Gasoline Additives</h2>

Sounds reasonable. :slight_smile:

1.1 (1.09 when it is out…) adds references, which works like this:

<$[autoNumberTag]:[referenceType]:[uniqueKeywordIdentifyingThisItem]>

So you could use them in this way, for instance:

<$n:chapterNo:GasAdditives>

As in:

[code]

Chapter <$n:chapterNo:GasAdditives>: Gasoline Additives [ch-<$n:chapterNo:GasAdditives>[/code]

Which would indeed become:

<h2 id="ch-12">Chapter 12: Gasoline Additives</h2>

Whilst it takes a little more effort (though how long you decide to make the identifiers is up to you - for instance, you could use <$n:ch:GsAdd> or some such), this also has the advantage that you could refer back to this chapter much later in the text. For instance, in Chapter 40, you could write:

...gas additives (see Chapter <$n:chapterNo:GasAdditives>).

All the best,
Keith

Fantastic, thanks Keith! This will be very useful. Am I right in assuming that <$n:footnote:tetralin> and <$n:chapter:gasadd> could both be using the number 12 in separate counter streams, or is the second ‘:’ ornamental in the provided example?

The Supernova of a Polymathic Collision

Amber - nope, you are entirely correct in your assumption The idea was that you could reference images and graphs etc separately, but you can use it however you like. I’m hoping to post beta 1.09 later tonight or tomorrow so you should be able to play with it soon and see how it works out for you…
Best,
Keith