Automatic Numbering of Clauses / Sections Throughout the Document

Fr
Freddy
Posts: 10
Joined: Fri Feb 16, 2018 2:32 pm
Platform: Mac

Fri Dec 07, 2018 9:11 pm Post

Dear Author Colleagues,

The folllowing situation is given:

I'm working on a guidebook, which puts down some tips, guidelines, and prompts as "paragraphs" (§).

Of course, the guidebook consists of many chapters. So, for example, if I enter §§2–16 in Chapter 1 and §§17-21 in Chapter 2, is there any way to automatize this process, just like with ordinary numbering in a text document? The point is that I would like to be able to edit the respective sections without having to edit and re-write the section numbers of all of the zillions of paragraphs in my book.

So, if I make §8 to §7, and afterwards enter a new paragraph in between – what shall I do to let Scrivener take care of that?

Thank-you so much in advance!

Have a merry Christmas time,
Fred

User avatar
KB
Site Admin
Posts: 20507
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Fri Dec 07, 2018 9:41 pm Post

One thing you could do is use a style for such paragraphs, and then, in Compile's styles override area (when editing or creating a Compile format), you could add prefix for such paragraphs (e.g. <$n>) so that they are numbered during Compile.

I've attached a quick sample project showing how this can be done. Be sure to note:

1. The blue highlighted paragraphs are using a "Numbered Paragraph" style that I created via Format> Styles.

2. In Compile, if you Ctrl-click on "New Format" and select "Edit Format...,", take a look at the "Title Options" of "Chapter Number" in "Section Layouts". You'll see that it has <$rst_para> set, which tells Scrivener to restart the "para" numbering stream at the start of of each new chapter.

3. In the "Styles" area, note that "Numbered Paragraph" has been overridden" and has a paragraph prefix of "<$n:para>. ". This tells Scrivener to insert numbers at the start of each paragraph using that style, and the numbering stream is internally called "para", which allows us to restart it with the tag we used in (2).

All the best,
Keith
Attachments
NumberedParagraphs.zip
(85.7 KiB) Downloaded 9 times
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

AP
APH
Posts: 7
Joined: Fri Nov 16, 2018 10:08 pm
Platform: Mac

Fri Dec 07, 2018 10:56 pm Post

Hi Keith, that's very helpful. I've been trying to figure out for a while how to deliver consistent para numbering.

Question: how can I indent the text under the number? eg the number sits on the left margin, and then the whole paragraph is indented (say) 1 cm. I have shifted the tab marks in the Styles section of the compiler to create indented text, but it's not overriding the para style in the doc (which has indent first line only)
Thanks for your help
Screen Shot 2018-12-08 at 9.55.10 am.png
Screen Shot 2018-12-08 at 9.55.10 am.png (57.27 KiB) Viewed 282 times

User avatar
KB
Site Admin
Posts: 20507
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Dec 10, 2018 11:42 am Post

All you should need to do for this is:

1. Change the space after the prefix to a tab (hold Option down to enter a tab into text fields).

2. Change the style formatting in Compile so that the first line is flush-left, there is a tab, and lines after the first are indented to line up with the tab (i.e. a hanging indent).

I've attached an updated version of the sample project demonstrating this.

All the best,
Keith
Attachments
NumberedParagraphs2.zip
(86.27 KiB) Downloaded 4 times
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

AP
APH
Posts: 7
Joined: Fri Nov 16, 2018 10:08 pm
Platform: Mac

Tue Dec 11, 2018 6:47 pm Post

Thanks Keith. Works a treat