Using forward-references using the new automatic numbering

Scrivener 1.10 allows the usage of two new automatic numbering features which let you have multiple numbering streams for each number type, and the ability to cross-reference those numbers from other locations. This is all explained (briefly) in the FAQ, and extensively in the documentation.

One problem that I ran across while composing the FAQ for 1.10 is that if a cross-reference appears before the actual item being referenced, the number gets assigned too early, creating a numbering fault in the table of contents (or whatever). The way the system works is, the first time it comes across a new identifier for a stream, the number gets incremented and generated, and all repeated instances of that identical stream.identifier get the same number. This works perfectly if you always cross-reference after the item is generated.

So a way to get around this (which is admittedly a little clumsy) is to create near the top of the document, a pre-composed list of all numbers in the stream that will involve forward-referencing. By example, if I have a list of figures that I want to have absolute freedom in referencing from anywhere in the book, I could create a list like this: Figures: <$n:fig:fig_alchemy> <$n:fig:fig_usageOfFerrousMaterial> <$n:fig:fig_alembic> ... When exported from Scrivener, this will look like: Figures: 1 2 3 ... This will pre-generate the numbers in the correct order that they should appear, and from that point on, all instances of these stream.identifiers will use those numbers.

Where it gets clumsy is when the book gets shuffled around and figure numbers inevitably change. Thus, it is probably best to wait until the end of the process to create these lists.

If anyone can think of a better way to do this, I’d love to hear it. Any automated script to generate these lists that I can think of suffers from the same exact problem Scrivener does: Without a syntactic difference between reference and item, there is no way to determine the author’s intent.