I’ve searched for this and experimented with it, but if what I’m about to describe is currently possible, I haven’t been able to figure it out.
Say I have a novel with thirty chapters in it, and I want each chapter heading to include a different image (e.g., a graphic of a chapter number/title rather than the text itself, or an icon that corresponds to the POV character featured in that chapter–as is done in Robert Jordan’s Wheel of Time series.)
It’d therefore be handy if the image placeholder tag could be compound-able, like so:
<$img:<$n>>
Such that if it were included in Title Prefix or Suffix, then for chapter one Scrivener would compile into the heading an image named “1”, for chapter two the tag would compile into the heading an image named “2”, etc.
Maybe a better way to do this would be with a user-named numbering stream, though, or a custom meta-data field (for that POV character example). Anyway, what do you think?
Auto-numbering won’t work for this because <$img…> tags get replaced before the auto-numbering tags (there is always going to have to be an order to the replacements that will make some combinations impossible).
However, it is already possible to do this using custom meta-data:
Set up a custom meta-data field named e.g. “Image”.
For each document or folder that needs an image in its title, add the name of that image to the custom meta-data field.
In the title or title prefix in Compile, enter:
<$img:<$custom:Image>>
This works because document-specific replacements are performed before image replacements.
(To highlight the problem of order: if auto-numbering could be used in <$img:> tags, then custom meta-data couldn’t be, because that would require waiting until the entire document had been put together, then going through and auto-numbering, then replacing image tags. But to embed custom meta-data in image tags requires those to be replaced document-by-document, before the entire document has been compiled…)
Again, this is because of the order in which the replacements occur during Compile. This is pretty much the same as the example I gave you above, except that you are typing the <$img:…> part in the custom tag instead of in the text/prefix.