Correct Quotation Marks

There are few things as ugly, typographically speaking, as the straight quotation marks that are the default in most fonts. When you’re writing something that’s going to be rendered with proportional fonts, it’s easy to do the right thing and use left and right rounded quotation marks.

Artur Malabarba has a nice post up with a bit of Elisp to insert correct quotation marks in a context aware way. If you want a set it and forget solution, Malabarba’s is a good one. Just add his code to your .emacs or init.el file.

I do something simpler that requires me to decide when I want round quotation marks. I use the key-chord package that allows me to bind commands to key chords. It’s not context aware but it works well for me. When I want to insert proper quotation marks, I just press 【"】twice rapidly. If you want to use this solution, all you have to do after installing the package is add

(defun dq ()
  "Insert double quotes in an org buffer."
  (interactive)
  (insert "“”")
  (backward-char))

(key-chord-define-global "\"\"" 'dq)

to your .emacs or init.el file. If you want to use this, the names of the proper glyphs are:

  • “ – LEFT DOUBLE QUOTATION MARK
  • ” – RIGHT DOUBLE QUOTATION MARK

Now you have two solutions so don’t let me see those ugly quotation marks in your writings anymore.

This entry was posted in General and tagged . Bookmark the permalink.