Linebreak in Metadata

Hi,

how do I create a linebreak within metadata?

I’m using the Affiliation key from MMD6 and export using the Memoir (Book) settings to Latex. I checked the MMD6 Documentation which claims:

(Taken from https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#affiliation)

Scrivener doesn’t seem to respect that, but I tried passing //, ////, and /n - all to no avail.

Hmm, we in fact use a large multiline text field here specifically because that should be valid (and easy to do). You of course have to follow the syntax rules within that field, but I presume you’re doing so. I’ve attached a simple demonstration of a multiline metadata field in action. Here we are supplying a little CSS to the HTML output, using the “HTML Header” metadata field. The compiled result has the expected formatting.
multiline_metadata.zip (98.9 KB)

Thank you for your reply and the example. If I export Multimarkdown->HTML your HTML-Header tag is present however line breaks have been removed, too. If I create an additional tag Affiliation in your example and set it to:

test1 test2 test3
this yields the following results -
Multimarkdown → Latex:

Multimarkdown->HTML:

If I understand the MMD6 manual correctly the outcome should be

That seems to be something you should report to the MMD discussion board in that case. I do not see what Scrivener would be doing here to alter this result, and indeed if I test MMD directly on the command-line I get the same result you indicated as unexpected behaviour:

[code]$ mmd2tex
Title: Test Metadata
Affiliation: test1
test2
test3

The End[/code]

Output:

[code]\def\mytitle{Test Metadata}
\def\affiliation{test1 test2 test3}

The End

\end{document}[/code]

Ah - I never considered it was an unexpected behaviour on the part of MMD and didn’t get around to testing it on the command line. Yes I’ll report the behaviour in that forum. Thanks for helping narrow it down!

Could you think of any work around? I tried

'test1\\test2\\test3'{=latex}

which yielded

So even if the passing of two extra spaces does not work in MMD contrary to its manual, I don’t see any way at all of passing a line break in the metadata to a Latex output.

After having experimented with a few different approaches, it looks like the Markdown convention of adding a single backslash to the end of a line that is intended to be a hard line break is coded to be functional within the Metadata block—and thus visually provides a result that will be familiar to any shell scripter:

[code]Title: Test Metadata
Affiliation: test1
test2
test3
LaTeX Config: article

The End[/code]

That typesets correctly in my testing, producing affiliations, one per line, below the author line in the title block. So it may be that what needs to be reported is that the MMD documentation needs to be updated.

Thank you for reasearching this further, I thought I had tried the slash, but clearly I must have not done so. I can confirm that your solution works for me too, and it also seems to be the standard way following this documentation here:

fletcher.github.io/MultiMarkdow … lines.html

After our discussion I posted to the MMD forums here:
support.fletcherpenney.net/discu … n-metadata

There I learned from the developer that the documentation I had found was outdated and refered to MultiMarkdown V2. Unfortunately, it was still being edited by other users since it was a wiki, and therefore gave the impression to be current.

So if other users run into unexpected behaviours on the side of MMD I suggest to double check that they have been checking the correct documentation for the version in use. There are several out there…