Making Figure and Chapter Numbers in Scrivener

This is a set of instructions I wrote for my students showing how to have Scrivener automatically number figures in a paper, and figures in each chapter of a book. … bering.pdf

Final output will look like

Figure 3 Caption For a paper without chapters.

Figure 3.2 Caption For a book with Figures that begin new in each chapter and include the chapter number.

In Scrivener these look like
For a Figure Alone
Figure <$n:figure:Karen’s_House> Caption

For a Figure in a Chapter
Figure <$n:Chapter:Asparagus>.<$n:figure:Asparagus_1> Caption

The chapter has 2 counters, one for chapters and one for Figure. The Figure count is reset as part of the chapter command:

Chapter <$n:Chapter:ChapterID> Chapter Title <$rst_Figure>

Entering the codes is simplified by creating templates.

All of this can be found in the Scrivener manual but I find it helpful to put it all together as a single set of instructions.

It may be that the manual contains a code that directly addresses the multiple Chapter and Figure numbers, e.g, something will more easily produce Figure 3.1. However I didn’t see it.

In my PDF instructions different parts of these commands are color coded but this didn’t survive the paste to this note. I recommend keeping the colors all the way through the Compile process since it makes the commands easy to locate. When finished with everything Select All in the Word Processor file and make the text black.

Thanks for the summary, and the tip about colouring the codes. I couldn’t find a Compile setting to set the coloured text back to black and white. Anyone know if this is possible? If not it may be something to consider for a feature request. (After Scrivener for Apple Watch of course :slight_smile: )

Thanks for putting your technique together in a nice format like this! Just so you know, I’ve moved this to the tips board, as it was in tech support.

By the way, if you want to write about Scrivener’s various placeholder tags, there is a way to “escape” these so you can print them as they should be typed in. Just insert a backslash before the opening ‘<’ symbol. For example, <$n:Chapter>. The backlash will be stripped out when you compile, leaving just the code as text for your readers.

Another feature you might appreciate is Replacements. I described a technique for building captions from a simplified code that you use while writing. We have a few examples of these in the Non-Fiction project template, for figure and table numbering. They are documented in the “about” file at the top of the binder.

The option is in the Transformations compile option pane, near the bottom: Remove text color.


Page 7 of your very helpful PDF showed that you have a number of interesting and possibly helpful templates already designed (e.g. Artwork, Clipping, Correspondence, etc.). Any chance you would create a blank project with those templates in it to share as a Scrivener template?

I’ve just starting to use this in my exegesis. Do I have the following correct?

By setting up a template for each type of figure or table format, that means creating a new document for every figure? And even though that’s in its own document, that division won’t carry through when you compile the document? I guess this could be a difference either with my OS (my Windows version of Scrivener doesn’t have the Default New Subdocument Type menu you show in the pdf.

Naming that Figure document correctly would help identify where the figure is, wouldn’t it? For example, a document with the folling codes …

…might be named i Wislnack[/i]. And the binder might look like…

History of Sequential Art . Ancient History . Religious Propaganda . (Figure) Wislnack . 18th Century . James Gilvray . (Figure) Gilvray . Joseph Franz von Goez . (etc)....

I notice that if I just drag the Template document to a point in the current document, it just inserts the text. That being the case, selecting the template via the menu would be good for creating a new figure because it will show up in the binder and be easy to find, but dragging it into a point in text would be good to refer to it.

Sorry if this sounds a bit hazy, but I don’t want to get into a mess and lose track of my figures.