Customising Compile Settings on iOS
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)
- Palatino Book
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.
The easiest way to get started with creating your own Appearance templates is to duplicate one of the defaults. To do this:
- Tap “Edit” in the Appearances list.
- Select one of the default Appearance templates.
- Tap the duplicate button at the bottom of the screen (the overlapping squares with an “+” on them).
- 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:
- Override the text formatting by changing the font to Courier and the line spacing to double.
- Add a hash ("#") between text files.
- 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.
Below are a couple of examples of the sort of thing you can do in a Compile Appearance file.
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
The following Appearance template does the following:
- Changes the font used throughout the exported or printed document to Cochin.
- Includes titles for folders up to four levels deep in the binder.
- Inserts a page break before each folder.
- 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).
- 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!