Hello all
Since DEVONthink nicely integrates MultiMarkdown and many users make use of it, I thought it helpful to exchange some tips & tricks. I’ll start with a list below.
For regular users none of these will be new, but (as a fairly new user) I figured them out rather slowly, so I thought I’d share.
Please comment to expand the list!
Cheers
Eeljen
[size=150]1. Render markdown in DEVONthink[/size]
Use shortcut alt-cmd-P to quickly switch between the rendered view and the raw text.
Personally I prefer to display this preview by default. Chose your default under Preferences > Media.
For more thorough writing and editing, I suggest using an external editor (such as Byword or iAWriter).
[size=150]2. Include a custom .css file[/size]
Add a custom .css file to render markdown with a html-snippet. Just add the following link to your markdown documents:
<link href="file://Users/path/to/css_file.css" rel="stylesheet">
Make your own or use some existing styles, here for example: https://github.com/ttscoff/MarkedCustomStyles
Reusing the same file in all of your documents allows for easy adjusting of the style.
You could also use a DEVONthink link (see below) to refer to the CSS file
Additional tips:
- For easier access, add this code snippet to text replacements under System Preferences > Keyboard > Text. Make sure ‘Text Replacement’ is enabled in DT under Settings > Editing
- Save a custom template that includes this code snippet, so that you have it in all your new markdown notes.
[size=150]3. Link to headers[/size]
Link straight to a header within your document.
If you have a header called ‘## Topic 1’, you can link to it in MarkDown, with: ```
[link][Topic 1]
[size=150][b]4. Include a Table of Contents[/b][/size]
To include a Table of Contents, add ```
{{TOC}}
```.
Note that this only generates consecutive headers, starting from base 1. So if you use headers #, ## and #### in a file, the TOC will only include # and ##.
[size=150][b]5. Use devonTHINK links[/b][/size]
This is rather basic, but while I'm at it:
Use [i]x-devonthink-item://[/i] links just like you would use normal links. This works for links to other devonTHINK records, but also when embedding images.
Two examples:
This should also work when linking to the .css stylesheet (see tip above).