PDF outline/bookmarks don't use smart quotes in headings
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 56.1k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
Description
Related to #3662.
Headings rendered with smart quotes (via smartquote show rule or automatic smartening) display correctly in the body of the PDF, but the corresponding PDF outline/bookmark text still shows straight ASCII quotes.
Minimal example
#set text(font: ((name: "Palatino", covers: "latin-in-cjk"), "Noto Serif CJK SC"))
#show smartquote: set text(font: "Palatino")
= English "Quotes" in the heading and 中文“引号”
这是“引号”。“我叫,‘阿毛!’没有应。”
== "Double and 'Single' Quotes"
这是 'smartquote', "double" 和撇号 cha'DIch。
Steps to reproduce
- Save the file above as
quotes.typ. - Compile:
typst compile quotes.typ. - Open
quotes.pdfin any PDF viewer and inspect the bookmarks/outline.
As shown in the screenshot below, the body text shows curly quotes as expected, but the outline/bookmarks show straight quotes like "Double and 'Single' Quotes".
Version
- Typst: 0.14
- Platform: macOS 26.0.1
- How compiled: Typst CLI
- Fonts: Palatino + Noto Serif CJK SC
Reproduction URL
No response
Operating system
macOS
Typst version
- I am using the latest version of Typst
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by compiling the provided quotes.typ example with the Typst CLI and inspecting its PDF outline. Trace the PDF outline/bookmark generation path, focusing on how heading text is extracted compared with the rendered body. Done means the outline preserves the smart quotes produced by the heading while the existing body rendering remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100