mseq2latex
A simple tool for converting Microsoft Equation Fields (EQ) to LaTex formats.
Usage
Using uv as python packet manager:
uv add mseq2latex
Import the converter and run:
converter = MSEQToLatexConverter()
test_case = "{ EQ \\f(2,RateChange) }"
result = converter.convert(test_case)
# \\frac{2}{RateChange}
Standards
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.
Supported commands
| 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\}$ |
$\left{ a \right}$ |
\d \fo10 \ba5 (world) |
Displace | $\text{world}$ |
$\text{world}$ |
\f(1,2) |
Fraction | $\frac{1}{2}$ |
$\frac{1}{2}$ |
\i \su(1,5,3) |
Integral | $\sum_{1}^{5} {3}$ |
$\sum_{1}^{5} {3}$ |
\l(A,B,C,D,E) |
List | $A,B,C,D,E$ |
$A,B,C,D,E$ |
\o(A,B,C) |
Overstrike | $A,B,C$ |
$A,B,C$ |
\r(2,3) |
Radical | $\sqrt[2]{3}$ |
$\sqrt[2]{3}$ |
\s\up4(a) |
Super/Subscript | $^{a}$ |
$^{a}$ |
\x \to \bo(element) |
Box | $element$ |
$element$ |
AIGC Statement
This project is co-editted with Github Coplilot.
Contribution
Please feel free to submit PRs or fork!
Metadata
Release files for mseq2latex 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mseq2latex-0.1.2.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mseq2latex-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / mseq2latex-0.1.2.tar.gz
| Download URL | mseq2latex-0.1.2.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d807112d443d249753e40c05c7975b18fd7db4d0cfa40ac2f18c9cf679a3f62e
|
|
BLAKE2b-256 checksum How to use checksums |
cf3f541903ecde3e78eccfebe1fd265f3a31ab2e6c436b7e95b564c6869efbb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / mseq2latex-0.1.2-py3-none-any.whl
| Download URL | mseq2latex-0.1.2-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7df3cc7f195e199f7d2eb2f5c637fb9fb66cc9e41c1d4dfa993bf56af47e0706
|
|
BLAKE2b-256 checksum How to use checksums |
e7d89e2bf9163f4154b8dae9ceb17fef703daa9f818ff3f1ed74e339013e5d99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|