Is there a way to display Bold & Italicized words in different color from primary text?

Hi. I often write in Markdown in other text editors. Most have the option to display bolded and italicized words in a different color from the primary text color. Is there a way to achieve this in Scrivener? On the latest beta 31 on Windows 10.


Since you’re using the beta, it would be best to post the question in the Beta Testing forum:

It sounds like you’re referring to what would be called “syntax highlighting”, in a coding editor—a technique that plain-text editors use to embellish text based upon certain rules that you can load in. Some Markdown editors have a simplified and hard-coded syntax highlighting system such as this.

It’s unfortunately not a compatible concept with a program that is closer to a word processor, like Scrivener. The tools for embellishing text are, with a few exceptions, pretty much actual formatting. So the concept competes with “rich text” in that sense, and is thus unlikely to ever make into the software. There are pros and cons—on the one hand it doesn’t change the colour or other attributes when you type in blah…, but on the other hand you can use hundreds of highlighter colours and other marking tools, something most plain-text based editors cannot do, since all “formatting” must be derived from patterns in the text.

If you’re like me, you want to have actual asterisks in the source, given how useful that approach can be—I write with Markdown because I like it, foremost. But if you’re inclined not to, or are ambivalent on the matter, Scrivener 3 does bring some new concepts to the table with regards to syntax generation. There are a number of Markdown authors using Scrivener who prefer to use “Emphasis” styles in the writing phase itself, eschewing the asterisks in the editing area, and setting up the compiler to actually produce those asterisks around such styled text, and thus keeping their work Markdown-friendly (at least for the few fractions of a second the Markdown file exists, before being converted to HTML, LaTeX, DOCX or whatever).

While that specific example is not demonstrated, the technique itself is:

  1. Open File ▸ Compile… and double-click the “Basic MultiMarkdown” format, to duplicate and edit it.
  2. In the Styles pane, click on any of the revision-oriented styles, like “Addition”.

Note the prefix/suffix fields here are being used to wrap the styled text in CriticMarkup syntax, but you could just as easily put asterisks in here instead—or five lines of complicated raw DOCX XML for that matter, it’s quite flexible & powerful once you get to this level.

Otherwise, you might just do like I do in some cases, and employ some styles purely for their cosmetics. I don’t bother with italics and bold much myself, but for some things like block quotes or code blocks, it can be nice to have a different font or indent layout. Style invocation can be keyboard-driven, and so not much of a burden—and indeed if you use macro software like AutoHotKey, you can probably wrap all of this up into one Markdown-driven thing. I do similar myself with a Mac-based tool, which scans what I type in Scrivener, and when it encounters a pattern like Return + > + Space it triggers my block quote style. The effect is virtually instantaneous, and thus not altogether too dissimilar from syntax highlighting in a text editor.

Moderator Note: moved to beta testing forum.