The title of this doesn’t really convey what I mean, and there’s quite a lengthy desciption of the behaviour, so I apologise for a long post, but essentially, I would like to be able to cross-reference numbered items that are forward in the text without causing the sequential numbering to go haywire.
I’m writing a linguistics masters thesis, and in linguistics we use lots and lots of example sentences to illustrate the phenomena we are describing, but this feature request would equally suit anyone who works with more than a few tables, figures or any sort of numbered item.
To number items sequentially, the tag used is <$n>; each time Scrivener comes to a <$n> tag, it will replace it with a number, in sequential order, from the start of the project to the end. It is also possible to have multiple independent numbering systems by specifying the type, in using the tag <$n:[type]>, i.e., <$n:table>, <$n:figure>, <$n:eg>. If this case, Scrivener will maintain three independent sequential orderings for the three types of numbered items, tables, figures and egs.
Cross referencing is also supported, so that you can link to a particular numbered item anywhere in the text. The way to do that is a third field in the tag, which should be a unique key in that list. So for example, <$n:table:x>, <$n:table:y>, <$n:table:z>. To link to them from somewhere else in the document, you just throw the whole tag into the text. So if x is the first table in a paper, it will get assigned number 1, and then later in the document, throwing the tag <$n:table:x> into the text will result in it being replaced with “1”.
Great system. However, Scrivener it seems, cannot distinguish between what is the numbered item, and what is a reference; it doesn’t know what is actually pointing to what. As far as it’s concerned, it will look down through the document finding each sequential number tag of the same label, and replace it with the sequential number. This mean that if you cross-reference numbered items that haven’t actually occurred yet, then you could get some unexpected behaviour. Take this paragraph, for instance:
Obviously the intention here is to number the example sentences sequentially all the way through, from 1 to 5, and the cross references should refer to them. So the idea is that the middle sentence there should render as
However, what actually happens is that, after numbering the first and second, and cross referencing to them in the text, the next unique codes that Scrivener gets to are the third then the fifth; the fourth comes later. So it will actually all come out looking like this:
So, my feature request would be something to ensure that the actual numbered items are interpreted as such, and the cross references as cross references, rather than treating them as all identical entities and numbering them all sequentially, as it can have this behaviour. My workaround for the time being will be to insert something into the forward-looking cross-reference, and to go through in Word post-compile and manually insert the correct number. But for a document in which someone might be numbering thousands of items and referencing back and forth quite a lot, this would be a messy scenario.
PS. If anyone happens to arrive at this post trying to figure out how to do numbering, there is a bug that you should be aware of. If you are going to cross-reference to numbered items, then you have to have unique keys in all of your tags, otherwise Scrivener will, oddly, start an independent numbering sequence for, say, <$n:table> codes that don’t have a unique key. So give them all keys even if you don’t intend to cross-reference that item in particular.
Again, apologies for the lengthy post.