This is not for a screenplay. I’ve been using scrivener for a long time and haven’t seen this. Is it possible to compile or print text with paragraph numbers (what scrivener is calling line numbers in the editor) and scene numbers?
I’d like to be able to reference the scenes and paragraph by number like for scene 3 paragraph 4, #3.4. Or something like that.
If the paragraphs are styled, you can override the style in Compile, adding <$n> (or other number stream) to the style prefix.
Well. Look at that. Thanks!
Now I need to figure out how to add or edit styles. doesn’t seem to be very intuitive. I would LOVE to removed the paragraph indent.
I don’t know why complex things should be intuitive. We don’t get software skills from a million years of evolution. But I can walk you through it if you want:
zoom me
complex? You go into Word, click the Styles pane button and you can add style or select one and modify. That’s not complex.
I’ve looked for something similar in Scrivener but I just can’t seem to find it, even with 35 years in IT and as a former programmer. It’s PROBABLY right in front of me. But sure, if you can point me to it I’d appreciate it.
It’s done the same way in Scrivener, with slight differences in the user interface. ⌘S opens the styles panel. Format a paragraph as you want it and add or redefine it in the panel. Redefine by right clicking on the style name and selecting redefine.
There are further details in scrivener only because Scrivener styles are more powerful than Word styles.
This is a great example of the power of the compiler. Without messing with the text in your project editor, you can create a compile format that will insert the scene numbering and paragraph numbering for the text, actually applying the style to the text in the compile format itself.
The attached project demonstrates a setup with scenes as individual documents inside chapter folders. The compile format uses the “Numbered Scene” layout to add “Scene N” to the start of each scene document using the named <$n:scene> placeholder and applies a “Numbered” paragraph style to the text of those documents. That style only exists in this compile format and is formatted in the Styles pane there. (Double-click the “Numbered Scenes & Paragraphs” compile format to edit it and see this.) You can create new compile styles using the + popup menu in the upper right of the Styles pane and choosing Paragraph Style.
For the numbering, I set the paragraph prefix as <$n#scene>-<$n:para>.
followed by a tab (inserted via Opt-Tab
). The first part refers back to the document’s scene number, so scene 2 paragraph 1 will be numbered 2-1. Paragraph numbering will restart with each new scene (handled by the <$rst_para>
placeholder in the title prefix of the Numbered Scene layout) but scene numbering always increments—you might prefer to have it restart at each chapter, in which case you could just add <$rst_scene>
somewhere in the chapter layout title prefix or suffix. We’re using the paragraph prefix for the style so that the numbering is added to the start of every paragraph within the range of the applied style—in this case the range spans the complete document text, so using the other prefix option would only add numbering to the initial paragraph.
To make the paragraph numbering readily visible, the Numbered style uses a half-inch hanging indent; the first tab stop is also at 0.5 inch so all the text left aligns.
So that’s the basic setup. This will not override paragraph styles already in use in the project, as you can see in the example project that uses the Heading 1 and Heading 2 styles in the first scene. These paragraphs aren’t numbered in the output, which in this case I think makes sense—if the numbering is for referencing paragraphs in a draft, title lines probably don’t need that and excluding them reduces clutter. But you may have paragraph styles in the editor that you do want numbered in compile, and that’s easily done by adding the style to the compile format’s Styles pane (select it from the + menu popup) and then copying and pasting the paragraph prefix from the Numbered style into the paragraph prefix of the other style. You may want to also adjust the formatting for the style.
ParagraphNumberingDemo.zip (154.3 KB)
5 Likes
All that without touching the content. That’s the juice, man.
1 Like