Compile issue: Scene counter does not reset when used with two different numeral formats

Compile setup:
I have my compiler set to automatically put numbers in front of each scene within a chapter using the “Title-prefix” as follows:

I use the “Title-Suffix” of my Chapter headings to reset the counter for each chapter:

Now I want a different kind of numbers (roman numerals) in my epilogue, so i use the following layout for my epilogue scene:

When I compile I now get the following issue (bug?):

The scene counter is only reset on the beginning of my epilogue (wich uses the same chapter heading layout as all other chapters)
I.e. The scenes of chapter one are mubered 1 to 10, then chapter two starts with scene 11 although the chapter heading layout should reset the counter.

This only happens, when I include the epilogue chapter with the roman numerals in the compile output.

I do not think this is how it should work

Nevertheless a workaround exists:
I currently use a different counter in the epilogue like this (and reset is in a seperate header layput for the epoligue):

As a result, the scene numbering works perfect again. Chapter two startes with scene 1 and the epologue with scene “I”.

I would say that it actually “works as intended”.
I think that by changing the numeral format (IV vs 4, for e.g.) you kind of confuse the software as to the nature of the string to reset.
I wouldn’t be surprised if putting the reset rather at the end of your chapters would actually work.
Or have all your chapters start with:
<$n:scene> <$rst_scene> <$R:scene> <$rst_scene>
aside the fact that’d you’d end up with numbers displayed where you don’t want them…

Should you insert a chapter (just for a test) after your epilogue, I bet it is the romans that won’t reset this time.
I think that with your current setup, Scrivener uselessly resets the romans every time it comes across one of your resets.

Also, something seems odd as to the way you described using prefixes and suffixes to insert the number (then reset right after?) ?
If scenes and chapters have different section layouts, where is the need to use the title’s suffix in one case and the prefix in another? (Is it just a detail, set so for visual convenience?)

Anyways, what I mean is that it seems logical to me that it should work using two different strings, and fail having a single string use two sets of numerals.

I don’t think Scrivener compiles the placeholders from top to bottom as it goes.
Given all the functionalities they bring - I’m especially thinking of those where one placeholder references to another document -, it most certainly is a parallel pass.

Thanks for the response.
Yes, I think changing the numeral format for a single counter seems to confuse the compiler.
And you are right, useing different counters makes it easier to understand the compile layout.
So I will stay with my current setup wich does exactly what I want.

Nevertheless the bahavior seemed a bit odd to me, because I didn´t expect the reset of a counter would be dependant on the numeral format used. So I thounght I put it here to raise awareness.

And to be a bit more specific about my compile setup (and maybe clean up some confusions):

There is no special reason for useing the suffix. I Just plaied around a bit and this was my last setup before I wrote this report. Putting the reset in the prefix does not change the behavior in any way.

In my current (working) setup I have four layouts:

  1. Chapter header : Title (from folder name) and resets for “scene” counter
  2. Scene : Latin numeral “scene” counter followeded by the scene text
  3. Epilogue header : Title (from folder name) and reset for “epilogue” counter (I don’t thinks this reset is necessary since it is done only once, but it doesn’t hurt as well)
  4. Epilogue Scene : Roman numeral “epilogue” counter followed by epilogue scene text.

In my original setup I didn´t have an extra header layout for epilogue (3) but used the normal header layout (1) for this as well since I used the same counter in normal scenes and epilogue scenes (just with the different numeral format).

Why not reset them both in the same layout then ? :wink:

If I understood what you are doing right, you could reset both strings at every chapter’s start without any issue.
That’d spare you handling an extra section layout.
(Though you seem right saying you probably don’t even need that extra one, already as it is…)

Correct. This would be a bit of optimization I could do. Thanks :slight_smile:

1 Like

Consider the common situation where the front matter is paginated with Roman numerals and the body text with Arabic numerals.

<$n> and <$R> are two different counters, so <$n:scene> and <$R:scene> are different as well. This is consistent behavior.

Makes sense.
But you can’t use reset then. (?)
That was the whole of the issue.

Sure you can, you just have to be clear what is being reset.

Please, enlighten us.
. . . . . . . . . .

<$rst_n> or <$rst_R> should work fine.

You can stick ‘rst_’ on the front of any autonumbering placeholder to reset that counter.

Can you reset a specific string ?
<$rst_R_string> ? In the context where there’d be <$n_string> and <$R_string> in the same project. Like here.

The syntax is actually <$rst_counter:name>, but yes.

See the List of Placeholder tags, available from the Help menu, for details.

(Typing too fast, too much coffee.)

What actually matters is that the OP here could have actually made it work as it was to begin with. (?)
He/she was simply not telling the compiler which of the two similarly named strings (one using n, the other R) to reset. (?)
So it was always the roman numeral string that got reset… (?)

Should have used this, I guess :

[EDIT] Actually, no. As this would have inserted a numbering in an unwanted place…

Doesn’t seem to be any other way, in this case, than to use <$rst_R:scene> and <$rst_n:scene>
was missing the “n:” and the “R:”

(Which implies that most - if not all - of what I said up to this point joyfully qualifies as :poop: .)

I went back and reread

I have to say that although what @kewms just explained makes perfect sense, it doesn’t seem to be anywhere detailed in the placeholders documentation…

That simple part:

I can’t find anywhere.

More even, it says that what the OP did here should actually have worked:

Ugh. You’re right. You weren’t the only one who was typing too fast.

So <$rst_scene> should have reset both “scene” counters.

Just so that it doesn’t become too confusing, there was only one string.
<$n:name> <$R:name> <$R:name> <$n:name>
should render as 1 II III 4, right ?

[EDIT] Perhaps it doesn’t really matter, but would <$rst_R:samestringname> and <$rst_n:samestringname> work or not, here ?
I mean, if using both. (Since
doesn’t work for some reason.)


I admit I am a bit confused right now, but it is already 11:30 PM here, so I will try to understand the details again tomorrow.

This topic seems to be way more interesting, than I thought. :slight_smile:

@Vincent_Vincent At least the beginning of your experiment seems to be consistent with the behavior of my compile setting:
The “<$rst_string>” will only reset the roman numerals, but not the latin ones.

But the “<$rst_n:string>” and “<$rst_R:string>” seem to do nothing at all, right?

And they would have been invisible in the compile should they have been recognized as placeholders to begin with.

Oh, didn´t even notice that one.

Will go to bed now. But definitely experiment a bit more myself tomorrow.