Skip to content

Commit

Permalink
docs: add mitex for package integration
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Mar 7, 2024
1 parent 316bfcc commit 83bf612
Show file tree
Hide file tree
Showing 20 changed files with 120 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/docs/integration/cetz.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# CeTZ
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/integration/codly.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---

# Codly
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/integration/fletcher.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
---

# Fletcher
Expand Down
26 changes: 26 additions & 0 deletions docs/docs/integration/mitex.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion docs/docs/integration/polylux.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Polylux
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# CeTZ
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---

# Codly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
---

# Fletcher
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Polylux
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# CeTZ
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---

# Codly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
---

# Fletcher
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Polylux
Expand Down
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-0.3.x/integration/cetz.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# CeTZ
Expand Down
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-0.3.x/integration/codly.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
---

# Codly
Expand Down
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-0.3.x/integration/fletcher.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
---

# Fletcher
Expand Down
26 changes: 26 additions & 0 deletions docs/versioned_docs/version-0.3.x/integration/mitex.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-0.3.x/integration/polylux.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Polylux
Expand Down

0 comments on commit 83bf612

Please sign in to comment.