Skip to content

fix: compatibility with Typst 0.14.0#10

Merged
RizhongLin merged 2 commits intoTJ-CSCCG:mainfrom
wendaining:fix/typst-0.14.0-compatibility
Dec 7, 2025
Merged

fix: compatibility with Typst 0.14.0#10
RizhongLin merged 2 commits intoTJ-CSCCG:mainfrom
wendaining:fix/typst-0.14.0-compatibility

Conversation

@wendaining
Copy link
Contributor

@wendaining wendaining commented Dec 7, 2025

对该 PR 的总结

  • 更新 algo 包从 0.3.3 到 0.3.5
  • 更新 tablex 包从 0.0.6 到 0.0.9
  • 将已弃用的 locate() 函数替换为 context
  • 更新 counter API 调用以适配新版本

该 PR 的成功合入是否需要关闭一些 Issue?

Close #9

该 PR 的其他信息

本 PR 修复了模板与 Typst 0.14.0 的兼容性问题。之前用户在使用最新版本 Typst 编译时会遇到 type state has no method displayonly element functions can be used as selectors 的错误。修改后的代码已在 Typst 0.14.0 上成功编译测试。

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Tongji University thesis template to be compatible with Typst 0.14.0 by migrating from deprecated APIs to modern equivalents. The changes address breaking changes in Typst 0.14.0 where locate() was deprecated in favor of context, and the counter API was updated.

Key changes:

  • Replaces deprecated locate() function with context keyword throughout the codebase
  • Updates counter API calls from counter().at(loc) to counter().get() within context blocks
  • Updates package dependencies: algo from 0.3.3 to 0.3.5 and tablex from 0.0.6 to 0.0.9
  • Modernizes paragraph spacing from show par: set block(spacing: ...) to set par(spacing: ...)
  • Adds CI/CD workflow for automated testing
  • Expands .gitignore file

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
paddling-tongji-thesis/tongjithesis.typ Migrates heading show rules and footer functions from locate() to context, updates counter API usage, and modernizes paragraph spacing configuration
paddling-tongji-thesis/elements.typ Updates package imports to newer versions and migrates outline generation function from locate() to context
.gitignore Expands ignore patterns with many new entries (includes some unrelated to Typst projects)
.github/workflows/test.yml Adds new CI workflow to compile thesis and verify build on push/PR events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RizhongLin RizhongLin merged commit 59671bd into TJ-CSCCG:main Dec 7, 2025
7 checks passed
@wendaining wendaining deleted the fix/typst-0.14.0-compatibility branch December 7, 2025 09:11
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

Successfully merging this pull request may close these issues.

Tracking - Supporting on new version of typst

3 participants