LaTeX metadata compiling as plain text rather than \def{} co

I use Scrivener with a MMD -> LaTeX workflow most of the time. (MMD is great because I can use it to produce files for less-advanced collaborators who use shudder Word. :unamused: )

For some reason, I can’t seem to pass meta-data to LaTeX. When I provide additional m-d, either through a Meta-data document as the first in the compile list (I keep it in a Front Matter folder) or through the Compile: Meta-data dialog, the metadata is simply passed through as MMD text. An example should help.

Normally, this is what should happen. Metadata gets passed thru and transformed into LaTeX as such:

\def\myauthor{I.M. Author}
\def\mytitle{This is the title of my document}
\def\mythanks{Thank you, thank you, thank you.}

Instead of that, I get the following output into the LaTeX document.

\def\myauthor{I.M. Author}
\def\mytitle{This is the title of my document}

Thanks: Thank you, thank you, thank you.
Base Header Level: 3
Latex Input: mmd-scrivcustom-begin-doc
Latex Footer: mmd-scrivcustom-footer

I’ve tried varying the order of the metadata in the compile window, and it seems that the compile is only grabbing the first two fields for transformation and then passing the rest through as the text one would see in the header of an MMD document.

What’s going wrong here?

Thanks in advance for your help.

My guess would be that you have a stray carriage return in the title field—but it’s always easier to figure this kind of stuff out when looking at the actual MMD text document that Scrivener produces, and will be feeding to the MultiMarkdown engine, rather than trying to guess after the whole process is concluded and you’re just looking at the symptoms. Compile as MultiMarkdown instead of LaTeX, and see if your meta-data block has empty-line gaps in it, and you should be able to go back and fix those where they occur.

So there is a carriage return in the MMD document that Scriv generates, but I’ve checked the compile Meta-data as well as the project meta-data, and I can’t find a stray carriage return anywhere.

Any other ideas?

Ah, wait! FOund it!