Outline numbering in Section Layouts?

Hello everyone,
I love Scrivener and am currently attempting to design a compile format to match an American “Law Review” article. These articles have a standard format with a hierarchy of defined section types. I’ve defined section types in my Project Settings and am now attempting to define Section Layouts to match each type.

The difficulty I’ve encountered is that I’m not sure how to get Scrivener to restart outline sequences (other than 1, 2, 3 which can be created as <$sn>) in front of section titles.

When compiled, the desired structure is to have headings in the document follow the pattern below. I’ve marked with carets the part I don’t know how to create:

I. First Part
A. First Section of First Part

  1. First Subsection of that Section
    B. Second Section of First Part

II. Second Part

A. First Section of Second Part <<<

  1. First Subsection of that section

In other words, I don’t know how to restart the section lettering. Logically, in the same way that <$sn> restarts a series of Arabic numerals, I would hope that <$sR> would use the same logic to restart a series of uppercase letters. But it doesn’t seem to work.

Am I right to imagine that this function simply doesn’t exist at present? If so, I’d be very glad to see it introduced!

There’s a “restart” placeholder tag, and also several outline and hierarchical numbering tags. For the complete list, look at the List of Placeholder Tags on the Help menu.


Firstly, open up the Help ▸ List of All Placeholders… cheat sheet and search for the <$aon> macro counter. The numbering scheme you are referring to is common enough that we have a counter that does the whole thing for you, based on hierarchy. Like it’s counterpart, the <$hn> macro, you only need that one placeholder on every level—potentially doing away with the complexity of having hierarchical Section Types, entirely (though you may still need that for heading font level changes and such).

That’s a simple solution, but if you need more, Scrivener has a rather flexible reset feature in fact. The <$sn> shortcut is just there for extremely simple cases using a common method of numbering. It won’t get you very far, and isn’t terribly flexible.

For flexible resets, search the help sheet for “<$rst>”. At it’s most basic level, this counter will reset any numbering stream it directly precedes, like <$rst><$L>. That works better in cases where you are using these codes yourself in the editor, because it also prints the <$L> right then and there. For designing Section Layouts, you basically need to reset the counter remotely, because the outline item that triggers a reset should not have the number it is resetting anywhere within it (that is for its child item to print). So the <$rst_L> code in this case will reset the uppercase alphabetical counter, making the next usage of it (whether one of twenty pages away) be “A”.

If you scroll down a little bit in that help file you’ll come across another capability that has an inherent reset, and that is using named streams. <$L:chapter_one> is going to start with “A”, and every subsequent usage of that token will count up as you’d expect. <$L:chapter_two> starts a new stream, which starts as “A” as well. Obviously that is a side-effect, where name streams are typically most useful are in cases like, <$n:table>, <$n:figure>, <$n:chapter> and so forth. Each of those will only increment as used for that type of thing, throughout the entire work.

I’d go through the help file from that point down, until you get to the next section. All of that may be potentially useful to you, at least in broadening your palette of choices. There are several ways to do what you want, and no one right answer. You’ll come across a section on compound placeholders, which will be a vital ingredient to setting up named streams automatically, in a Section Layout context. The “Document Variables” section of this cheat sheet contains the ingredients you’ll need to put together effective automatic naming.

In general I’d start simple, see if <$aon> works for you, and if not, graduate to reset codes, and on up to fully named instances as you require.