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

typst v0.12 的更新破坏了此模板 #6

Open
Zxilly opened this issue Oct 20, 2024 · 1 comment
Open

typst v0.12 的更新破坏了此模板 #6

Zxilly opened this issue Oct 20, 2024 · 1 comment

Comments

@Zxilly
Copy link

Zxilly commented Oct 20, 2024

  • style 现已被弃用,需要修改为 context 表达式,影响 #sidebar
  • measure 的 styles 参数现已不生效
  • show par: set block(spacing: 0.6em) 已不生效,需要修改为 set par(spacing: 0.6em),并且似乎作用域也出现了变化
@Zxilly
Copy link
Author

Zxilly commented Oct 20, 2024

编译 resume.typ 现在会引发以下 warning

warning: `style` is deprecated
    ┌─ \\?\T:\Chinese-Resume-in-Typst\template.typ:103:62
    │  
103 │   #let sidebar(side, content, withLine: true, sideWidth: 12%) = style(styles => {
    │ ╭───────────────────────────────────────────────────────────────^
104 │ │   let sideSize = measure(side, styles)
105 │ │   let contentSize = measure(content, styles)
106 │ │   let height = calc.max(sideSize.height, contentSize.height) + 0.5em
    · │
122 │ │   )
123 │ │ })
    │ ╰──^
    │  
    = hint: use a `context` expression instead

warning: `show par: set block(spacing: ..)` has no effect anymore
   ┌─ \\?\T:\Chinese-Resume-in-Typst\template.typ:77:2
   │
77 │   show par: set block(spacing: 0.65em)
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   │
   = hint: write `set par(spacing: ..)` instead
   = hint: this is specific to paragraphs as they are not considered blocks anymore

warning: calling `measure` with a styles argument is deprecated
    ┌─ \\?\T:\Chinese-Resume-in-Typst\template.typ:104:17
    │
104 │   let sideSize = measure(side, styles)
    │                  ^^^^^^^^^^^^^^^^^^^^^
    │
    = hint: try removing the styles argument

warning: calling `measure` with a styles argument is deprecated
    ┌─ \\?\T:\Chinese-Resume-in-Typst\template.typ:105:20
    │
105 │   let contentSize = measure(content, styles)
    │                     ^^^^^^^^^^^^^^^^^^^^^^^^
    │
    = hint: try removing the styles argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant