Combine rich text formatting with bibdesk bibliography format

Hi: I am brand new to Scrivener, but quite familiar with LaTeX and Markdown.
My goal is to create a Scrivener document that contains some annoying rich text formatting like: 1) all caps centered headings 2) red italicized paragraph text with 3) bibliographic information interspersed from bibdesk or a bibtex file.

I really don’t know how to do this. I don’t think I can use markdown to create coloured text, but I can do it in Scrivener and compile it to Word, but then I don’t know how to combine that with the bibliography. Any help is appreciated.

Sorry, I should say, when I compile straight to docx, the rich text formatting (e.g. color and centered) are all there, but when I compile to pandoc > microsoft word, it all disappears. So I would like the formatting of t first process, and just be able to add bibliographic information.

Pandoc allows you to markup paragraphs with style names that get passed through to Word styles (or HTML CSS, or LaTeX environments etc.) So you can get Pandoc to generate custom formatting, as long as you make a Word template file that contains these named styles.

So step 1 is make a custom reference.docx:

pandoc --print-default-data-file reference.docx > custom-reference.docx

Edit this to your tastes and create the required styles.

Step 2 is to mark up the required paragraphs and spans using the custom style format (remember: you can use Scrivener–styles that will get transformed into this formatting so you never need to see this markup in the editor):

[Get out]{custom-style="Emphatically"}, he said.

[code]Dickinson starts the poem simply:

::: {custom-style=“Poetry”}
| A Bird came down the Walk—
| He did not know I saw—

Step 3 is to send the custom-reference.docx to pandoc during compile, you can do this automatically from the post-processing compile pane too (or if you use pandocomatic, manage this more directly using scrivener metadata):

pandoc  -f markdown  -t docx  -o myfile.docx --refererence-doc=custom-reference.docx   --bibliography=mybib.bib