Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Jump from preview to code” work after adding a page background #1031

Open
jstar0 opened this issue Dec 20, 2024 · 2 comments
Open

"Jump from preview to code” work after adding a page background #1031

jstar0 opened this issue Dec 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jstar0
Copy link

jstar0 commented Dec 20, 2024

Describe the bug
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.)

This only happens in Tinymist, not in the official web editor!

My template is on GitHub.

Package/Software version:

VSCode version(Help -> About):

Version: 1.96.1 (user setup)
Commit: 42b266171e51a016313f47d0c48aca9295b9cbb2
Date: 2024-12-17T17:50:05.206Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

tinymist extension version:

In VSCode Marketplace:

Identifier myriad-dreamin.tinymist
Version 0.12.12
Last Updated 2024-12-17, 13:52:27

Logs:

tinymist server log(Output Panel -> tinymist):

[2024-12-20T01:09:41Z INFO  reflexo_typst2vec::pass::span2vec] pass check remote path([ElementPoint { kind: 4, index: 0, fingerprint: "" }, ElementPoint { kind: 1, index: 0, fingerprint: "" }, ElementPoint { kind: 1, index: 0, fingerprint: "" }, ElementPoint { kind: 1, index: 12, fingerprint: "" }, ElementPoint { kind: 1, index: 1, fingerprint: "" }, ElementPoint { kind: 1, index: 8, fingerprint: "" }, ElementPoint { kind: 0, index: 7, fingerprint: "" }, ElementPoint { kind: 5, index: 6, fingerprint: "" }])
[2024-12-20T01:09:41Z INFO  reflexo_typst2vec::pass::span2vec] pass check remote(4, 0) => Page { region: 7 }
[2024-12-20T01:09:41Z INFO  reflexo_typst2vec::pass::span2vec] pass check remote(1, 0) => Group { region: 10 }
[2024-12-20T01:09:41Z INFO  reflexo_typst2vec::pass::span2vec] pass check remote(1, 0) => Group { region: 19 }
[2024-12-20T01:09:41Z INFO  typst_preview::actor::render] RenderActor: failed to resolve span: not found: with []
[2024-12-20T01:09:41Z DEBUG typst_preview::actor::render] RenderActor: has_full_render: false
[2024-12-20T01:09:41Z DEBUG typst_preview::actor::render] RenderActor: waiting for message

tinymist client log(Help -> Toggle Developer Tools -> Console):

element path (7) [Array(3), Array(3), Array(3), Array(3), Array(3), Array(3), Array(3)]
VM8:5927 batch 1 messages
VM8:5948 recv diff-v1 388
VM8:1389 render_in_window with partial rendering enabled window 1.0511463844797178 0 1.0493215471768926 608.6137566137565 435.17460317460313 , patch scale 1686
VM8:370 parse 0.10 ms, rerender 0.70 ms, total 0.80 ms
VM8:1833 updateCanvas start
VM8:1873 updateCanvas done 42.400000005960464

Additional context
This only happens in Tinymist, not in the official web editor!

@Myriad-Dreamin
Copy link
Owner

Could you share the project on webapp to reproduce?

@Myriad-Dreamin Myriad-Dreamin added the bug Something isn't working label Dec 20, 2024
@Eric-Song-Nop
Copy link
Collaborator

here it this his project: https://typst.app/project/ry26D7fiY6DzdkGA62bejO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants