MultiMarkdown 5.2.0 and LaTeX

I’m using Scrivener (currently 2.7) with the external MultiMarkdown binaries for a few years now. The compilation (MultiMarkdown -> LaTeX) is done with XSLT post-processing. The Meta-Data in my projects contains entries for LaTeX Input, LaTeX XSLT and LaTeX Footer.

The compilation with MultiMarkdown 5.2.0 seems to ignore the LaTeX entries in the Meta-Data. The compiled .tex file is missing the \input{xxx} statements. If I go back to MultiMarkdown 5.0.1 by simply replacing the binary in /usr/local/bin/ the compiled .tex file is fine.

If I compile a project to MultiMarkdown first and then use the CLI to convert it to LaTeX with the MultiMarkdown 5.2.0 binary the input statements are included.

I’m puzzled :confused:

Hmm, the only part I cannot myself reproduce is when you checked against behaviour on the command-line. I’m getting similarly truncated meta-data lists when using the command-line on an MMD file I created by hand. If I run the regular HTML5 output (which is what gets used for XSLT), the “latexinput” and “latexfooter” meta-data keys are removed—so the XSLT that converts this to LaTeX has nothing to work with from the very start.

At any rate, none of this really has anything to do with Scrivener as far as I can tell. If I compile to plain MMD I get the expected fields, it’s only after I process it with MMD 5.1 or 5.2 that they vanish. So the first part of this report is almost certainly an MMD issue (which should be reported here, and might be related to this note in the change logs:

Thanks for taking the time to test this. I posted the issue over at the MMD Forum ( … processing) and Fletcher confirmed that your suspicion is correct. The latest versions of MMD “strips metadata keys it knows about that are not appropriate to the format being produced”. He also offers a work-around.

Additional question: Is there a way to tell Scrivener which MMD binary to use?

Scrivener will use whatever is located in /usr/local/bin, so if you want to have a separate version elsewhere that wouldn’t mess anything up.