Describe
When using mitex-cli to compile a LaTeX document containing standard environments like pmatrix into Typst code, the resulting Typst code fails to render. Typst throws an unknown variable: pmatrix error because the generated prelude lacks the corresponding #let binding for these environments.
To Reproduce
- Create a minimal LaTeX file
main.tex:
\begin{pmatrix}
1 & 0 \\
0 & 1
\end{pmatrix}
- Compile it using
mitex-cli:
mitex compile main.tex main.typ
- The generated
main.typ looks like this and fails to compile:
#import "@preview/mitex:0.2.6": *
// many aliases bindings like
// #let Big = mitex-scope.at("Big", default: none);
$ pmatrix( // error: unknown variable: pmatrix
1 zws , 0 zws ;
0 zws , 1
) $
But with Typst Package, this is fine:
#import "@preview/mitex:0.2.6": *
#mitex(`
\begin{pmatrix}
1 & 0 \\
0 & 1
\end{pmatrix}
`)
Expect
mitex-cli works well and could compile a compilable typst file.
Describe
When using
mitex-clito compile a LaTeX document containing standard environments likepmatrixinto Typst code, the resulting Typst code fails to render. Typst throws anunknown variable: pmatrixerror because the generated prelude lacks the corresponding#letbinding for these environments.To Reproduce
main.tex:mitex-cli:main.typlooks like this and fails to compile:But with Typst Package, this is fine:
Expect
mitex-cliworks well and could compile a compilable typst file.