Counting for simple chapter numbers

This one is not really that urgent, since workarounds are pretty easy to set up.

Would it be possible to come up with some sort of counting system that would automatically generate chapter numbers.

What I do currently, is put some text marker where I want the chapter number to go …

chapter <chapter_number/>

Something nice and destinctive. Then when I import into Word, I just do a find/replace of <chapter_number/> with a number counting field.

As I said; not really an urgent need; more of a nice to have.

Yeah, I would like this as well as an auto-outline that prints as the first page of my document. But I don’t think KB wants those.

This is one of those maybe-in-the-future-past-1.0-possibly things. :wink: The trouble, conceptually, is that the documents in Scrivener don’t have to be chapters - they can be anything you want, fragments or whatever. So an automatic numbering system doesn’t really make much sense. Also, given the way the text fields in an outline work, it could be difficult for Scrivener to know which ones need auto-numbering etc.

Definitely one for consideration in the future, but not right now. Glad you’ve got a workaround, though.

All the best,

All very true, which is why I was thinking of using a series of variables.

Here’s what I was thinking:

1/. A dialog box on the project settings screen, that allows you to define named variables. You click on the + button and you add

variable name, starting number, increment, style

So for example, I could have

chapter_number, 1, 1, roman numerals

2/. While you are typing, a menu command called insert variable gives you a dialog box with a list of defined variables that you can insert into the text. I’m at the start of a chapter, so I pick, chapter_number, which could show up in the text as:

Chapter [color=blue]{chapter_number}

3/. During printing/export, Scrivener generates the counts from the variables and replaces the variable markers in the text.
So I end up with

Chapter I
Chapter II
Chapter III
Chapter IV


As you can see, this actually gets around the problem of not knowing what constitutes a chapter; the user puts the count anywhere he/she wants to.

Anyway, that’s what I was thinking. Just thought I’d put the idea somewhere before I forgot it.

As I said, not really urgent; one could also argue that just letting Word handle it has advantages; it supports an almost unholy number of formatting options for doing this.

Actually, I might drop the workaround into tricks and tips.

No need for a reply by the way; I’,m just thinking out loud and trying to improve my WPM.


That would be great - please do.

When it comes to offering dialogues for things like this, things get more complicated for Scrivener when it has to deal not just with normal text but with text inside tables. Like I say, I will add this to my “future possibilities” list - maybe one for 2.0. :slight_smile: