Heading style overrides markdown

I have the following markdown which I am compiling to docx (Scrivener version not via Pandoc)

Heading 2

Text text text text
Text text text

I f I apply a heading stye to the ‘## heading 2’ then when I compile the style ignores the markdown and i get ## Heading 2 in the output not Heading 2. I can strip the ## using replacement but wondered if I have a setting wrong that is making the compile ignore the markdown?

If I don’t apply the heading style the output is correct as Heading 2

Yes, you’ve applied a style. You can identify text that you want styled by applying Markdown formatting, or by applying a Scrivener Style, but not both.


Thanks for clarifying - one final question…

Is there a way of setting the font size for the different levels of markdown header when using scrivener docx output? For example; if I wanted ## to be 14pt and ### to be 12pt etc.

Use the Styles pane associated with the Compile command, rather than the Editor. See Section 21.4.5 in the Scrivener manual for the Markdown side of the equation, and Section 24.5 for Compile Styles.

No, this doesn’t contradict what I just told you. One way to think of it is that Editor Styles define what the styled text is: is it a header, a block quote, etc.? Markdown does the same thing, hence the conflict. In contrast, the stylesheet in the Compile command defines what the output document looks like. It takes the label – however it was assigned – and associates it with specific formatting.

This distinction gets fuzzy when the output format supports styles, as DOCX does, or when you’re using a post-processing workflow based on semantic markup created in Scrivener. But I hope it helps.


Thanks for all your help. I will take a look and experiment, :slight_smile: