Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get smart quotes on org-mode export?

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 ?

like image 327
incandescentman Avatar asked Feb 26 '13 18:02

incandescentman


People also ask

What is a smart quotation?

“Smart quotes” are the ideal form of quotation marks and apostrophes, and are commonly curly or sloped. "Dumb quotes," or straight quotes, are a vestigial constraint from typewriters when using one key for two different marks helped save space on a keyboard.

How do I export org files?

To export the currently opened buffer to another file format, you should use the :Neorg export to-file command. The command takes the following arguments: path - the path to export to. Examples are: my-file.md , ~/output.md .


3 Answers

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

like image 179
incandescentman Avatar answered Oct 22 '22 02:10

incandescentman


#+LANGUAGE: de
#+OPTIONS: ':t

also does the right thing now

like image 25
Erich Neuwirth Avatar answered Oct 22 '22 02:10

Erich Neuwirth


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.

like image 40
Ista Avatar answered Oct 22 '22 00:10

Ista