Smart quotes, dashes and ellipses in PDF

Straight quotes become curly ones, hyphens become en and em dashes, and three dots an ellipsis. Code is never touched, which is where a simple search and replace goes wrong.

"Straight quotes" turn curly, -- and --- become dashes, ... becomes an ellipsis, and code is never touched. Toggle: smart_typography.

Markdown source

Markdown · 21 lines
# Smart typography

"Straight quotes" become curly quotes, 'single ones' too, and it's clever about
apostrophes in it's, don't and the '90s. Two hyphens -- like these -- become an
en dash, three --- like these --- an em dash, and three dots... become an ellipsis.

Ranges and numbers read better for it: pages 12--18, the 2024--2026 season,
a 3--2 result, and -40 °C is the same as -40 °F.

Code is never touched: `"quotes" -- stay -- literal...` and so does a fenced block:

```
"straight" -- here --- and...
```

Two ways to force a line break inside one paragraph, for addresses and verse:

Dr. Amara Okafor
Institute of Marine Research  
Pier 4, Harbor Road \
Wellington

Rendered pages

PDF · 1 page · 11 KB
  1. Smart typography & hard breaks, page 1 of 1

The sample documents describe invented organizations in several countries. All names and figures are illustrative.

Markdown text and structure in PDF: every sampleIn the Markdown reference