diff options
| author | John MacFarlane <[email protected]> | 2024-10-08 21:58:25 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-10-08 21:58:25 -0700 |
| commit | bdb1172385422d46243e6b5ede31fb6054fade5f (patch) | |
| tree | 66c2612fc4bac967b52905b892cc1e66dd13828f /data | |
| parent | 0b51580e2d0f0c1b5032198efb31f126d3c62e43 (diff) | |
Typst writer: make `smart` extension work.
If `smart` is not enabled, a command in the default template will
disable smartquote substitutions.
When `smart` is enabled, render curly apostrophes as straight
and escape straight apostrophes.
When `smart` is disabled, render curly apostrophes as curly
and don't escape straight apostrophes.
And similarly for quotes, em and en dashes.
This should give more idiomatic typst output, with fewer unnecessary
escapes.
Closes #10271.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/default.typst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/templates/default.typst b/data/templates/default.typst index 1e7b5efd4..8efe33887 100644 --- a/data/templates/default.typst +++ b/data/templates/default.typst @@ -28,6 +28,11 @@ $else$ $template.typst()$ $endif$ +$if(smart)$ +$else$ +#set smartquote(enabled: false) + +$endif$ $for(header-includes)$ $header-includes$ |
