typst / webapp-issues

Issue tracker for Typst's web app.
https://typst.app
12 stars 0 forks source link

Customized outline rendering page numbers incorrectly in 0.11.1 #358

Open jacquesjurgens opened 4 months ago

jacquesjurgens commented 4 months ago

Description

I customized the layout of my oultine/TOC and it rendered perfectly in previous versions of Typst. However, in 0.11.1 it renders all page numbers as 1.

show outline.entry: it => { box(width: 1fr,align(right)[

link(it.element.location())[

    #it.element
  ]
])
box(width: 1em)[·]
box(width: 1fr,align(left)[
  #link(it.element.location())[
  _
  #text(fill: gray)[page] #it.page
  _]
])

}

show outline.entry.where( level: 1 ): it => { v(1em) strong(it) }

show outline.entry.where( level: 2 ): it => { v(0.2em) it }

align(center)[

outline(

  title: [
    #set text(fill:eastern, size: 18pt)
    Contents
    #v(0.5em)
  ],
  indent: false,
  fill: none
)

]

Reproduction URL

No response

Browsers

Safari

OS

macOS

TheJanzap commented 4 months ago

This appears to be a problem with the Typst compiler, not the web app specifically. Please report there https://github.com/typst/typst/issues