Skip to content

更新到 Typst v0.14#95

Merged
flaribbit merged 4 commits intotypst-doc-cn:masterfrom
YDX-2147483647:up
Nov 5, 2025
Merged

更新到 Typst v0.14#95
flaribbit merged 4 commits intotypst-doc-cn:masterfrom
YDX-2147483647:up

Conversation

@YDX-2147483647
Copy link
Member

@YDX-2147483647 YDX-2147483647 commented Oct 24, 2025

暂时请勿合并! 已可以合并。

另外,建议像隔壁那样把 netlify 脚本存到文件里,这样 PR 和主分支用的 typst 版本可以不同。 已完成。

Resolves #87

mitex-rs/mitex#201 合并了,还要再更新 mitex 版本。

残余 stderr

Details
> vitepress-project@ build
> vitepress build docs

  vitepress v1.6.3

- building client + server bundles...
Error compiling Typst document:
  Source (starting at docs/FAQ/enum-list-marker-fix.md:60):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto)
    …
  Log (docs/generated/5b3e4cff79.log):
    error: expected integer, found auto
        ┌─ @preview/itemize:0.1.2\src\fix-enum-list.typ:169:31169 │     fmt += std.numbering(kind, number)
        │                                ^^^^^^
    
    help: error occurred in this call of function `apply-numbering-kth`
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/enum-list-marker-fix.md:74):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto)
    …
  Log (docs/generated/53369096f8.log):
    error: expected integer, found auto
        ┌─ @preview/itemize:0.1.2\src\fix-enum-list.typ:169:31169 │     fmt += std.numbering(kind, number)
        │                                ^^^^^^
    
    help: error occurred in this call of function `apply-numbering-kth`
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/equation-chinese-font.md:112):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: auto, margin: 1em)
    …
  Log (docs/generated/eafeccb15f.log):
    warning: current font is not designed for math
       ┌─ <stdin>:10:010 │ $ hat(alpha)(f) = f(alpha) "(同上,α–map的定义"$
       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       │
       = hint: rendering may be poor
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/equation-chinese-font.md:143):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: auto, margin: 1em)
    …
  Log (docs/generated/1ef2fb456d.log):
    warning: current font is not designed for math
      ┌─ <stdin>:9:09 │ $ hat(alpha)(f) = f(alpha) "(同上,α–map的定义"$
      │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      │
      = hint: rendering may be poor
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/fix-enum-list.md:13):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: 14cm)
    …
  Log (docs/generated/c9de1da926.log):
    error: expected integer, found auto
       ┌─ <stdin>:58:3258 │         numbering(en.numbering, number)
       │                                 ^^^^^^
    
    help: error occurred while applying show rule to this enum
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/latex-equation.md:9):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #show link: set text(blue.lighten(20%))
    …
  Log (docs/generated/27f8c2ffe4.log):
    warning: `kai` is deprecated, use ϗ or `\u{3d7}` instead
         ┌─ @preview/mitex:0.2.5\specs\latex\standard.typ:1045:301045 │   KaTeX: of-sym(math.upright($kai A T E X$)),
         │                               ^^^
Error compiling Typst document:
  Source (starting at docs/FAQ/enum-list-marker-fix.md:60):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto)
    …
  Log (docs/generated/5b3e4cff79.log):
    error: expected integer, found auto
        ┌─ @preview/itemize:0.1.2\src\fix-enum-list.typ:169:31169 │     fmt += std.numbering(kind, number)
        │                                ^^^^^^
    
    help: error occurred in this call of function `apply-numbering-kth`
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/enum-list-marker-fix.md:74):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto)
    …
  Log (docs/generated/53369096f8.log):
    error: expected integer, found auto
        ┌─ @preview/itemize:0.1.2\src\fix-enum-list.typ:169:31169 │     fmt += std.numbering(kind, number)
        │                                ^^^^^^
    
    help: error occurred in this call of function `apply-numbering-kth`
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/equation-chinese-font.md:112):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: auto, margin: 1em)
    …
  Log (docs/generated/eafeccb15f.log):
    warning: current font is not designed for math
       ┌─ <stdin>:10:010 │ $ hat(alpha)(f) = f(alpha) "(同上,α–map的定义"$
       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       │
       = hint: rendering may be poor
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/equation-chinese-font.md:143):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: auto, margin: 1em)
    …
  Log (docs/generated/1ef2fb456d.log):
    warning: current font is not designed for math
      ┌─ <stdin>:9:09 │ $ hat(alpha)(f) = f(alpha) "(同上,α–map的定义"$
      │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      │
      = hint: rendering may be poor
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/fix-enum-list.md:13):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: 14cm)
    …
  Log (docs/generated/c9de1da926.log):
    error: expected integer, found auto
       ┌─ <stdin>:58:3258 │         numbering(en.numbering, number)
       │                                 ^^^^^^
    
    help: error occurred while applying show rule to this enum
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/latex-equation.md:9):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #show link: set text(blue.lighten(20%))
    …
  Log (docs/generated/27f8c2ffe4.log):
    warning: `kai` is deprecated, use ϗ or `\u{3d7}` instead
         ┌─ @preview/mitex:0.2.5\specs\latex\standard.typ:1045:301045 │   KaTeX: of-sym(math.upright($kai A T E X$)),
         │                               ^^^
Error compiling Typst document:
  Source (starting at docs/FAQ/enum-list-marker-fix.md:60):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto)
    …
  Log (docs/generated/5b3e4cff79.log):
    error: expected integer, found auto
        ┌─ @preview/itemize:0.1.2\src\fix-enum-list.typ:169:31169 │     fmt += std.numbering(kind, number)
        │                                ^^^^^^
    
    help: error occurred in this call of function `apply-numbering-kth`
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/enum-list-marker-fix.md:74):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto)
    …
  Log (docs/generated/53369096f8.log):
    error: expected integer, found auto
        ┌─ @preview/itemize:0.1.2\src\fix-enum-list.typ:169:31169 │     fmt += std.numbering(kind, number)
        │                                ^^^^^^
    
    help: error occurred in this call of function `apply-numbering-kth`
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/equation-chinese-font.md:112):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: auto, margin: 1em)
    …
  Log (docs/generated/eafeccb15f.log):
    warning: current font is not designed for math
       ┌─ <stdin>:10:010 │ $ hat(alpha)(f) = f(alpha) "(同上,α–map的定义"$
       │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       │
       = hint: rendering may be poor
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/equation-chinese-font.md:143):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: auto, margin: 1em)
    …
  Log (docs/generated/1ef2fb456d.log):
    warning: current font is not designed for math
      ┌─ <stdin>:9:09 │ $ hat(alpha)(f) = f(alpha) "(同上,α–map的定义"$
      │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      │
      = hint: rendering may be poor
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/fix-enum-list.md:13):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #set page(height: auto, width: 14cm)
    …
  Log (docs/generated/c9de1da926.log):
    error: expected integer, found auto
       ┌─ <stdin>:58:3258 │         numbering(en.numbering, number)
       │                                 ^^^^^^
    
    help: error occurred while applying show rule to this enum
    …
Error compiling Typst document:
  Source (starting at docs/FAQ/latex-equation.md:9):
    #set page(height: 4cm, width: 6cm)
    #set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
    #show link: set text(blue.lighten(20%))
    …
  Log (docs/generated/27f8c2ffe4.log):
    warning: `kai` is deprecated, use ϗ or `\u{3d7}` instead
         ┌─ @preview/mitex:0.2.5\specs\latex\standard.typ:1045:301045 │   KaTeX: of-sym(math.upright($kai A T E X$)),
         │                               ^^^

太难救或者不用救的就标注成```typst v0.13.1,直接用 v0.13.1 编译了。

@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for luxury-mochi-9269a9 ready!

Name Link
🔨 Latest commit 51bbc60
🔍 Latest deploy log https://app.netlify.com/projects/luxury-mochi-9269a9/deploys/6908dd22264fe90008824a9f
😎 Deploy Preview https://deploy-preview-95--luxury-mochi-9269a9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

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 documentation to support Typst v0.14.0 while maintaining compatibility with examples written for older versions (v0.13.1). The update includes infrastructure changes to compile code examples with version-specific Typst executables, package dependency updates, and documentation improvements for Chinese font handling in mathematical equations.

  • Adds support for compiling Typst code examples with specific versions (v0.14.0 and v0.13.1)
  • Updates documentation with Typst 0.14-specific font configuration guidance for Chinese text in math equations
  • Improves CI/CD workflows with better caching and structured setup steps

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds which package (v5.0.0) and its type definitions for executable detection
package.json Adds which and @types/which as development dependencies
netlify.toml Downloads and sets up both Typst v0.14.0 and v0.13.1 executables
docs/.vitepress/typst_render.ts Implements multi-version Typst compilation support with executable detection and version-specific rendering
docs/.vitepress/theme/typst_version.ts Updates version history to include Typst v0.14.0 release information
docs/word.md Adds margin setting comment and line break escapes to example code
docs/FAQ/equation-chinese-font.md Expands with comprehensive v0.14 font configuration guidance and reorganizes content by version
docs/FAQ/fix-enum-list.md Marks code example to compile with v0.13.1
docs/FAQ/enum-list-marker-fix.md Updates package import from v0.1.2 to v0.2.0
docs/FAQ/dcases.md Updates package import from v0.9.3 to v0.9.6
docs/FAQ/cite-flying.md Marks issue as fixed in v0.14
docs/FAQ/chapter-zero.md Adds calc.max to prevent negative numbering
docs/FAQ/bib-csl.md Adds tip about pre-sanitized CSL styles
README.md Expands from single line to comprehensive development guide
.github/workflows/check.yml New CI workflow for build verification
.github/workflows/build.yml Updates deployment workflow with improved structure and caching
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@YDX-2147483647 YDX-2147483647 marked this pull request as draft November 3, 2025 16:36
@YDX-2147483647 YDX-2147483647 marked this pull request as ready for review November 3, 2025 16:42

This comment was marked as spam.

Copy link
Collaborator

@flaribbit flaribbit left a comment

Choose a reason for hiding this comment

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

好耶 辛苦了喵

@flaribbit flaribbit merged commit 0f37aea into typst-doc-cn:master Nov 5, 2025
11 checks passed
@YDX-2147483647 YDX-2147483647 deleted the up branch November 5, 2025 01:16
YDX-2147483647 added a commit to YDX-2147483647/guide that referenced this pull request Nov 5, 2025
之前部分设置方法中,缺少`regex(".")`或`covers: none`的中文字体,会导致括号等中文独占标点变成豆腐块。

Resolves typst-doc-cn#87
Continues typst-doc-cn#95
YDX-2147483647 added a commit to YDX-2147483647/guide that referenced this pull request Nov 5, 2025
之前部分设置方法中,缺少`regex(".")`或`covers: none`的中文字体,会导致括号等中文独占标点变成豆腐块。

Resolves typst-doc-cn#87
Continues typst-doc-cn#95
YDX-2147483647 added a commit to YDX-2147483647/guide that referenced this pull request Nov 5, 2025
之前部分设置方法中,缺少`regex(".")`或`covers: none`的中文字体,会导致括号等中文独占标点变成豆腐块。

Resolves typst-doc-cn#87
Continues typst-doc-cn#95
flaribbit pushed a commit that referenced this pull request Nov 11, 2025
之前部分设置方法中,缺少`regex(".")`或`covers: none`的中文字体,会导致括号等中文独占标点变成豆腐块。

Resolves #87
Continues #95
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.

equation-chinese-font 有副作用,需要更新

3 participants