emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [TIP/QUERY] Curly quotes in HTML


From: Christian Moe
Subject: [O] [TIP/QUERY] Curly quotes in HTML
Date: Thu, 01 Mar 2012 17:50:07 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

Hi,

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
      (append
       '(("\\(^\\|[ \"(]\\)'" . "\\1‘")
         ("'" . "’")
         ("\\(^\\|[ (]\\)\"" . "\\1“")
         ("\"\\([ [:punct:]]\\|$\\)" . "”\\1"))
        org-export-html-special-string-regexps))

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?

Yours,
Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]