Skip to content

PDF outline entry is incomplete when rubby is used in a heading title #6

@maxigaz

Description

@maxigaz

If I use rubby inside the title of a level 1 heading, none of the arguments inside the ruby function will show up in the outline of the PDF document.

Here's a minimal example:

#import "@preview/rubby:0.10.2": get-ruby

#let ruby = get-ruby(
  size: 0.5em,         // Ruby font size
  dy: 0pt,             // Vertical offset of the ruby
  pos: top,            // Ruby position (top or bottom)
  alignment: "center", // Ruby alignment ("center", "start", "between", "around")
  delimiter: "|",      // The delimiter between words
  auto-spacing: true,  // Automatically add necessary space around words
)

= Dialogue and Grammar (#ruby("かいわ", "会話")・#ruby("ぶんぽう", "文法")#ruby("へん", ""))

= Reading and Writing (#ruby("", "")み#ruby("", "")き#ruby("へん", ""))

If I compile this with typst and open it with Evince under Arch Linux, this is what I see when I enable the side pane and the outline view:

Output + PDF outline (bright image)

Image

In other words, this is what I expect to see on the left:

Dialogue and Grammar (会話・文法編)
Reading and Writing (読み書き編)

And this is what is actually displayed instead:

Dialogue and Grammar (・)
Reading and Writing (みき)

I can reproduce the same in Zathura (using the mupdf backend) on Arch Linux as well. (In that application, the outline view can be toggled by pressing the Tab key by default.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature requestupsteamHave to wait to be resolved upstream

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions