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

add mitex #61

Merged
merged 2 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/auto-release-typst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test-build-typst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion oi-wiki-export-typst/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) 插件完成;插件的二进制文件已包含在根目录当中。

Expand Down
4 changes: 4 additions & 0 deletions oi-wiki-export-typst/oi-wiki.typ
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion remark-typst
Submodule remark-typst updated 1 files
+3 −32 lib/compiler.js
Loading