Reprinted from TidBITS by permission; reuse governed by Creative Commons license BY-NC-ND 3.0. TidBITS has offered years of thoughtful commentary on Apple and Internet topics. For free email subscriptions and access to the entire TidBITS archive, visit http://www.tidbits.com/ Marked 2: A Must-Have for Markdown Writers Josh Centers Inspired in part by [1]setext, a lightweight markup language designed for TidBITS in 1992, John Gruber's [2]Markdown revolutionized the way people write for the Web. Writers were freed from coding cumbersome HTML tags or managing bloated Web design apps; Markdown provides a standard method of writing a plain text document that can be easily be converted to HTML for display on a Web site. It's now used in many content management systems, including our own TidBITS Publishing System, where the connection with setext made adoption easy. Book publishing services like [3]Leanpub rely on Markdown too, and Take Control uses Markdown as part of our ebook workflow (see '[4]Celebrating Ten Years of Take Control,' 28 October 2013). Markdown's simplicity has even made writing more accessible, making it easier for the vision-impaired to become authors (see '[5]With Markdown, Even the Blind Can Write,' 18 June 2013). Besides Gruber, the man most responsible for the popularity of Markdown is programmer Brett Terpstra. He has released a [6]plethora of excellent free tools for users of the markup language, including: * nvALT for notes * Markdown Service Tools * TextExpander snippets * Marky the Markdownifier ' which translates HTML into Markdown * MarkdownEditing package for the Sublime Text 2 editor * PopClip extensions * A bundle for the Blogsmith CMS * Markdown QuickTags for the WordPress CMS * Grablinks Safari extension, which grabs Markdown links from a Web page * TabLinks Safari extension, which saves all open tabs as Markdown links But there's one tool Brett Terpstra charges money for: [7]Marked 2, a Markdown previewer. It costs $11.99 directly from Terpstra's Web site, with a free trial available. The original version of Marked is available in the Mac App Store for $3.99, but lacks some of the features of Marked 2. Terpstra told me that Marked 2 may return to the Mac App Store in the future. At first blush, Marked 2 is incredibly simple. Drop a Markdown-formatted text file onto Marked's app icon and a window pops up with a preview of how the file will look on the Web. You can even drag the proxy icon from a text editor's title bar into Marked, and the preview updates every time you save. (I use [8]Gabe Weatherhead's Keyboard Maestro macro to open BBEdit documents in Marked.) The Marked preview shows live links and even images, if you stick to standard Markdown format. [9][tn_Marked-2.jpg] But Marked isn't just a Markdown previewer ' BBEdit users can choose Markup > Preview in BBEdit for that. Instead, Marked goes beyond providing to provide a powerful editing and formatting package that both expands upon Markdown's capabilities and makes you a better writer. Let's take a look at the top features. Statistics -- You might have noticed in the above screenshot that Marked displays a word count at the bottom of the window. Select it (or press Command-Option-S) and it also shows paragraph, sentence, and character counts. If you click the gear icon in the lower right and choose Detailed Statistics (Command-I), Marked displays a lovely set of in-depth stats, including average words per sentence, percentage of complex words, reading ease, grade level, [10]fog index, and even an estimate of how long the document will take to read. From the same menu, you can also choose to display readability statistics at the bottom instead of paragraph, sentence, and character counts. [11][tn_Marked-statistics.jpg] Keywords and Word Repetition -- Even the best writers can get stuck on a certain word, using it over and over, or resort to clichés and junk words like 'very.' There are plenty of tools to check spelling and grammar, but Marked is the only editing tool I've used that addresses these writing tics. To see if you're overusing a word, click the gear icon in the lower right and choose Visualize Word Repetition (Control-Command-W). Repeated words are highlighted in pink, and if you hover over one with your mouse pointer, it darkens the highlight and marks other places where you've used the same word. [12][tn_Marked-2-word-repetition.jpg] To check for verboten words, click the gear icon and choose Highlight Keywords (Command-Shift-H). Marked comes with a dictionary of words and phrases to avoid or find alternatives for, such as: 'actually,' 'very,' and 'really.' It highlights these with four colors: pink for words to avoid, purple for words to find alternatives for, blue for other words you've told Marked to highlight, and green for custom ' which denotes temporary keywords. [13][tn_Marked-2-keyword-highlight.jpg] Temporary keywords are just that ' words you want to highlight for a single document. To set them, select the arrow icon at the bottom or press Command-Shift-K. A pop-up appears with a notepad for temporary keywords. Enter one per line, and click Update to highlight those words in green. [14][tn_Marked-2-keyword-drawer.jpg] It would be nice to be able to create temporary keywords to avoid checking as well. While writing this review, the words 'Marked' and 'Markdown' appear over and over again, but justly so ' the article is about them. I don't need to see them in the list of overused words. To edit Marked's permanent list of words to highlight, click the gear icon and choose Edit Keywords to bring up the Proofing preferences. It provides three tabs: Avoid, Use Alternate, and Other (which corresponds to the blue highlight mentioned above). Each one is a ruled text field, so it's simple to click inside to edit or add. If you screw up, you can restore the defaults for each. [15][tn_Marked-edit-keywords.jpg] Format and Export -- Marked not only previews text, it also formats text, according to a number of built-in themes. The default is Swiss, as indicated in the lower left of the preview window. Select the theme name to display a menu of eight themes, each with a keyboard shortcut. Special note to fiction writers ' the Manuscript theme formats your text as a typewriter-like manuscript. [16][tn_Marked-2-manuscript.jpg] Not enamored of the defaults? You can create your own with standard CSS, if you're familiar with styling Web pages. Create your style sheet as you would normally in BBEdit or CSSEdit or whatever, save it, and then, back in Marked, choose Marked > Preferences and click the Style tab. Click the + button and select your CSS file. [17][tn_Marked-custom-css.jpg] Custom CSS styles aren't just a pretty way of viewing your documents. Once you're previewing a document in Marked, you can copy out HTML or rich text, or export the entire document to PDF, .doc, .docx, .odt, and other text-based formats. Be sure to turn off highlights first, or they'll be embedded in your document! The conversion isn't always perfect, but it offers a tantalizing look at a future where Markdown can easily be turned into any other format. It's sort of like XML for humans. [18][tn_Marked-2-Word-export.jpg] Of course, you can view the HTML of your document at any time, by selecting the angle brackets (<>) in the upper-right corner of Marked's window. Custom Preprocessors and Other Languages -- Marked can handle a variety of markup languages beyond Markdown and MultiMarkdown. It also supports the [19]Fountain screenwriting language, the [20]CriticMarkup editing standard, the aforementioned [21]Leanpub publishing service's Markdown variant, the [22]Mathjax mathematics display engine, and the [23]Discount Markdown variant. Marked can even do tables of contents and chapter splits, so you can in theory use it to help build ebooks. Also, in addition to plain text documents, Marked can also preview documents written in [24]MarsEdit and [25]Scrivener, both of which eschew formatting in favor of form. If you prefer some other markup language, never fear, because you can tie in [26]custom language processors and custom preprocessors, which enable you to add additional languages or specific processing directives. For instance, here at TidBITS, we have specified a custom variant of Markdown that allows the use of what we call 'lazy links,' footnote-style links that use asterisks in place of number references. A bit of Perl code in the TidBITS Publishing System translates lazy links to regular footnote links on the backend. Lazy links may [27]seem a bit nutty to John Gruber, but they let us use Keyboard Maestro macros for automating link creation, make it easy to group links with their associated paragraphs, simplify editing and reordering links, and give us a more accurate preview of how our plain text email edition will look. (Want in on a secret? In the Web version of this article, click the pipe | between this article's category and date to see how we facilitate linking to existing articles.) But Marked doesn't support our lazy links out of the box. I contacted Brett Terpstra to ask him if he could add such support, and to my delight, he was nice enough to write a [28]custom preprocessor that does it for us! He even expanded it with the capability to include [29]linked footnotes. How's that for customer service? So no matter what markup language you use, if it can be translated to HTML, Marked should be able to handle it. Power and Simplicity -- If forced to come up with a complaint, it's that Marked's design language sometimes clashes. For instance, the Detailed Statistics display features iOS 7-like thin text on a white background. But the temporary keyword editor uses a skeuomorphic notepad and switch, on a linen background ' a throwback to iOS 6's visual style. But that's nitpicking. It's incredible how much power has been tucked into what seems like such a simple app. If you compose serious text in Markdown or any of Marked's other supported languages, Marked 2 is a must-have for its word repetition and statistics tools alone ' not to mention [30]many of the features we didn't get around to, such as adapting it for long-form reading. But even more exciting, Marked's powerful formatting and export options take us closer to the day when human-readable, plain text markup languages may largely supplant machine-readable, proprietary file formats for everyday uses. You probably won't be able to design a brochure in Markdown or the equivalent, but for an article, script, manual, or novel, the combination of a lightweight markup language and Marked could eliminate the need for a complex word processor or page layout application. And the beauty of the plain text markup languages is that files using them are readable on any platform, using many different apps. If you still have files locked away in MacWrite or WriteNow format, you know how hard it can be to bring older files in proprietary formats into the present. So if you work with text, and certainly if you're already doing much of your writing in Markdown, give Marked 2 a try. It has earned a permanent spot in my writing workflow, and, if it meets your needs as well, picking up a copy for $11.99 is a great way to show Brett Terpstra some appreciation for all the other writing tools he's given away for free over the years. References 1. http://en.wikipedia.org/wiki/setext 2. http://daringfireball.net/projects/markdown/ 3. https://leanpub.com/ 4. http://tidbits.com/article/14231 5. http://tidbits.com/article/13865 6. http://brettterpstra.com/projects/ 7. http://marked2app.com/ 8. http://www.macdrifter.com/2012/01/marked-preview-for-bbedit.html 9. http://tidbits.com/resources/2013-11/Marked-2.png 10. http://en.wikipedia.org/wiki/Gunning_fog_index 11. http://tidbits.com/resources/2013-11/Marked-statistics.png 12. http://tidbits.com/resources/2013-11/Marked-2-word-repetition.png 13. http://tidbits.com/resources/2013-11/Marked-2-keyword-highlight.png 14. http://tidbits.com/resources/2013-11/Marked-2-keyword-drawer.png 15. http://tidbits.com/resources/2013-11/Marked-edit-keywords.png 16. http://tidbits.com/resources/2013-11/Marked-2-manuscript.png 17. http://tidbits.com/resources/2013-11/Marked-custom-css.png 18. http://tidbits.com/resources/2013-11/Marked-2-Word-export.png 19. http://fountain.io/ 20. http://criticmarkup.com/ 21. http://leanpub.com/ 22. http://www.mathjax.org/ 23. http://www.pell.portland.or.us/~orc/Code/discount/ 24. http://www.red-sweater.com/marsedit/ 25. http://www.literatureandlatte.com/ 26. http://marked2app.com/help/Custom_Processor.html 27. http://daringfireball.net/linked/2013/10/28/lazy-markdown-links 28. http://brettterpstra.com/2013/10/19/lazy-markdown-reference-links/ 29. http://brettterpstra.com/2013/10/30/lazy-markdown-footnotes/ 30. http://brettterpstra.com/2013/11/01/marked-2-tips-long-form-reading-with-marked/ .