Adding text to styles in Compile in Scrivener 3

In section 15.5 of the User Manual for Scrivener 3 is the following:

I started looking around for any sort of indication in the program, whether in creating Paragraph styles of Text styles or anywhere in the Compile maze, and have so far found nothing that would indicate this is a possibility. What am I missing, and how does one go about doing this?

It falls in the general topic of Styles but in the quoted bit mention is also made of the text being ‘tagged’ in this way. So is it NOT a style matter, but a tag? And what is the difference in this context of a ‘Style’ and a ‘tag’?

Thanks.

See §24.5 of the manual, this transformation happens at compile time, and to create this mapping yourself you need to use the Compile Format Editor (§24 is dedicated to it)…

By “tagging” I think it means a semantic label, styles are used to label chunks of stuff with a meaning as well as just make it look a particular way, and you can use styles in either or both ways.

This is the difference in thinking about i.e. “italic” vs. “emphasis”: they both look the same in the editor but have a different underlying meaning…

Thank You! That did it.

I had the idea to bypass MMD entirely by prefixing and suffixing my styles with the HTML, and so far my tests are working out just as I had hoped. This alone is likely enough to prompt me to buy v3, though only one of my 3 macs can run Sierra+.

Thanks again. Wonderful!

It should indeed be possible to create your own HTML generator in Scrivener from scratch—the plain-text output has enough control in it to produce valid XML. Though if that’s all you need—and you don’t mind how Pandoc/MultiMarkdown generate HTML (rather you just don’t like the punctuation-based writing approach), try this:

  1. Select Compile for: MultiMarkdown -> HTML in the compiler.
  2. Click on the gear tab for general options on the right.
  3. Look for “Convert rich text to MultiMarkdown”.

Result? Use Scrivener normally, use styles as you wish to do things Scrivener itself doesn’t address natively, but in the end all of that will be converted to MMD internally for you, piped through the post-processing engine, and compiled as clean HTML as a final product.

It’s a broad enough conversion system that we use it to create ePub 3 and KF8 files for people using Scrivener who’ve probably never even heard of this stuff. :slight_smile: