From 1f10ada9cd96161e7357f9671fb092067837e149 Mon Sep 17 00:00:00 2001 From: mgt Date: Sat, 23 Dec 2023 23:34:41 +0800 Subject: [PATCH 1/2] add mitex it doesn't support numbering and supplement so it's ignored for now --- oi-wiki-export-typst/oi-wiki.typ | 4 ++++ remark-typst | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/oi-wiki-export-typst/oi-wiki.typ b/oi-wiki-export-typst/oi-wiki.typ index a326dd0..f573722 100644 --- a/oi-wiki-export-typst/oi-wiki.typ +++ b/oi-wiki-export-typst/oi-wiki.typ @@ -6,8 +6,12 @@ #import "@preview/tablex:0.0.5": tablex #import "@preview/tiaoma:0.1.0" +#import "@preview/mitex:0.1.0" as mmm /* END imports */ +#let mi(..args) = mmm.mi(..args) +#let mitex(eq, numbering: none, supplement: auto) = mmm.mitex(eq) + #let page-header = locate(loc => { if calc.odd(loc.page()) { // NOTE: not able to programatically hide headings on new chapters for now diff --git a/remark-typst b/remark-typst index f1db8d5..3c5c8c1 160000 --- a/remark-typst +++ b/remark-typst @@ -1 +1 @@ -Subproject commit f1db8d55f6bc833b546b2e43a2512a968f8f818a +Subproject commit 3c5c8c1827e3e2b27d43e7f13593578df72eca32 From 240c7cefddc61980ca82f7099f7a74a3880d8248 Mon Sep 17 00:00:00 2001 From: mgt Date: Sat, 23 Dec 2023 23:36:10 +0800 Subject: [PATCH 2/2] remove texmath dependency and edit docs --- .github/workflows/auto-release-typst.yml | 3 --- .github/workflows/test-build-typst.yml | 3 --- oi-wiki-export-typst/README.md | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/auto-release-typst.yml b/.github/workflows/auto-release-typst.yml index 4bc3002..0786c0f 100644 --- a/.github/workflows/auto-release-typst.yml +++ b/.github/workflows/auto-release-typst.yml @@ -30,11 +30,8 @@ jobs: sudo apt-get remove fonts-noto-color-emoji curl -OL https://github.com/typst/typst/releases/download/v0.10.0/typst-x86_64-unknown-linux-musl.tar.xz - curl -OL https://github.com/megakite/texmath/releases/download/v0.12.8.6-20231213/texmath-arg xz -dc typst-x86_64-unknown-linux-musl.tar.xz | tar -x sudo mv ./typst-x86_64-unknown-linux-musl/typst /bin/ - chmod +x texmath-arg - sudo mv texmath-arg /bin/ curl -OL https://github.com/lxgw/LxgwWenKai/releases/download/v1.312/lxgw-wenkai-v1.312.tar.gz gzip -dc lxgw-wenkai-v1.312.tar.gz | tar -x diff --git a/.github/workflows/test-build-typst.yml b/.github/workflows/test-build-typst.yml index 58c624b..a611a14 100644 --- a/.github/workflows/test-build-typst.yml +++ b/.github/workflows/test-build-typst.yml @@ -31,11 +31,8 @@ jobs: sudo apt-get remove fonts-noto-color-emoji curl -OL https://github.com/typst/typst/releases/download/v0.10.0/typst-x86_64-unknown-linux-musl.tar.xz - curl -OL https://github.com/megakite/texmath/releases/download/v0.12.8.6-20231213/texmath-arg xz -dc typst-x86_64-unknown-linux-musl.tar.xz | tar -x sudo mv ./typst-x86_64-unknown-linux-musl/typst /bin/ - chmod +x texmath-arg - sudo mv texmath-arg /bin/ curl -OL https://github.com/lxgw/LxgwWenKai/releases/download/v1.312/lxgw-wenkai-v1.312.tar.gz gzip -dc lxgw-wenkai-v1.312.tar.gz | tar -x diff --git a/oi-wiki-export-typst/README.md b/oi-wiki-export-typst/README.md index 544c432..199c3f7 100644 --- a/oi-wiki-export-typst/README.md +++ b/oi-wiki-export-typst/README.md @@ -8,7 +8,7 @@ Typst 版本不低于 0.8.0。 Markdown 源文档到 Typst 的转换通过 [remark-typst](https://github.com/OI-wiki/remark-typst) 完成。 -TeX 公式到 Typst 的转换通过 [texmath 的一个分支版本](https://github.com/megakite/texmath/tree/for-oi-wiki)完成。 +TeX 公式到 Typst 的转换通过 [mitex](https://github.com/orangex4/mitex)完成。 二维码的生成通过 [typst-qrcode-wasm](https://github.com/megakite/typst-qrcode-wasm) 插件完成;插件的二进制文件已包含在根目录当中。