typst / typst/typst

PDF outline/bookmarks don't use smart quotes in headings

Open
#7,230 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug pdf
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
  1. Save the file above as quotes.typ.
  2. Compile: typst compile quotes.typ.
  3. Open quotes.pdf in 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".

Image

quotes.pdf

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.