Home | Appendix

|  |  | Markdown Documents

Markdown is a simple formatting language invented by John Gruber that has gained in popularity over the past few years. It allows you to write in plain text, using some easily learned control characters, to produce nicely rendered HTML output. With some styling and ingenuity, you can create a wide variety of documents. Markdown files can be imported or created via Data > New > Markdown text. Writing Markdown is essentially the same as writing plain text documents. As you're writing you can switch easily between a plain text editor and the rendered view or even view both simultaneously using the side-by-side view. Styling: Styling your Markdown documents can be done with internal styling or externally referenced stylesheets. If you have a specific stylesheet you'd like to use globally, you can specify one in Preferences > Media > Style Sheet.. Here are the options: Internal styling: `<style type="text/css"> … </style>` HTML Link: `<link rel="stylesheet" type="text/css" href="css/styles.css" />` XHTML Link: `CSS: css/styles.css`. XHTML headers must be placed at the very top of the document.
Note: If no specific styling is applied, the font choice in Preferences > Editing > Rich Text & Note Font will be used when previewing Markdown documents.
Linking: You can reference local images, scripts, and other resources using item links, downward-relative (traveling subgroups; it's not possible to travel up with '..' as documents can have multiple parents) or absolute (start with a forward slash) paths. Here are examples of linking an image: `![link](item.png)`: Use this when linking to an item in the same group as the Markdown document. `![link](group/item.png)`: Use this when linking to an item in a sub-group of the group containing the Markdown document. `![link](/group/item)`: Use this when you are linking to an item in a group outside the group containing the Markdown document. For example, if you have common resources in a specific group, you can link to them using this format. If you have enabled automatic WikiLinks > Names & Aliases, documents can be detected as you write your Markdown. These WikiLinks are active when previewing the file and are also preserved in a website export or conversion to other formats. Drag items into the Markdown document in edit mode and have links automatically created. If the dropped file is an image, add an exclamation point before the dropped item's name, it will create a proper Markdown formatted image link. Another option for inserting links into Markdown documents, Control-click while editing and choose Insert Link To from the contextual menu. A Markdown formatted link will be automatically inserted for you. For images, just add an exclamation point before the link if you want it to display in the rendered document. You can learn more about Markdown and its syntax on Gruber's Markdown pages or the MultiMarkdown syntax guide. 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. Emoji: For a little extra personalization, you can type Slack-style emoji, like `:grinning:`, directly in the Markdown document.
Note: DEVONthink supports many features of MultiMarkdown 6, but not all of them (e.g., no file transclusion).
Navigation Bar When working with Markdown documents, you can switch between Preview and Source modes. There also is a special icon present in the navigation bar. This switches to Side-by-Side mode, allowing you to edit and preview the current document in two side-by-side panes.