emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [TIP/QUERY] Curly quotes in HTML
@ 2012-03-01 16:50 Christian Moe
  2012-03-02  2:23 ` Samuel Wales
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Moe @ 2012-03-01 16:50 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-02  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01 16:50 [TIP/QUERY] Curly quotes in HTML Christian Moe
2012-03-02  2:23 ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).