Cleaning Up Markdown Footnotes

Just a quick update to an old post on Markdown footnotes.

I do all of my writing in Markdown, from these blog posts to academic papers. As I’ve written before, one of the trickiest things I find about academic writing in Markdown is footnoting. My solution—outlined here—is to use TextExpander to create timestamps and then page down to post them at the bottom. It works great, except for the fact that to engage the snippet (in my case “;ffn”) you have to leave a space after the end of the sentence, thus creating a gap before your footnotes.

To clean all of those up in one fell swoop, I wrote a super simple service that will do it for you using sed and grep searching. You can download it here.

Even more interestingly, I learned that MMD4—which is included by default in Marked 2—features a new syntax for inline footnoting: simply adding [^text to be footnoted] to the end of a sentence. I can see this being super useful for certain short-form projects, though I still like to look at all my links at the bottom to see if a sources has been cited multiple times, ibid usage, etc.

Update: Since posting this, I realized that you can set TextExpander to expand after any character on a group-by-group basis using the “Expand After” setting. For your academic Markdown, you can set this to “any character” and then you won’t need that script at all!



comments powered by Disqus