Using Semantic Text and Markdown with DEVONthink
As an introduction, for the most part I have switched from writing and taking notes in Rich Text (RTF) to using plain text files as editing RTF files on an iOS device is not possible at this time. What I missed with plain text files is the ability to add meaning to the text such as:
- Bold and italic styles;
- Simple lists;
- URLs, images, etc.
I began using Markdown (and it’s super-charged cousin, MultiMarkdown) to add semantic structure to these plain text documents and I’ve really settled in nicely to this workflow. I was already familiar with semantic writing as I was introduced to the concept years ago with the word/text processor Ulysses and John Gruber’s Markdown *1 (and Fletcher Penny’s MultiMarkdown) is currently very popular when writing for the Web. It is not my intent to go into detail here on using Markdown, other than to demonstrate how I am using it with DEVONthink Pro.
The first thing that you will notice about markdown with .txt documents is that using Quick Look with the documents produces a viewer with all the Markdown tags still visible.
Quick Look of a .txt document in DEVONthink:
Fortunately, Fletcher Penny *2 has created Quick Look viewers for MultiMarkdown that can be used anywhere on the Mac where you want to preview a document with Quick Look. As MultiMarkdown is an extension of Markdown, this also works with any document that uses plain MarkDown syntax. Plain text documents must be saved with a .markdown or .md extension to be recognized by the Quick Look viewer. They are still plain text files and can be edited with a plain text editor, such as the built-in editor in DEVONthink.
Viewing the same text document, saved with a .md extension, in DEVONthink, using Penny’s Quick Look viewers:
As well as this workflow works for me, today it gets even better. Brett Terpstra *3 has just released Marked (available in the Mac App Store) that shows an HTML preview of Markdown text in any text file (.txt, .md, .markdown, etc.) while being edited in any text editor, including DEVONthink. The preview is live as the document is saved, and includes document statistics, exports to HTML, prints to PDF, and the Marked window floats above other windows.
This allows you to open a text document in a new window in DEVONthink, open the document in Marked, view the windows side-by-side (Flexiglass *4 is a nice utility to position the windows), and see the preview of the text document as you edit it-sweet!
Here is a view of the text document in DEVONthink on the left, and the same document viewed with Marked on the right. I’ve intentionally overlapped the Marked window so that the image will be a manageable sized when viewed here on the forum.
And here is the PDF document, printed from Marked to the DEVONthink Global Inbox.
While I’ve only touched on how Markdown and Marked can be used in DEVONthink, I should mention briefly how this all relates to the iOS, which is where the utility gets really exciting. I save all these text files to Dropbox and index the Dropbox folder in DEVONthink. I also sync the indexed Dropbox folder to DEVONthink To Go, so I can also view and edit documents in DEVONthink To Go and keep the text files together with other related project documents from DEVONthink.
When I create new text files or text snippets in DEVONthink, I use the ‘Move to External Folder’ command to move them to Dropbox. The text files are then available to other applications, such as nvALT, Brett Terpstra’s fork of Notational Velocity. nvALT recognizes OpenMeta tags, which means that tags assigned in DEVONthink will appear in nvALT and vise-versa. The text files in Dropbox are available in a nearly countless number of text editing applications available for iOS, which makes creating and editing documents on the go very painless. Many of the iOS applications, such as Notsey, also have Markdown preview.
The use of Markdown has been very helpful to me and I am really excited about using Marked with my text documents. If you want another look at how this works, the .txt document of this post that I created in DEVONthink can be downloaded from CloudApp here (click on Direct Link to download), and the PDF output from Marked can be downloaded here. Enjoy!