How to preserve revision mode text colour after compile

This is probably something silly and small, but what I’d like to be able to do is simply keep text the (non-black) colour it appears in Scrivener once it’s been compiled. For instance, I’d like all the text that appears red in revision mode one to appear red in my final document (and all the original text to remain black). I’m compiling using the filter MMD -> Latex. Ive searched through all the documentation I can find and have scoured all the preferences. It would seem something that should be possible and I’m fairly sure I was able to do something similar with annotations in Scrivener v1 (and using annotations in v2 doesn’t work either atm). I’d be very grateful afor any help.



Using MMD, that’s not possible as Scrivener dumps all of that formatting when producing the plaint-text version. To preserve text colour, you would need to use inline annotations and leave them turned on during compile, then they will come up in the colour of the annotation in LaTeX using the colour package.


Many thanks for getting back to me and so quickly. However, I can’t seem to get the inline annotation route to work either. I create an inline annotation, or mark an existing paragraph as one, and then make sure that the ‘remove inline annotations’ option in the Compile option box ISN’T checked (and the 'convert to HTML-styled text IS), and yet the resulting .tex file from a compile has all the text as the default colour. Am I missing something?



Well, I can get around this by manually adding

Text you want in red.

within Scrivener. However, I don’t understand why it doesn’t work with Annotations as they simply add the same code (don’t they?). Thanks for any help.




They should be. Two things that can impact this are:

  1. Something isn’t happening the way it should be during compile
  2. The XSLT you are using doesn’t support span colours.

To test for each:

  1. Compile using plain MultiMarkdown instead of going straight to TeX and then open that in a text editor and see if the spans are actually there
  2. Reset your LaTeX XSLT to memoir.xslt and see if the problem persists.

A third thing that could be happening is that your LaTeX distribution does not have the colour package installed. Check your TeX error log and see if there is anything funny going on there.


Again, thanks for your reply.

I’ve tried to test your hypotheses.

My LaTeX distribution does support colours. I can get red text by manually inserting the spans and there isn’t anything strange or relevant showing up in the TeX log.

Changing the XSLT to memoir doesn’t help.

However, a compile to plain MMD does leave the spans intact. Does this indicate a problem during compile?



If you have a plain MMD file with CSS styled annotations (that aren’t black), then Scrivener is doing everything it can to get them into the LaTeX file. After that point, it passes the very same plain MMD file along to the MMD engine. At least that is what should be happening. There shouldn’t be any difference at all between the plain MMD compile option, and what is getting used for the LaTeX compile option.

You say you can get red text in LaTeX by manually adding a colour-styled span to an MD document, but that LaTeX documents that Scrivener produces do not, despite the fact that they have colour-styled spans in them during plain compile?

Hmm. Do you have more than one MMD installation on your computer? Perhaps the one Scrivener is using is faulty, but the one you are testing with is not?