B43: MMD metadata not compiling correctly

ti
timothy
Posts: 18
Joined: Mon Jul 02, 2018 10:01 pm
Platform: Windows

Thu Mar 26, 2020 8:51 pm Post

I'm writing in MMD and compiling to Web (HTML). Any MMD metadata at top of MMD text file is being compiled into the HTML body as text, instead of converted to appropriate HTML <head> elements.

For example, Title, CSS, copyright, etc.

It works correctly using multimarkdown.exe from the command line. It does not when compiling within Scrivener.

I've verified with the standard MMD test document.

Thanks,
Tim

User avatar
tiho_d
Posts: 1236
Joined: Tue Sep 13, 2011 1:14 pm
Platform: Linux + Windows

Sat Mar 28, 2020 8:08 pm Post

Make sure that you use the main compile "Metadata" keys, or the specific compile format "Metadata" view keys. If you write them within your text, they will be compiled as text.

I just tested the MMD > HTML compile and the metadata keys got properly exported into the <head>.

ti
timothy
Posts: 18
Joined: Mon Jul 02, 2018 10:01 pm
Platform: Windows

Mon Mar 30, 2020 6:39 pm Post

Thanks for your reply.

While adding it to the metadata in the compile options does seem to work, it should be possible to include the keys in the text.

This worked previously (see Amber's response to my B40 question and linking to standard test file). It's part of the MMD standard and it works using the multimarkdown.exe from the command line. Compiling in Scrivener B43 should produce the same.

Thanks,
Tim

User avatar
tiho_d
Posts: 1236
Joined: Tue Sep 13, 2011 1:14 pm
Platform: Linux + Windows

Mon Mar 30, 2020 7:55 pm Post

Could you please upload a small example project with a document or two. It will be best to trace this further.

ti
timothy
Posts: 18
Joined: Mon Jul 02, 2018 10:01 pm
Platform: Windows

Fri Apr 03, 2020 1:35 am Post

Sure thing, I've attached a project with two files. When I compiled these to HTML with B40 the MMD metadata was correctly inserted. As of B43 (and B44) it compiles the metadata into the body of the HTML file.

Thanks!
Tim
Attachments
mmd-metadata.scriv.zip
(56.78 KiB) Downloaded 12 times

User avatar
tiho_d
Posts: 1236
Joined: Tue Sep 13, 2011 1:14 pm
Platform: Linux + Windows

Fri Apr 03, 2020 3:46 am Post

I am afraid this is the expected behavior. Compiling your project under Mac, produces the same result. As soon as the metadata is part of the main document contents, it will be compiled as part of the main document, Scrivener tries to separate text contents and metadata to easily switch between file formats, and in your document you merge them into one document. As I said, put your metadata in a separate document, name it "Metadata" and make it the first document in your compile list manuscript. This will give you the expected result. Have a look at the documentation too.