Metadata not included when compiling on Windows, works on Mac


I am working on a project using Scrivener and compiling to MMD for conversion to LaTeX with Pandoc. (I use the “Scrivomatic” workflow). I have a metadata file called “Metadata”, and a project compile format. I include the metadata file (YAML) in the compile by using the “Add front matter” selection in the compile overview dialog.

Everything works fine and dandy on my Mac, but on the Windows version, the metadata won’t export. Both Scrivener versions are current, as are the operating systems (Win 11, Mac OS 13.4)

As far as I can see, I have no filters or other restrictions on the files selected that would stop the front matter from being included on my Windows machine, yet I am unable to get the metadata generated in the compile.

Any thoughts or tips?


There is a rather silly bug in the Windows version, whereby the Front Matter feature does not correctly insert its contents into the compile settings that also generate metadata—the output just gets lost somewhere—unless front matter is being used for other things as well. It also works fine if that item gets to the top of the list in Compile through any other means that I seen, such as being at the top of the Draft folder, or when compiling a Collection as the designated compile group.

So if you have no need for “hot swapping” metadata, or use of the front matter feature otherwise (as I say, having something like a “Preface” as well will cause it to work, even though there isn’t a huge reason to do that with Markdown-based compiling), then the easiest solution is to drop that file into the top of the Draft folder. That makes the most sense anyway really, if all you’re doing is using the Front Matter feature to insert a file you always need and that’s all it does, there is no reason to even use the front matter feature.

Otherwise, if I do need the ability to hot-swap between different metadata sets, what I’ve had to do in some projects is migrate metadata settings out of the compiler and all into a file called anything other than “Metadata” / “Meta-data”, with a section type that will print it as-is. In that case it needs to be a fully valid metadata block (including the --- lines before and after, for Pandoc). It’s nothing special at that point, it is text we’re inserting at the top of the document that matches the spec for what a YAML block should look like.


Thanks for your swift, knowledgeable, and courteous reply. Problem solved.

Support cannot get much better than this!


1 Like

Hi, on macOS I always have a Metadata file that contains the details for a Pandoc / Quarto / LaTeX compilation that is placed at the top of the binder outside the main draft folder. I add it to the compile using the Front matter selector in the compiler and works well on macOS. So we have:

├─ Intro
├─ Results
├─ Discussion
├─ blah
├─ bleh

I am helping a friend who is using Windows Scrivener running in Wine+Ubuntu. When he compiles using this binder pattern, the front matter is completely missing from the markdown file even though it is selected in the compiler. Does anyone know if this is known problem on Windows?

Aye it’s a bug; see above for the details, and how to avoid it.

OK, good to know, thanks @AmberV !