Influenced by all the forum talk of the advantages of Markdown, I’m giving it a whirl, but some things seem so much more difficult, at least now, for the flow of writing. I’m sure I’ll have more questions, but in the meantime, I’m seeing that using the simple colon causes my text to change color, so I’m assuming it’s used for other purposes. How does one write a simple colon? e.g. “Type: Markdown” I looked at a few webpages but still not clear.
Also, from the help, I’m not clear on how to create metadata headers:
Metadata: One of the features of MultiMarkdown is metadata headers. These allow you to add non-displaying information about the document, like authors, dates, and even linked stylesheets. To use the feature, format the first line of the document with a colon, e.g., Author: DEVONtechnologies. This must be the first line of the document. Other metadata fields you wish to add must follow immediately after this first line.
However, if you would like the first line of your document to contain a colon, perhaps adding notes like Developer: A. Edwards and Re: OCR, just add a single blank line at the top of the document and the subsequent lines will be treated as normal paragraphs.
In this example, how does DT know that this is metadata? And when it ends? The space before each colon? The fact that it’s the first line? I thought one had to put a colon at the end of the metadata (and then I’m not sure what this means, but also “metadata value”).
Also, I had a colon somewhere far down in my text and it also changed color (maroon-ish and blue)…why the color change at all?
Basically what I want to do something along these lines.
This is specified in the markdown dialect used by DT, namely Multimarkdown. If you throw that at the search engine of your choice, you’ll get more information.
thanks. I did find this below, but I’m still not clear on what the rule is. Can one use YAML? In this case, e.g. I put — before and after my metadata, but otherwise, is the rule that any text with a colon starting on the first line and ending with a line after is automatically metadata (and does every line have to have a colon in it?)–not sure why I’m not understanding how it works.
MultiMarkdown Metadata
The older and simpler MultiMarkdown Metadata is actually incorporated into a few Markdown parsers. While it has more recently been updated to optionally support YAML deliminators, traditionally, the metadata ends and the Markdown document begins upon the first blank line (if the first line was blank, then no metadata). And while the syntax looks very similar to YAML, only key-value pairs are supported with no implied types. Here is an example from the MultiMarkdown docs:
Title: A Sample MultiMarkdown Document
Author: Fletcher T. Penney
Date: February 9, 2011
Comment: This is a comment intended to demonstrate
metadata that spans multiple lines, yet
is treated as a single value.
CSS: http://example.com/standard.css
The MultiMarkdown parser includes a bunch of additional options which are unique to that parser, but the key-value metadata is used across multiple parsers. Unfortunately, I have never seen any two which behaved exactly the same. Without the Markdown rules defining such a format everyone has done their own slightly different interpretation resulting in a lot of variety.
The one thing that is more common is the support for YAML deliminators and basic key-value definitions.
Edit: You already have the link to the relevant MMD5 explanation of metadata. All your questions (does it do YAML, do I need colons etc) are answered there.
thanks… i did read that before posting, but alas, it’s over my head. I’m not getting what starts/ends metadata, whether I can use YAML, why my text changes color, both in the first line and in the text below, and why wikilinks are not clickable in metadata.
Metadata start at the first line of the file if and only if there’s a colon on that line.
There can optionally be a --- on the line before and after the metadata. The line after the metadata can also be .... This is to provide better compatibility with YAML, though MultiMarkdown doesn’t support all YAML metadata.
If there’s someting unclear about that, please point out what.
As I said: This is a bug, and you should open a new thread for it.
Metadata is processed as plain text, so it should not include MultiMarkdown markup.
What is not clear about that? If you put [[link]] in your metadata, you’ll get exactly that, namely [[link]] in your metadata. Plain text. You should not include MMD markup in your metadata. (I hinted at that before, btw). If you do use markup, it will not do what it does in the rest of the file. Like putting _italic_ text in your meta data - it will not come out as italic.
This kind of comment is completely uncalled for, even if you think it is honest. The forum is not about judging how long it takes someone to understand something but about helping them. If you do not want to do that, that’s fine too.