Is there no way to indicate the document title in a Markdown document?
I've come to use Markdown with Sublime Text to prepare many of my personal and business documents. I often want to have a kind of "top level" heading analogous to the Title style in Word, for example. So, for example:
### Things to Do ### At Home ======= * Mow the cat * Feed the lawn At the Office ============= * Learn Markdown * Use Big-O notation in a clever way
But the ### Things to Do ###
line is not respected by Markdown, and I don't know an alternative. Is there one?
I could use the Heading 1 style for the title and then Heading 2 for the rest, but if I need a deeper nesting of headings, I quickly run out of depth. And, after all, a title fundamentally isn't a heading per se. It would be nice, for example, if Markdown-to-HTML parsers used the Title for the page <title>
as well as for a top-of-page header a la Word titles.
You can set the title metadata on the command line: --metadata=title:"Document Title" . @MichaelChirico, any way to do that with the title in the document (not -T , not --metadata title="annoying" ), in pandoc 2.11 ?
Add tags to your markdown files You add tags by defining them in the frontmatter of your Markdown file. The frontmatter is the area at the top surrounded by dashes that includes post data like the title and date. I went to the zoo today.
Span-level HTML tags — e.g. <span> , <cite> , or <del> — can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.
If you are referring to pandoc markdown specifically the simplest approach is to use '%', e.g.
% Document Title # Header 1 content ## Header 2 ## Header 2
see http://pandoc.org/README.html#metadata-blocks for more information on pandoc markdown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With