Compile Question

Hi all,

Okay. Here’s what I’ve got in my binder:

(Level 1) Folder
(Level 2) Document 1
(Level 2) Document 2
(Level 2) Document with Subdocuments 1
(Level 3) Subdocument 1
(Level 3) Subdocument 2
(Level 3) Subdocument 3
(Level 3) Subdocument 4

The Level 1 folder is the Chapter, the title of which will be formatted “Chapter <$n> – Title” followed by two carriage returns. The Level 2 documents are individually numbered Scenes, as are Subdocuments 1-4, all of which will be formatted simply “<$p>” centered, and followed by two carriage returns. So how do I make the Level 3 documents numbered as well, but have them continue the sequence of numbers from Documents 1 and Document 2? In other words, if Document 1’s <$p> number is “1”, and Doc 2’s is “2”, how do I make the subdocs of Doc-w-Subdocs 1 continue at “3”? Is there any way to do this?

Unless you specify that you want the numbering to restart, it will continue on as you’re desiring by default. <$p> is the page numbering tag, though; you’ll want to use <$n> or another auto-numbering tag instead. You can see the list under Help > Placeholder Tag List.

Sorry, when I said <$p> I meant <$position>. Was in a hurry, and my mind must’ve abbreviated. Unfortunately, though <$position> only numbers from the parent container object. Won’t work for my purposes. I’ve been all through the list of placeholder tags, and I can’t see anything that would possibly do the job. I hate to say this, but Scrivener’s Compile options are feeling more and more limited all the time. Makes me wish I hadn’t entrusted a large chunk of my latest novel to its workflow. Oh well; live and learn, I guess.

I think maybe I’m just unclear then what you’re trying to do. The entire point of the <$position> tag is to number based on the parent, so if you don’t want the parent as a reference, I’m not sure why you’re choosing this particular tag. There’s quite a lot that can be done with the existing compile options and ways one can structure the binder, so I wouldn’t leap immediately to thinking whatever you want simply isn’t doable, but without a clearer picture of what you’re after we won’t be able to offer very useful suggestions.

Okay. Here is what I have:

(Level 1) Folder “Chapter”
(Level 2) Document “Scene 1”
(Level 2) Document “Scene 2”
(Level 2) Document “Container for Scenes 3-5”
(Level 3) Subdocument “Scene 3”
(Level 3) Subdocument “Scene 4”
(Level 3) Subdocument “Scene 5”

WHat I want to do is set things up so that when the Compiler sees this, what I get for output if five uniformly formatted scenes, each numbered appropriately, and in ascending order, with no breaks in the numbering. (There’s a variety of very good reasons why things have ended up being structured this way; too much to go into deeply here, but suffice to say, this is how it needs to be in order to get the job done. )


Use a numbering stream for this, e.g:


The “scene” part is just an arbitrary keyword, which could equally be “foo”. All the above does is tell scrivener to keep incrementing this number every time it encounters this particular keyword. So, for instance:

Chapter <$n:chap>
Scene <$n:scene>
Scene <$n:scene>
Chapter <$n:chap>
Scene <$n:scene>
Scene <$n:scene>

When compiled, this would become:

Chapter 1
Scene 1
Scene 2
Chapter 2
Scene 3
Scene 4

Hope that helps.

All the best,

Thanks Keith,

That really did the trick. Suffice to say I’m not sorry I trusted in the Scrivener Way (there’s probably an eastern philosophy book-title in that somewhere). I saw the named numbering group thing in the Placeholder Tags reference, but had no idea that the numbering didn’t restart. (Though the inclusion of a <$rsn> should’ve given that away, it wasn’t clear at first.)


Glad that helped!

One followup question, though:

How would I restart the numbering of scenes after each folder, but not each document with subdocuments?

So, for instance, if I have

Level 1 Folder “Chapter 1”
Level 2 Document “Scenes 1-2”
Level 3 Subdocument “Scene 1”
Level 4 Subdocument “Scene 2”
Level 1 Folder “Chapter 2”
Level 2 Document “Scene 1”

And wanted to wind up with:

Chapter 1, then Scene 1, Scene 2, then Chapter 2, Scene 1, etcetera . . .

How could I make it do this, I wonder?

P.s. – Nevermind … I just figured it out.