Line numbering in a script


I want Scrivener to automatically number lines in dialogue throughout a script. I am revising a Shakespearean play and want line numbers in my total document. Every 5th line, sequentially, working up in the right hand margins, restarting after each scene, not counting black lines, or page breaks or any other script elements. Only the ‘dialogue’ element under format, script writing, script settings.
I have all acts and scenes in folders and the actual script text in each folder.
I am familiar with the compiling features but I don’t know where to begin to tell scrivener to count lines in dialogue and insert numbering automatically and then restart the numbering in each scene.
Any help would be appreciated.

Final product would look like the below…
Elements below are…
Scene Heading, Stage Direction, Character name followed by Dialogue. Notice Scene Heading, Stage Direction and Character name are not counted as line numbers. Only Dialogue. And of course, not blank lines.
I would want the line numbers to appear in the right hand margin. Couldn’t show that in this post.


(Enter THESEUS, HIPPOLYTA, PHILOSTRATE, Lords and Attendants)

More strange than true: I never may believe 1
These antique fables, nor these fairy toys.
Lovers and madmen have such seething brains,
Such shaping fantasies, that apprehend
More than cool reason ever comprehends. 5
The lunatic, the lover and the poet
Are of imagination all compact:
One sees more devils than vast hell can hold,
That is, the madman: the lover, all as frantic,
Sees Helen’s beauty in a brow of Egypt: 10
The poet’s eye, in fine frenzy rolling,
Doth glance from heaven to earth, from earth to heaven;

I know I’m not the expert on this, but I don’t think there is a fully automated way to get it done exactly as you like it. That is a pretty advanced typographical and script specific want!

In Script Settings > [choose the Dialog element of your script format] > Paragraph > Options, you can enable Sequential Numbering and set it to go to the right margin. It is not entirely clear to me what that feature is doing, but something similar to what you want … but not really. (The explanation of its intended purpose in the manual (in sec. 19.7) was unhelpful to me b/c I am not in the playwriting biz.)

The only way I can think of that you might get close to what you want would require you to enter placeholder code at the end of every fifth line of dialog (and the relevant reset code at the start of every scene). That would get you the numbers on compile, but you would still need to do something else to get the layout you want. Though there are many script-specific options in Script Settings, it also looks to me like you could not make a customized script element to get precisely the format you want (with a tab to numeration at right margin).

So, what you might do is design a custom paragraph style which emulates what a dialog line looks like in your play script, but also includes a right-aligned tab stop at the right margin. Then, after you have done all the editing and are ready to “go to press”, go through and apply that special paragraph style to each dialogue paragraph that needs numeration, then at the end of the relevant line thereof paste a tabCharacter+placeholderText.

Getting close, but the fly in the ointment here is that, as far as I can see, auto-numbering placeholders only increment by one and cannot be set to any other increment. Workarounds are possible but would not be worth the trouble. No, since the process suggested here already requires you manually entering something at the end of the relevant lines, you might as well just type the actual line number and be done with it! (The procedure already required you think of this as something to NOT do until you are done done done, so what the heck.)

Just thinking aloud here. Maybe someone with more knowledge than me will have an amazing solution for you!


I am trying to number JUST DIALOGUE not stage directions etc. From reading above posts I can see that “In Script Settings > [choose the Dialog element of your script format] > Paragraph > Options, you can enable Sequential Numbering” should exist but there is no “Sequential Numbering” option anywhere that I can see. I’m working in Version 2.9 - is this an old version which doesn’t have it or something? Thanks in advance for your help. Rebecca

If what you are trying to do is number dialog (not number stanzas of poetical dialog), then you might want to check out the following thread, where I solved that problem.

And, yes, the suggestions you are reading and the solution you will find in the above thread pertain to the current version of Scrivener, namely Scrivener 3.x. Version 3 was a significant upgrade indeed! However, the suggested way offered in the above thread might work for vers 2.9, since it was certainly the case that script format settings were editable already in that version.