From 83bf612232f7ec170d6a4e4794c72ca6d4375a7f Mon Sep 17 00:00:00 2001 From: OrangeX4 <318483724@qq.com> Date: Fri, 8 Mar 2024 00:36:15 +0800 Subject: [PATCH] docs: add mitex for package integration --- docs/docs/integration/cetz.md | 2 +- docs/docs/integration/codly.md | 2 +- docs/docs/integration/fletcher.md | 2 +- docs/docs/integration/mitex.md | 26 +++++++++++++++++++ docs/docs/integration/polylux.md | 2 +- .../current/integration/cetz.md | 2 +- .../current/integration/codly.md | 2 +- .../current/integration/fletcher.md | 2 +- .../current/integration/mitex.md | 26 +++++++++++++++++++ .../current/integration/polylux.md | 2 +- .../version-0.3.x/integration/cetz.md | 2 +- .../version-0.3.x/integration/codly.md | 2 +- .../version-0.3.x/integration/fletcher.md | 2 +- .../version-0.3.x/integration/mitex.md | 26 +++++++++++++++++++ .../version-0.3.x/integration/polylux.md | 2 +- .../version-0.3.x/integration/cetz.md | 2 +- .../version-0.3.x/integration/codly.md | 2 +- .../version-0.3.x/integration/fletcher.md | 2 +- .../version-0.3.x/integration/mitex.md | 26 +++++++++++++++++++ .../version-0.3.x/integration/polylux.md | 2 +- 20 files changed, 120 insertions(+), 16 deletions(-) create mode 100644 docs/docs/integration/mitex.md create mode 100644 docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/mitex.md create mode 100644 docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/mitex.md create mode 100644 docs/versioned_docs/version-0.3.x/integration/mitex.md diff --git a/docs/docs/integration/cetz.md b/docs/docs/integration/cetz.md index 234acf1e3..381487604 100644 --- a/docs/docs/integration/cetz.md +++ b/docs/docs/integration/cetz.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 3 --- # CeTZ diff --git a/docs/docs/integration/codly.md b/docs/docs/integration/codly.md index acd9b6871..28957effe 100644 --- a/docs/docs/integration/codly.md +++ b/docs/docs/integration/codly.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- # Codly diff --git a/docs/docs/integration/fletcher.md b/docs/docs/integration/fletcher.md index 633cc996b..1d906f49e 100644 --- a/docs/docs/integration/fletcher.md +++ b/docs/docs/integration/fletcher.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 --- # Fletcher diff --git a/docs/docs/integration/mitex.md b/docs/docs/integration/mitex.md new file mode 100644 index 000000000..625ab5cd1 --- /dev/null +++ b/docs/docs/integration/mitex.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 2 +--- + +# MiTeX + +During the process of creating slides, we often already have a LaTeX math equation that we simply want to paste into the slides without transcribing it into a Typst math equation. In such cases, we can use [MiTeX](https://github.com/mitex-rs/mitex). + +Example: + +```typst +#import "@preview/mitex:0.2.1": * + +Write inline equations like #mi("x") or #mi[y]. + +Also block equations (this case is from #text(blue.lighten(20%), link("https://katex.org/")[katex.org])): + +#mitex(` + \newcommand{\f}[2]{#1f(#2)} + \f\relax{x} = \int_{-\infty}^\infty + \f\hat\xi\,e^{2 \pi i \xi x} + \,d\xi +`) +``` + +![image](https://github.com/mitex-rs/mitex/assets/34951714/c425b2ae-b50b-46a8-a451-4d9e8e70626b) diff --git a/docs/docs/integration/polylux.md b/docs/docs/integration/polylux.md index 90831b752..fc2a79c05 100644 --- a/docs/docs/integration/polylux.md +++ b/docs/docs/integration/polylux.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 --- # Polylux diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md index 2152766fd..156bda145 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 3 --- # CeTZ diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md index d60e2b86a..24de57737 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- # Codly diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md index b1d40932c..70dff8e23 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 --- # Fletcher diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/mitex.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/mitex.md new file mode 100644 index 000000000..8d576a46b --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/mitex.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 2 +--- + +# MiTeX + +在创建 slides 的过程中,往往我们已经有了一个 LaTeX 数学公式,只是想贴到 slides 的里面,而不想把它转写成 Typst 数学公式,这时候我们就可以用 [MiTeX](https://github.com/mitex-rs/mitex) 了。 + +示例: + +```typst +#import "@preview/mitex:0.2.1": * + +Write inline equations like #mi("x") or #mi[y]. + +Also block equations (this case is from #text(blue.lighten(20%), link("https://katex.org/")[katex.org])): + +#mitex(` + \newcommand{\f}[2]{#1f(#2)} + \f\relax{x} = \int_{-\infty}^\infty + \f\hat\xi\,e^{2 \pi i \xi x} + \,d\xi +`) +``` + +![image](https://github.com/mitex-rs/mitex/assets/34951714/c425b2ae-b50b-46a8-a451-4d9e8e70626b) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md index 4adc8fa23..fb82baf8f 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 --- # Polylux diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/cetz.md b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/cetz.md index 2152766fd..156bda145 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/cetz.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/cetz.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 3 --- # CeTZ diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/codly.md b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/codly.md index d60e2b86a..24de57737 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/codly.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/codly.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- # Codly diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/fletcher.md b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/fletcher.md index b1d40932c..70dff8e23 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/fletcher.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/fletcher.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 --- # Fletcher diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/mitex.md b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/mitex.md new file mode 100644 index 000000000..8d576a46b --- /dev/null +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/mitex.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 2 +--- + +# MiTeX + +在创建 slides 的过程中,往往我们已经有了一个 LaTeX 数学公式,只是想贴到 slides 的里面,而不想把它转写成 Typst 数学公式,这时候我们就可以用 [MiTeX](https://github.com/mitex-rs/mitex) 了。 + +示例: + +```typst +#import "@preview/mitex:0.2.1": * + +Write inline equations like #mi("x") or #mi[y]. + +Also block equations (this case is from #text(blue.lighten(20%), link("https://katex.org/")[katex.org])): + +#mitex(` + \newcommand{\f}[2]{#1f(#2)} + \f\relax{x} = \int_{-\infty}^\infty + \f\hat\xi\,e^{2 \pi i \xi x} + \,d\xi +`) +``` + +![image](https://github.com/mitex-rs/mitex/assets/34951714/c425b2ae-b50b-46a8-a451-4d9e8e70626b) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/polylux.md b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/polylux.md index 4adc8fa23..fb82baf8f 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/polylux.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/version-0.3.x/integration/polylux.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 --- # Polylux diff --git a/docs/versioned_docs/version-0.3.x/integration/cetz.md b/docs/versioned_docs/version-0.3.x/integration/cetz.md index 234acf1e3..381487604 100644 --- a/docs/versioned_docs/version-0.3.x/integration/cetz.md +++ b/docs/versioned_docs/version-0.3.x/integration/cetz.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 3 --- # CeTZ diff --git a/docs/versioned_docs/version-0.3.x/integration/codly.md b/docs/versioned_docs/version-0.3.x/integration/codly.md index acd9b6871..28957effe 100644 --- a/docs/versioned_docs/version-0.3.x/integration/codly.md +++ b/docs/versioned_docs/version-0.3.x/integration/codly.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- # Codly diff --git a/docs/versioned_docs/version-0.3.x/integration/fletcher.md b/docs/versioned_docs/version-0.3.x/integration/fletcher.md index 633cc996b..1d906f49e 100644 --- a/docs/versioned_docs/version-0.3.x/integration/fletcher.md +++ b/docs/versioned_docs/version-0.3.x/integration/fletcher.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 --- # Fletcher diff --git a/docs/versioned_docs/version-0.3.x/integration/mitex.md b/docs/versioned_docs/version-0.3.x/integration/mitex.md new file mode 100644 index 000000000..625ab5cd1 --- /dev/null +++ b/docs/versioned_docs/version-0.3.x/integration/mitex.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 2 +--- + +# MiTeX + +During the process of creating slides, we often already have a LaTeX math equation that we simply want to paste into the slides without transcribing it into a Typst math equation. In such cases, we can use [MiTeX](https://github.com/mitex-rs/mitex). + +Example: + +```typst +#import "@preview/mitex:0.2.1": * + +Write inline equations like #mi("x") or #mi[y]. + +Also block equations (this case is from #text(blue.lighten(20%), link("https://katex.org/")[katex.org])): + +#mitex(` + \newcommand{\f}[2]{#1f(#2)} + \f\relax{x} = \int_{-\infty}^\infty + \f\hat\xi\,e^{2 \pi i \xi x} + \,d\xi +`) +``` + +![image](https://github.com/mitex-rs/mitex/assets/34951714/c425b2ae-b50b-46a8-a451-4d9e8e70626b) diff --git a/docs/versioned_docs/version-0.3.x/integration/polylux.md b/docs/versioned_docs/version-0.3.x/integration/polylux.md index 90831b752..fc2a79c05 100644 --- a/docs/versioned_docs/version-0.3.x/integration/polylux.md +++ b/docs/versioned_docs/version-0.3.x/integration/polylux.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 --- # Polylux