Skip to content

Commit

Permalink
add mitex (#61)
Browse files Browse the repository at this point in the history
* add mitex

it doesn't support numbering and supplement so it's ignored for now

* remove texmath dependency and edit docs
  • Loading branch information
Enter-tainer authored Dec 23, 2023
1 parent ad3db3b commit 4433abf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
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

0 comments on commit 4433abf

Please sign in to comment.