Two Separate Organizations

I’m writing an alternate history book. Basically World War One but if they had dragons. So I would like, for my printed/compiled book, to have stuff at the beginning of each chapter. Stuff like, "In 1918 Charles Scrivener discovered a new way of training dragons that greatly enhanced their utility in combat…" In italics, set off from the actual chapter material, which would be like, “John woke up with a groan. Basic training yesterday had been exhausting” etc.

I would like to have two separate organizations for this book. I would like to have one binder view that presents my book in different sections, such as ‘what happens to the main character’ section (i.e. the normal story view), and then the ‘stuff I’m going to put at the front of each chapter’ section. That way when I am writing I can follow John’s progress through basic training, etc. or I can follow the overall history of Dragons in warfare throughout history.

But, when it compiles, I want them to come out with, like
Chapter 1
History section about dragons
Story chapter about John

Is there a way to do this while writing, or do I just have to stitch them together at the end??

This is an interesting one! The short answer is that there is no easy way right now, but that, after reading your question, I have updated the code so the there will be a technique that works for you in the next free update (which I hope to get out next week). Here’s how it will work (you can set this up in your project right now, it just won’t work yet):

The basics are this:

  • You keep your story in the Draft folder and your alternate history documents in a folder outside the Draft.
  • You use a custom metadata field to tell each chapter which alternative history document is associated with it.
  • In Compile, you use the <$include> placeholder tag in combination with this metadata field to tell Scrivener to insert the text of an alternate history section after the chapter title. (The part that isn’t working right now is that <$include> is not yet supported the necessary area.)

Here are the details:

  1. In your Draft folder, you have a folder for each chapter and text files inside these folders representing scenes. (Or if you prefer to have whole chapters in a single document, then each text file will be a single chapter). This is where you will write your main story.

  2. Outside of the Draft folder, you create another folder called something like “History” or whatever. You will write your alternate history in text documents in here.

  3. Now you need to tell Scrivener what these are using Section Types. You go to Project > Project Settings and rename “Heading” to “Chapter” (if you started from a blank project; if you’re using the novel template, this is set up for you).

  4. You add another Section Type named “History Text”.

  5. Ensure that your chapter folders are set to “Chapter” for their Section Types and scenes are set to “Section” (this is already set up if you started from the novel template).

  6. Ctrl-click on the “History” folder and choose “Section Type”. Beneath “Default Subdocument Type”, choose “History Text”. This will ensure that any text you create inside this folder will be assigned the “History Text” Section type by default.

  7. Return to Project Settings and this time, in Custom Metadata, create a new field called “History”.

  8. In the binder, click on a chapter folder and open the Inspector to the metadata pane. Expand the “Custom Metadata” area if necessary. This is the key part: In the newly-created “History” field, you enter the name of the history document (that you have created and typed out inside the “History” folder) that you want to appear at the start of this chapter.

That’s your project set up. You just create history documents in the “History” folder and then assign them to the relevant chapters using the “History” metadata field for the relevant chapter folder. Now to set up Compile:

  1. Duplicate & Edit the “Default” Compile Format and delete all of the Section Layouts except for “Chapter Number” and “Section Text”.

  2. Set these up as you want - for instance by adding “Chapter” before the title prefix for “Chapter Number” and formatting them as you want.

  3. Select “Section Text” and press “+” to create a new Section Layout. Name it “History Section” and override the formatting to italicise the text.

  4. Select “Chapter Number”, and for the title suffix, add a return character followed by:

<$include:<$custom:History>>

To break this down, “<$custom:History>” will get replaced with whatever text you entered in the “History” custom metadata field for documents associated with the “Chapter Number” layout. So, suppose you entered “Dragon Training” in the “History” field of a chapter, the result of this will be:

<$include:Dragon Training>

<$include:…> tells Scrivener to insert the text of whatever document is named after the “Include:”. So, in this case, you are telling Scrivener to insert the text of whatever document is named in the “History” custom metadata field.

  1. You’re all set up, so hit “Save”.

  2. Now, in Compile, click on “Assign Section Layouts…” and make sure things are assigned correctly. You’ll want documents that have the “History Text” type assigned in the project to use the “History Section” layout, so be sure to assign that (select “History Text” on the left and the “History Section” on the right).

You will want to tweak the Compile Format much more than this, of course, and you might want to start from a different Compile Format from “Default”, one that is closer to how you want your text formatted. But this will get you started.

Now, as I say, this won’t work yet - it will work with the 3.0.3 update. So I suggest that you play around with the above for now. What you should end up with is everything working, but instead of your history text getting inserted, you’ll just have <$include:Doc Name> left in the text - that’s the bit that will be fixed. Then, when 3.0.3 comes out, I suggest you drop back by and I can provide you with a sample project or more help if you have any problems.

All the best,
Keith

Ummm… wow.

Thanks.

Did you really just do a whole code update thing just because of my question??

And that, my friends, is one of the benefits of working with a company like L&L.

I did indeed. :slight_smile: It’s a really good use case - something that Compile is designed to be flexible enough to do, but just needs one tweak in this case.

All the best,
Keith

So, downloading the update now… I think I saw that the new ‘include’ thing is in it?? I am looking forward to trying it out!

It is indeed!

This is a cool new ability. Perfect for a special project I am just starting! Looking forward to checking it out.

gr

P.s. For what it is worth, this is a problem I would (otherwise) have approached with Labels (or keywording) and Smart Collections: put the history bits in their book-ordered place in the binder, assign a common label or keyword to each, and define a smart collection that enables one to reduce the binder to just those docs at a moment’s notice. Haven’t looked at the details, but the new way holds some promise of being more flexible when it comes to rearranging things.