Conditional Color Titles on Compile

Hi Everyone,

I’m brand new to Scrivener, using it for technical writing. I’d like to conditionally color the Titles of my text, based on Label or Status, Custom Metadata or Keywords, or just about anything else someone can recommend.

I’d like to mark certain scrivenings as either “Lesson”, “Historical Information”, “Supporting Documentation”, etc. - and then have the compile feature change the color of the titles (maybe lessons are green, historical are yellow, supporting documentation as blue, etc.).

I have seen this really cool way to do it with Chapter images (http://garrettbrobinson.com/how-to-format-a-novel-compilation-1/) but color changes makes more sense to me.

Any ideas?

Thanks,

Russell

It’s been a while since I used Scriv or posted here, but will give this a go.

Short answer, ‘I don’t think so’. You can’t conditionally compile formatting instructions based on label (or keyword) contents. Depending on your target output there may be ways to get you closer.

The beauty of Scriv is in the workarounds -

  1. In Compile - use ‘Format As Is’ - which would preserve your banana yellow headings, should you wish to have such. You could do some of the legwork by setting up specific templates for different label-document-types.
  2. Selectively compile - use Labels or Collection searches to output styled sections, and change the style according to what you searched for. You will then need to manually assemble your finished document.
  3. Use Markdown. (I think, although this is possibly just 1a)

More obtuse
4. Keep your titles or whatever it is you want styled differently in separate scrivenings / folders (ie snip that one line from your chapter text) and format that differently. Still not going to do conditional formats though.
5. Output the label using the placeholder tag immediately prior to your title. Then in your target word processing system either record a macro or use a search and replace that looks for the label tag, selects text to the end of the para, styles it. You will then need a second sweep to remove your label instructions. This would work better for HTML output. And you never specified ‘sensible’ solutions.
6. Colour them in after compile.

If, however, all you want to do is have a simple visual cue as to the different types of sections/chapters you have in your manuscript, you can use the Label to colour icons in the binder, or to provide the background colour in Corkboard, or less impactfully in the Outliner view.

So long answer is to look at your use case, and think about whether there isn’t a better way for the reader to get the information you are looking to impart through colour. I’m sure it still says it somewhere, but Scrivener is neither a word-processor nor a Desktop Publishing system - ie primarily a writing toolkit, not a formatting/presentation system.