how to get smart quotes on org-mode export?

2020-07-05 06:32发布

How do I get Emacs org-mode to create proper typographic marks when I export to HTML, including converting straight quotes to smart quotes ("curly quotes") and converting hyphens --- to m-dashes ?

4条回答
We Are One
2楼-- · 2020-07-05 06:54

This is now built into org-mode 8.x. To activate it, add the following to your Emacs configuration file:

(setq org-export-with-smart-quotes t)

It works for single quotes, double quotes, and apostrophes.

Source: @Ista

查看更多
Viruses.
3楼-- · 2020-07-05 07:11

This is only available in very recent versions of org-mode. If you are not already running the latest git version see http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development for instructions on upgrading. Then (setq org-export-with-smart-quotes t) will do what you want with quotes, and m-dashes will also be exported correctly.

查看更多
SAY GOODBYE
4楼-- · 2020-07-05 07:14

A way to insure that smart quotes are entered in your org file is to insert the code at the following url into your init.el file. Then type M-x smart-quotes-mode and your all set.

https://github.com/gareth-rees/smart-quotes/blob/master/smart-quotes.el

MNH

查看更多
戒情不戒烟
5楼-- · 2020-07-05 07:17
#+LANGUAGE: de
#+OPTIONS: ':t

also does the right thing now

查看更多
登录 后发表回答