Skip to main content

A simple tool to convert microsoft equation field strings to LaTeX format.

Project description

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseq2latex-0.1.2.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseq2latex-0.1.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file mseq2latex-0.1.2.tar.gz.

File metadata

  • Download URL: mseq2latex-0.1.2.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for mseq2latex-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d807112d443d249753e40c05c7975b18fd7db4d0cfa40ac2f18c9cf679a3f62e
MD5 fc295646655f455e4371d50cb3c550fb
BLAKE2b-256 cf3f541903ecde3e78eccfebe1fd265f3a31ab2e6c436b7e95b564c6869efbb2

See more details on using hashes here.

File details

Details for the file mseq2latex-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mseq2latex-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for mseq2latex-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7df3cc7f195e199f7d2eb2f5c637fb9fb66cc9e41c1d4dfa993bf56af47e0706
MD5 be48487f84127b9f9fbb205d4cf03eaf
BLAKE2b-256 e7d89e2bf9163f4154b8dae9ceb17fef703daa9f818ff3f1ed74e339013e5d99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page