You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,29 @@
1
1
# Contributing to MiTeX
2
2
3
+
Currently, MiTeX maintains following three parts of code:
4
+
5
+
- A TeX parser library written in **Rust**, see [mitex-lexer](https://github.com/mitex-rs/mitex/tree/main/crates/mitex-lexer) and [mitex-parser](https://github.com/mitex-rs/mitex/tree/main/crates/mitex-parser).
6
+
- A TeX to Typst converter library written in **Rust**, see [mitex](https://github.com/mitex-rs/mitex/tree/main/crates/mitex).
7
+
- A list of TeX packages and commands written in **Typst**, which then used by the typst package, see [MiTeX Command Specification](https://github.com/mitex-rs/mitex/tree/main/packages/mitex/specs).
You can use the `#mitex-convert()` function to get the Typst Code generated from LaTeX Code.
20
+
21
+
### Adding missing TeX commands
22
+
23
+
Even if you don't know Rust at all, you can still add missing TeX commands to MiTeX by modifying [specification files](https://github.com/mitex-rs/mitex/tree/main/packages/mitex/specs), since they are written in typst! You can open an issue to acquire the commands you want to add, or you can edit the files and submit a pull request.
24
+
25
+
In the future, we will provide the ability to customize TeX commands, which will make it easier for you to use the commands you create for yourself.
26
+
3
27
## Installing Dependencies
4
28
5
29
You should install [Typst](https://github.com/typst/typst?tab=readme-ov-file#installation) and [Rust](https://www.rust-lang.org/tools/install) for running the build script.
Copy file name to clipboardExpand all lines: README.md
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,36 +118,38 @@ Another example is that MiTeX transforms `(\frac{1}{2})` into `\(frac(1, 2)\)` i
118
118
119
119
**Certainly, the greatest advantage is that you can directly write LaTeX content in Typst without the need for manual conversion!**
120
120
121
-
## Submitting Issues
122
-
123
-
If you find missing commands or bugs of MiTeX, please feel free to submit an issue [here](https://github.com/mitex-rs/mitex/issues).
121
+
### Adding new commands
124
122
125
-
## Contributing to MiTeX
123
+
There are two kinds of commands to add:
126
124
127
-
Currently, MiTeX maintains following three parts of code:
125
+
-**Commonly used commands**: If there are some builtin or commonly used commands missing in MiTeX, you can submit an issue or contribute them according to [Adding missing TeX commands.](./CONTRIBUTING.md#adding-missing-tex-commands)
128
126
129
-
- A TeX parser library written in **Rust**, see [mitex-lexer](https://github.com/mitex-rs/mitex/tree/main/crates/mitex-lexer) and [mitex-parser](https://github.com/mitex-rs/mitex/tree/main/crates/mitex-parser).
130
-
- A TeX to Typst converter library written in **Rust**, see [mitex](https://github.com/mitex-rs/mitex/tree/main/crates/mitex).
131
-
- A list of TeX packages and commands written in **Typst**, which then used by the typst package, see [MiTeX Command Specification](https://github.com/mitex-rs/mitex/tree/main/packages/mitex/specs).
127
+
-**Special commands (Preambles)**: If you want to add some special commands (preambles) for your own use, you can define them by `\newcommand` or `\newenvironment` and override the mitex function in your. Example:
You can use the `#mitex-convert()` function to get the Typst Code generated from LaTeX Code.
144
-
145
-
### Add missing TeX commands
140
+
````typ
141
+
#show raw.where(lang: "mitex"): mitex
142
+
```mitex
143
+
\f\relax{x} = \int_{-\infty}^\infty
144
+
\f\hat\xi\,e^{2 \pi i \xi x}
145
+
\,d\xi
146
+
```
147
+
````
146
148
147
-
Even if you don't know Rust at all, you can still add missing TeX commands to MiTeX by modifying [specification files](https://github.com/mitex-rs/mitex/tree/main/packages/mitex/specs), since they are written in typst! You can open an issue to acquire the commands you want to add, or you can edit the files and submit a pull request.
149
+
## Submitting Issues
148
150
149
-
In the future, we will provide the ability to customize TeX commands, which will make it easier for you to use the commands you create for yourself.
151
+
If you find missing commands or bugs of MiTeX, please feel free to submit an issue [here](https://github.com/mitex-rs/mitex/issues).
150
152
151
-
### Develop the parser and the converter
153
+
##Contributing
152
154
153
-
See [CONTRIBUTING.md](https://github.com/mitex-rs/mitex/blob/main/CONTRIBUTING.md).
0 commit comments