howardlau1999/sysu-thesis-typst

error: module `calc` does not contain `rem`

Closed this issue · 2 comments

命令行输入: typst --font-path fonts compile thesis.typ
显示如下内容,抱歉从命令行拷贝过来,位置都发生变化了,主要意思就是calc里面没有rem,然后这个就造成了一系列的问题。
我采用的是windows版本的typst.exe,最新版本的,刚才下载的。
不知道有什么建议可以处理这个问题,谢谢了!

error: module calc does not contain rem
┌─ functions\booktab.typ:17:39

17 │ content_aligns.push(aligns.at(calc.rem(i, aligns.len())))
│ ^^^

help: error occurred in this call of function booktab
┌─ chapters\ch01.typ:180:5

180 │ #booktab(
│ ╭──────^
181 │ │ width: 100%,
182 │ │ aligns: (left, center, right),
183 │ │ columns: (1fr, 1fr, 1fr),
· │
188 │ │ [10], [], [11],
189 │ │ )
│ ╰─────^

help: error occurred while importing this module
┌─ thesis.typ:13:9

13 │ #include "chapters/ch01.typ"
│ ^^^^^^^^^^^^^^^^^^^

我看自动化编译没有报错,可能你装的 typst 是缓存,或者刚刚 typst 又更新了

你再运行 cargo install --git https://github.com/typst/typst.git 重装 typst,不要下载预编译的版本

自动化编译没有错误,用仓库提供的 install_typst.ps1 安装从源码编译的最新版本的 Typst 即可