When I type English, I usually use straight quotes ('/"), especially in Emacs, as curly quotes (‘’/“”), though available from the keyboard, are difficult to see with the fixed-with font I prefer.

I have put this in my .emacs to get curly-quote output in HTML export:

(setq org-export-html-special-string-regexps
       '(("\\(^\\|[ \"(]\\)'" . "\\1‘")
         ("'" . "’")
         ("\\(^\\|[ (]\\)\"" . "\\1“")
         ("\"\\([ [:punct:]]\\|$\\)" . "”\\1"))

The advantage of going through org-export-html-special-string-regexps, I think, is that Org does smart replacements, so I don't accidentally e.g. replace straight quotes in code blocks. The regexps catch most combinations of quotes and punctuation.

Query: Anyone using any other, perhaps better, tricks?


Reply via email to