How to handle images in (Multi)Markdown text

Markdown is a language built for plain texts. The biggest weakness of plain texts is they can not hold images in them. To complement this fundamental weakness of plain texts, I have developed a system that works between Hazel, Dropbox and Keyboard maestro. The idea is simple. Create a permanent folder in Dropbox that you will maintain for the rest of your life. Whatever text you are writing in, whatever application you are using, always save and point to that specific folder. My folder lives in Dropbox. I call it simply Images. All of the pictures (images) that are part of my text notes are stored in this folder. Most of these images are made by snapshotting from the pdf files and online sources. For that matter, I made my mac to save all the screen-shoots  to automatically save in that folder. ok, let me write it like in steps:

  1. Make a folder in Dropbox: call it Images
  2. Make your mac to save the screen-shots in Images. Follow the steps in here to accomplish it

  3. Make a hazel rule to rename the screen-shots to a sequence of numbers (or some other pattern you like)

  4. Embed an applescript inside Hazel that will copy the file name of the image to clipboard

Look at the rule I made in Hazel: first only the rule;

ppic341

then with the script:

ppic342

 

Finally, use a Keyboard maestro macro to get the location of the image as well as the file name.

ppic343

That is it. What you need is just to snap the image from the PDF then, write “ppic” in your plaintext file. A link to your image will be inserted; and any markdown previewer (Marked for example) include the image in the preview.

A short Comparison of (Multi)markdown editors

 

 

  • Scrivener: unless I have combined it with Marked, Scrivener can not live preview the text.
  • Marked: Marked is not an editor by itself. It is rather just a viewer for the text. So, it can help me in complement with others, but not a real editor by itself. he problem with Marked is: it doesn’t seem to support MMD, as the tables are getting misplaced, I observed
  • Byword: many people seem to like this app, but, seems really blank text editor. May be, I have to check it back, but now, I don’t like it.
  • Markdown Pro: this seems a great editor. There is no much fancy preference here either; but it can preview and edit at the same time + nice themes are available to it. It has a spell-checker and copy as HTML features, both are great for publishing in a blog. A JosephCrawford has suggested to additional features for MD Pro– sync scrolling and project management–both of which I totally second.
  • nvAlt: is probably the best of all, as it is already my favorite text editor anyways. As it does manage notes, and synchronize with Simplenote, as well as edit MMD, nvAlt is indispensable any ways. The point about nvALT is, I don’t want to use it serious academic writing. I want to keep it for simple, personal notes. More powerful tools such as scrivener are my choices for the academic stuff.
  • IAwriter: Anther popular editor. Many people seem to like it for the minimalist environment it creates. Probably, that is a great idea. I also like the interface of the app. But, it can not preview, which is crucial to correct my mistakes immediately and see if I am doing it write. It also can not copy the MMD text to HTML. So, it is easy for me to decide about it: trashed! I would finally say, there is nothing that Markdown Pro lacks and IAwriter and Byword have.

I have heard of two other great MMD editors: MMD composer and Folding Text. Until I try them, I will use nvAlt and Markdown Pro. The former for personal notes; the latter for star up drafting of my academic works before they finally go to Scrivener. The idea is, I will write the text in MD pro until it grows complex, beyond a few pages, say 5 pages, and them move it to Scrivener to fully develop it.

Alternative to Multimarkdown?

For the last two days, I have been hustling with markdown language. The main advantage of Markdown language is:

  • it works across many platforms
  • I don’t have to struggle to export to Ms whenever some crazy pulisher asks me to do so
  • easy to pulish my work into the web, as Markdown nativly supports xHTML
  • publish my work to ebook (epub) if I want to with no much pain
  • plaintexts are great for sharing too; i don’t have to do heavy editing if I want to send my plaintext for comment to sb. I can just send the MMD format while the Latex is scary for the uninetiated.
  • Scrivener natively supports; easy to manage my projects in it, with no much difficulty to publish it in Latex

So, the point is: MMD seems the future, and the solution for me. But, I am now confused to learn that Multimarkdown is not the standard format for Markdown. I discovered another strong contender for it–Pandoc. Pandoc seems even better in many areas;  as the comparison of the two languages here shows.

Some realistic advantages of Pandoc over MMD:

  • Example lists: pandoc supports running example lists running througout the document. This is not a choice, rather a necessity for me.
  • Better  number lists: shifting from roman to arabic number listing inside a block is possible
  • strickeout ~~like so~~ , superscripts as Mister^2^, inline footnote as^[here is note]
  • Better referencing and bibliography. But, I think the referencing in MMD is sufficient for me
  • latex commands can be directly inserted into the Pandoc text; MMD needs HTML comment

 

Advantages of MMD over Pandoc

  • images and links are managed better in MMD
  • some of the footnotes can automatically conveted as glossary in MMD
  • tables are better managed in MMD, more readable, column spannings are supported, only single line cells; there is not row and column spanning in Pandoc, cells could be multilple lines.
  • metadata, MM is more flexible
  • Natively supported by many applications including Scrivener.

For now, I will be sticking with MMD just because of Scrivener, and fix the weakness  of MMD (modify my final document) inside the Latex itself. If Scivener happen to support Pandoc in the future, I might migrate to Pandoc. Best of all, I hope the two developers would cooprate and make up the best out of the two domains. That will be nirvana for the regular user, like me.