Tinymist: Why doesn't "jump from preview to code" work after adding a page background?

After setting up this code:

  set page(
    paper: "a4",
    background: image("background.svg", width: 100%, height: 100%),
    header: context {
      if counter(page).get().first() == 1 {
        none
      } else {
        [
          #title | #subtitle
          #h(1fr)
          #author | #id
        ]
      }
    },
    footer: context {
      let page_number = counter(page).get().first()
      let total_pages = counter(page).final().last()
      align(center)[
        #set text(size: 8pt)
        #page_number / #total_pages
      ]
    },
  )

Onto my template, jumping from preview to code doesn’t work. (Yet from code to preview is OK.)

My workload:

VSCode,
Tinymist Typst,
typst 0.12.0 (737895d7)

My template is on GitHub:
Link

Hey @JStar, welcome to the forum! I’ve changed your question post’s title to better fit our guidelines: How to post in the Questions category

For future posts, please make sure your title is a question you’d ask to a friend about Typst. :wink:


In particular, I’ve noted that your issue seems to be while using Tinymist, a third-party extension. Can you confirm whether you also experience this issue in Typst’s official web app? Can you also check whether there are any compilation errors or warnings?

1 Like

Thank you for your prompt reply, I’ve clarified that this problem does not occur in our official web application. I’ll report this to Tinymist.

In the meantime, is there any other extension I can use to solve this temporarily?