Customising Compile Settings on iOS

Compile Appearances

When you go to Compile a project on Scrivener for iOS, you can customise the appearance and formatting of the final document by choosing an “Appearance”. There are five Appearances to choose from out of the box:

  • Manuscript (Courier)
  • Manuscript (Times)
  • Modern
  • Palatino Book
  • Script

Each of these applies certain formatting options to the text. They may also add titles to sections, and page breaks or separator characters between the files.

You can also set the appearance to “Default”. If you choose this, your text will be output exactly as it looks in the editor with an empty line between each file and a page break before any folders.

The default Appearance templates provide some nice defaults to get you started, but depending how you work, they may not do what you want. You can therefore create your own Appearance templates, giving you complete control over the output of your text.

Creating Your Own Appearance Templates

The easiest way to get started with creating your own Appearance templates is to duplicate one of the defaults. To do this:

  1. Tap “Edit” in the Appearances list.
  2. Select one of the default Appearance templates.
  3. Tap the duplicate button at the bottom of the screen (the overlapping squares with an “+” on them).
  4. Choose a location for the new Appearance (on your device, in Dropbox, or inside the current project - if you choose the latter, the Appearance will only ever be available for the current project).

The “Appearance Editor” will appear. You’ll see that this contains lots of easily readable text describing the current format, such as:

Text Format Overrides:
  Font Family: Courier
  Line Spacing: 2

Document Separator: "#"

Document Breaks:
- Page Break Before Folders

This text is actually in the "YAML" format (formerly Yet Another Markup Language, now known as YAML Ain't Markup Language, apparently). It's a format that is designed to be easily written and edited by non-techies. (In Scrivener, we call these files SCOMP files, for SCrivener cOMPile files.) The above example tells Scrivener's Compile that it should:

  1. Override the text formatting by changing the font to Courier and the line spacing to double.
  2. Add a hash ("#") between text files.
  3. Add a page break before folders.

There are a whole raft of commands available, so that you can completely change how the text looks in your exported or printed document. You can see a full list of available commands by tapping the question mark next to the "Done" button in the Appearance Editor. That will bring up a text box showing every possible command you can use with a full description of each, along with detailed instructions on how to put together your own Appearance templates. (Comments in an Appearance template appear in blue - anything typed after a # sign becomes a comment, and is ignored by the Compile routines.)

Note that some of the pre-provided Appearance templates include instructions on how you might edit them for different project structures, too. For instance, if you duplicate "Manuscript (Courier)" or "Manuscript (Times)", you will find comments telling you how to adjust the templates so that they will add chapter numbering for different types of project.

Examples

Below are a couple of examples of the sort of thing you can do in a Compile Appearance file.

Markdown Example

Scrivener is a rich text editor, not a Markdown app, but perhaps you want to use Scrivener's research and organisational tools and write in Markdown anyway, even though it doesn't support Markdown syntax highlighting. The following would be a good Appearance template to use for exporting to Markdown, with the title included for every of the binder (well, up to eight levels, anyway):

Title: Markdown

Folder Titles:
  Level 1: <$title>
  Level 2: <$title>
  Level 3: <$title>
  Level 4: <$title>
  Level 5: <$title>
  Level 6: <$title>
  Level 7: <$title>
  Level 8: <$title>

Text Titles:
  Level 1: <$title>
  Level 2: <$title>
  Level 3: <$title>
  Level 4: <$title>
  Level 5: <$title>
  Level 6: <$title>
  Level 7: <$title>
  Level 8: <$title>

Transformations:
- Dumb Punctuation

Example of Changing the Font

The following Appearance template does the following:

  1. Changes the font used throughout the exported or printed document to Cochin.
  2. Includes titles for folders up to four levels deep in the binder.
  3. Inserts a page break before each folder.
  4. Sets 1/2 inch margins all around except for the right margin, which is one inch (margins are measued in points; there are 72 points in an inch).
  5. Turns on facing pages. With facing pages set, you can choose a different header and footer for left and right pages, and the one inch margin will alternate between left and right pages.
Title: Cochin Document

Text Format Overrides:
  Font Family: Cochin

Folder Titles:
  Level 1: <$title>
  Level 2: <$title>
  Level 3: <$title>
  Level 4: <$title>

Document Breaks:
- Page Break Before Folders

Margins:
  Left: 36
  Right: 72
  Top: 36
  Bottom: 36
Facing Pages: Yes

There's much more you can do, including creating a template to export in standard manuscript format (the two "Manuscript" default templates can easiliy be edited for that). Feel free to experiment!