* [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
* Re: [TIP/QUERY] Curly quotes in HTML
2012-03-01 16:50 [TIP/QUERY] Curly quotes in HTML Christian Moe
@ 2012-03-02 2:23 ` Samuel Wales
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Wales @ 2012-03-02 2:23 UTC (permalink / raw)
To: mail; +Cc: Org Mode
I like -- for mdash and === for separator:
(setf org-export-html-special-string-regexps
`(
("^-----$" . "<hr/>") ;see also === below
("---\\([^-]\\|$\\)" . "—\\1")
("--\\([^-]\\|$\\)" . "—\\1")
("^===$" .
"<hr width=\"10%\";
style=\"width:10%;color:#000;background-color:#000;height:1px;border:none;\"
/>")
,@org-export-html-special-string-regexps))
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
^ 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).