From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: [TIP/QUERY] Curly quotes in HTML Date: Thu, 01 Mar 2012 17:50:07 +0100 Message-ID: <4F4FA8BF.1070903@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S39EL-0003uj-TI for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 11:51:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S39EG-0001Hs-IR for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 11:51:49 -0500 Received: from b1.hitrost.net ([91.185.211.67]:44940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S39EG-0001Av-Br for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 11:51:44 -0500 Received: from lk.92.63.17.213.dc.cable.static.lj-kabel.net ([92.63.17.213] helo=Celebrian-2.local) by b1.hitrost.net with esmtpa (Exim 4.76) (envelope-from ) id 1S39De-0007dr-N4 for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 17:51:06 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode 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