Skip to main content

tex2typ

Release Build status codecov Commit activity License Checked with mypy Ruff

A Python CLI tool for converting LaTeX equations into Typst equations and back

uvx tex2typ <YourLaTeXEquation> <options>

Example:

uvx tex2typ "\boldsymbol{H^i} = -\frac{1}{j\omega\mu_0}\nabla\times\boldsymbol{E^i}" -c

Will return and copy to clipboard:

$ bold(H^i) = - frac(1, j omega mu_0) nabla times bold(E^i) $

Installation

tex2typ requires Pandoc and Typst to be installed

tex2typ is hosted on PyPI and can be installed through uv or pip. We recommend using it as a uvx tool: uv:

uvx tex2typ

Running CLI

If using a virtual env or conda, run

uvx tex2typ <YourEquation> <options>

Where -c automatically copies the resulting Typst equation to your clipboard, and -r allows you to convert back from Typst to LaTeX.

Example:

uvx tex2typ "\boldsymbol{H^i} = -\frac{1}{j\omega\mu_0}\nabla\times\boldsymbol{E^i}" -c

Which will return and copy to the clipboard:

$ bold(H^i) = - frac(1, j omega mu_0) nabla times bold(E^i) $

Typst to LaTeX

By providing the -r option, one can convert from typst to LaTeX. Example:

uvx run tex2typ "bold(H^i) = - frac(1, j omega mu_0) nabla times bold(E^i)" -r

Will return:

\mathbf{H^i} = -\frac{1}{j\omega\mu_0}\nabla\times\mathbf{E^i}

Options:

  • -c or --copy: Copy the result to your clipboard
  • -r or --reverse: Convert from Typst to LaTeX (default is LaTeX to Typst)

Metadata

Release files for tex2typ 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tex2typ 0.0.3
File Size Uploaded Provenance Actions
tex2typ-0.0.3.tar.gz 32.8 MB Without provenance Details for tex2typ-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tex2typ 0.0.3
File Interpreter ABI Platform Actions
tex2typ-0.0.3-py3-none-any.whl Python 3 none any Details for tex2typ-0.0.3-py3-none-any.whl

Total release size: 32.8 MB

Release files / tex2typ-0.0.3.tar.gz

Download URL tex2typ-0.0.3.tar.gz
Size 32.8 MB
Tags Source
SHA-256 checksum
How to use checksums
23a5e96947ef336de333bbc7c6718f8206a26334aba1ec323de6365042c10170
BLAKE2b-256 checksum
How to use checksums
80eae967b49d220f5175e22be6231824aa3a5bf2a13786a8c937ff7309d12a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / tex2typ-0.0.3-py3-none-any.whl

Download URL tex2typ-0.0.3-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0680f01c8f1279faa2d94f13fac78f868c3a356f6c41d1346f52b9c5a9ca8155
BLAKE2b-256 checksum
How to use checksums
87ed33a0d0190db08b8775ab35e167ed00f482cd76c4e04cf9c233480630c656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Security for tex2typ 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page