mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Smartypants aka automatic microtypography support?

Open virtualritz opened this issue 3 years ago • 0 comments

See here. Rustdoc has automatic built-in support for this since a while. It is mosly apparent with single and double quotes are getting turned into proper quotation marks but also has support for n & m dashes, ellipses etc.

Basically this turns something like:

"He took the boat Paris---Rome ... When he arrived he exclamated -- instantly -- 'Heureka!'."

Into:

“He took the boat Paris—Rome … When he arrived he exclamated – instantly – ‘Heureka, I found a secret waterway!’.”

See also the markdown-it demo for more typographic replacements this could do.

Since mdBook has support for languages an extra cool feature would be to turn ' and " into localized quotes when the resp. language is set in book.toml.

virtualritz avatar Nov 24 '22 17:11 virtualritz