Challenges when compiling: not possible to convert MarkDown AND to keep footnotes/comments

Thanks for all the useful tips and help in the community forum. After a full day of trial-and error, searching for answers on Google at with AI, I finally turn to the community forum for help.

I started using basic MarkDown earlier this year, and find it useful in programmes like Obsidian. In Scrivener, I have been using the paragraph feature and italic, however I also enjoy using my own edited Scrivener styles as I write (although I understand from Scrivener users’ perspective, this isn’t necessary). I have been compiling my document (a research article draft I send frequently to supervisors and fellow students as a word-file) and ticked off the integrated Markdown and MultiMarkDown features, however when I use this feature, the compiled Word document does not include footnotes and comments. I cannot seem to figure out why, and the only way I can get them into the final version is if I un-tick the two Markdown boxes.

I am considering moving away from using MarkDown in Scrivener, as I feel I have tried everything (googling, reading community posts, etc.), and read the chapter 21 of the User Manual twice. However, I still have hopes that there is a simple solution for using MD AND keeping footnotes and comments in my Word document. I have downloaded Pandoc and the MultimarkDown tool from Fletcher’s website, hoping that this would help me solve my problems. Unfortunately, it doesn’t. If I compile using Pandoc-Word, the footnotes and comments are integrated into the main text, however, I want the footnotes to be merely footnotes, and the comments to be normal margin-comments in Word.

I also want to use Markdown for when I need to mark a block quote. It should be enough to add a > before the quoted text, right? This doesn’t work either when I have compiled through pandoc–>word.

Anyone who have any idea of what is happening here, and how I might fix it?

Thanks!

Kaja

Hi, Kaja, I exclusively use Pandoc, Scrivener and regularly use both comments (which become proper comments in word processor outputs) and footnotes. So this workflow is certainly feasible… It is pretty straight forward on macOS, and suspect this maybe OS specific?

As an aside, I would come to the forums (meat-and-bone AI) before being led down the hallicinatory garden path by Gemini, GPT or Claude. AI can be a useful tool with careful prompting, but real Scrivener users will always outcompete these artificial savants.

I always use Styles, and would strongly advise any Scrivener user that using Styles, while slightly more work to setup, gives you many advantages at compile time, especially if you may want to try different compile targets, or play with your compile transformations. I do think Styles are a major feature and benefit, though recognise some people may not need much (lots of fiction is basically headings and text). For markdown compiles, Styles are even more important. You will see in the default pandoc compile format that 4 styles are already mapped by default, so for block quotes, just use the block quote style and Scrivener will prepend the > for you. For figures with captions, just use the caption style. For inline code, use the style etc. You don’t see any markup as Scrivener will add it for you at compile time, it is super convenient and super cool.

Anyway, back to the problem at hand. I recommend disable any Rich Text to Markdown options, use Styles wherever you need styling in your output (i.e. use an emphasis style not italics). In the manual Section 21.4 this is described as the hybrid workflow.
This workflow does not suffer from a plethora of subtle escaping problems. While Scrivener allows you to work merging rick text into markdown, I don’t think it worth the extra problems that can occur.

  1. Use Scrivener’s footnotes, these should get converted to [^1] style markdown correctly without any more effort.
  2. Comments are a bit more tricky. MMD and Pandoc each deal with comments in different ways. MMD supports what is called criticmarkup and Pandoc uses a inline span markup. Pandoc can convert criticmarkup with plugins but lets not complicate stuff too much.

I don’t use MMD, so can’t comment much on how it converts criticmarkup to DOCX structure. For pandoc I use the annotations panel in the Compiler to create the correct spans[1]. I unfortunately have some compiler issues as I’m using the macOS beta which is incompatible with parts of the compiler UI at present so can’t make a small project that demonstrates how this works. But if you make a minimal project we can have a look.



  1. The Pandoc markdown spans look like this for comments: This is a [my comment text]{.comment-start id="0" author="Jane "date="2025-08-18T08:40:00Z"}test[]{.comment-end id="0"}. ↩︎

3 Likes

It might help to produce a simple example of how you are going about doing things, currently, as I’m a little unclear on what your process is. I can say that there are a few places where one could inadvertently end up without “proper” comments in their .docx file, when depending upon stock presets—namely if those presets that create the necessary Pandoc markup are not selected in the first place.

The best way to start is to select the “Pandoc Word Document” compile Format, in the left sidebar of Compile. This will provide a few useful tweaks to the more general-purpose “Basic Pandoc” format, which in turn provides a lot more than one of the more vanilla formats, like Default (which isn’t really tuned to do much with Markdown out of the box).

pandoc_with_comments.zip (140.6 KB)

This sample project shows a slightly tweaked version of the “Pandoc Word Document” format, where I’ve taken the inline annotation treatment and made it produce styled text, using the custom style “Notation”, instead of just putting square brackets around the text as it would by default. If you load the compiled .docx file and modify the Notation character style to something visual, like red text or strike-through, you should see the annotation marked up in the text.

The comment, meanwhile, will be highlighted just as it was in Scrivener, and even include the author name as defined in the compiler’s Metadata tab. To see where this is being done:

  1. Double-click on the “Pandoc Word Document (Styled Notes)” compile Format in the left sidebar, to edit it.
  2. In the Annotations tab, check out the text fields here. It should be pretty straight-forward, if you’re already familiar with how to make comments and styled text ranges in Pandoc Markdown itself.

I also threw in a block quote as well, to show how that should work. I didn’t add a footnote, but you should be able to test both inline and sidebar footnotes in this sample project with ease. I’m actually not sure how those aren’t working for you as they are one of the core things Scrivener is supposed to always convert (like images), regardless of your settings (but you should also be able to type in your own footnotes by hand, too, as with any other markup—by default Scrivener shouldn’t be messing with anything you type in).

Speaking of “by default” though, one thing you might be running into is using the Convert rich text to MultiMarkdown checkbox in your compile settings? Definitely turn that off if you intend to use Scrivener to author Markdown instead of rich text. That checkbox is more for those that do not intend to use any Markdown at all.

2 Likes