A simple tool for converting Microsoft Equation Fields (EQ) to LaTex formats.
Using uv as python packet manager:
uv add mseq2latexImport the converter and run:
converter = MSEQToLatexConverter()
test_case = "{ EQ \\f(2,RateChange) }"
result = converter.convert(test_case)
# \\frac{2}{RateChange}This tool follows the syntax and grammar of Microsoft Equation Fields from Field codes Support. However, for compatitability with LaTex formats, some commands are simplified for further extension.
| Field Code | Description | LaTex | Render |
|---|---|---|---|
\a \al \co2 \vs3 \hs3(Axy,Bxy,A,B) |
Array | $$\begin{matrix} Axy & Bxy \\ A & B \end{matrix}$$ |
$$\begin{matrix} Axy & Bxy \ A & B \end{matrix}$$ |
\b \bc\{ (a) |
Bracket | $\left\{ a \right\}$ |
|
\d \fo10 \ba5 (world) |
Displace | $\text{world}$ |
|
\f(1,2) |
Fraction | $\frac{1}{2}$ |
|
\i \su(1,5,3) |
Integral | $\sum_{1}^{5} {3}$ |
|
\l(A,B,C,D,E) |
List | $A,B,C,D,E$ |
|
\o(A,B,C) |
Overstrike | $A,B,C$ |
|
\r(2,3) |
Radical | $\sqrt[2]{3}$ |
|
\s\up4(a) |
Super/Subscript | $^{a}$ |
|
\x \to \bo(element) |
Box | $element$ |
This project is co-editted with Github Coplilot.
Please feel free to submit PRs or fork!