Compile to outline with metadata

I have a compile that gives me an outline of chapters and scenes (a novel) with synopses. Is there a way to include word count and a couple of custom metadata with the scene title?

Do you mean the word count of the current section?

I don’t think you can – the word count placeholder (<$wc) records the number of words that are being compiled in total, but it’s not broken down further, so you’d end up with the same number on every section. (You could copy it into a custom word count field to use as below, but it would be a faff)

You can print custom metadata, as you can see from my meticulously thought out named custom field. I don’t think there’s a way to remove the Created/Modified/Label/Status fields.


To get this, choose your compile format, then if it’s a default one, right-click and ‘Duplicate and Edit’, or if you’re already done that, ‘Edit Format’…

In the new dialogue box, click on Section Layouts and look for the line with the most likely looking candidate – I’ve chosen Titled Section here. Press the + sign to create a copy of it and give it a name (e.g ‘Title Section Syn + Meta’). Then make sure the Title, Metadata and Synopsis columns are ticked for this item and make the Notes and Text boxes unticked.

Notice how the dummy text now shows you the meta data / synopsis placeholders. You can format each type in the normal way.

Press Save to go back to the first compilation dialogue and click Assign Section Layouts - click on the Section Type you’re using for Scene and allocate your new Layout (Title Section Syn + Meta) to it.

Then compile…

This is the basic idea anyway – a bit of a quick run through, but hopefully it shows you the basic steps.

You could display your section synopses, word count, and custom metadata as columns in the outliner and then export that as a CSV.

Otherwise, if you must compile, you can add custom metadata in using a place holder tag. Say you have a custom metadata field called “Index”. You can insert the value of that field for each section by using the tag: <$custom:Index> (see the Placeholder Tags list on the Help menu for more info)

I have four such metadata fields that I insert for each section in my documents when I compile. I do it in the Title Suffix box in Compile.

That screen shot shows Scriv 3, but this worked in Scriv 2 as well.

You’ll note I’m not even compiling the title itself, that box is unchecked, but the metadata in the Title Suffix still compiles.

Then on the formatting tab, you can format the metadata as you wish - I like it to be pretty unobtrusive so I do it in an 8 pt font, in a lighter grey colour (in fact, in Word I also set that as Hidden text so I can turn it on and off as desired).

Screen Shot 2017-12-02 at 11.42.36 PM.png

You’ll notice I do have a WordCount field there - that one’s a bit trickier. I select and copy the portion of the text I’m interested in having a count for, then I use Keyboard Maestro to filter the clipboard for the word count, and then paste that value back into my custom WordCount field in Scrivener.

Thanks so much, Brookter and SarsenLintel, for thoughtful replies. I’ll try the several suggestions and, I’m sure, end up with a workable solution.

Are you using Scrivener 3? Your example shows formatting options I don’t see on my version 2

Yes, it’s Scrivener 3, but the same would work in V2 as far as I recall.

Compile > All Options > Formatting, select the level type you want to change, then look in the dummy text below.

There’s a button on the bar called something like Section Layout (sorry, I’ve got the V3 beta since about January and haven’t used V2 since so the actual names are a bit hazy…) and in the dialogue that appears you’ll find a Title Prefix/Suffix tab – you can enter the same codes there.


Yes, Thanks. You remembered the V2 terms. I have done that. So far, it doesn’t work for me. I’ve added : <$custom: POV> POV to show my metadata for the POV of the section. Outline works fine, but the POV doesn’t appear, although the section format shows that it will. Not the end of the world, but it’s one of those nagging issues. Thanks for your quick response.

Ah, OK.

What worked for me was just to tick the metadata field (is that in V2?).

Using <$custom etc> was Sarsen’s method – but I notice that you’re got a space between custom: and POV. I don’t think there should be one, so that may be the problem?

Yeah, pretty sure the space after the colon is a no go. It’s been a while since I set up that compile format (fortunately the important bits imported from V2), but IIRC that tripped me up a time or two as well.