High-performance bidirectional LaTeX <-> Typst converter
Project description
tylax
High-performance bidirectional LaTeX <-> Typst converter. Python bindings for tylax.
Installation
pip install tylax
Requires Python 3.10+. Pre-built wheels available for Linux, macOS, and Windows.
Usage
import tylax
# Math conversion
typst = tylax.latex_to_typst(r"\frac{1}{2}")
latex = tylax.typst_to_latex("frac(1, 2)")
# Document conversion
typst_doc = tylax.latex_to_typst(r"\section{Hello}", document=True)
latex_doc = tylax.typst_to_latex("= Hello\nWorld", document=True)
# Auto-detect format
output, fmt = tylax.convert_auto(r"\frac{1}{2}")
# Format detection
tylax.detect_format(r"\documentclass{article}") # "latex"
# With options
opts = tylax.L2TOptions(frac_to_slash=False)
tylax.latex_to_typst(r"\frac{a}{b}", options=opts)
# Diagnostics
result = tylax.typst_to_latex_diagnostics("frac(1, 2)")
print(result.output)
for w in result.warnings:
print(f"[{w.kind}] {w.message}")
API
latex_to_typst(text, *, document=False, options=None) -> strtypst_to_latex(text, *, document=False, options=None) -> strlatex_to_typst_diagnostics(...) -> ConversionResulttypst_to_latex_diagnostics(...) -> ConversionResultdetect_format(text) -> strconvert_auto(text, *, document=False) -> tuple[str, str]
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tylax-0.3.6.tar.gz.
File metadata
- Download URL: tylax-0.3.6.tar.gz
- Upload date:
- Size: 374.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad2da2c903398508976423ed8107d4c2e200b337377ce90e15835fab247e4394
|
|
| MD5 |
87971cbe944332d2279470f47c5b6bd0
|
|
| BLAKE2b-256 |
1cfee1a8120b5872c19aaa0a065778fd90330dc681a3c8897a335536678bccc4
|
Provenance
The following attestation bundles were made for tylax-0.3.6.tar.gz:
Publisher:
python-release.yml on scipenai/tylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tylax-0.3.6.tar.gz -
Subject digest:
ad2da2c903398508976423ed8107d4c2e200b337377ce90e15835fab247e4394 - Sigstore transparency entry: 1440033219
- Sigstore integration time:
-
Permalink:
scipenai/tylax@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/scipenai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tylax-0.3.6-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: tylax-0.3.6-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9d8f5205575d10061c148c805cdd0ec4657430fa3cb350ffa0c42eec518fc3e
|
|
| MD5 |
05d078628073ec264d56a7a3f5e71fb3
|
|
| BLAKE2b-256 |
6bcc1e0566ae2ec1e4656afc4b008f68d05e14b3b3eddef1e497907fc2568f91
|
Provenance
The following attestation bundles were made for tylax-0.3.6-cp310-abi3-win_amd64.whl:
Publisher:
python-release.yml on scipenai/tylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tylax-0.3.6-cp310-abi3-win_amd64.whl -
Subject digest:
e9d8f5205575d10061c148c805cdd0ec4657430fa3cb350ffa0c42eec518fc3e - Sigstore transparency entry: 1440033236
- Sigstore integration time:
-
Permalink:
scipenai/tylax@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/scipenai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tylax-0.3.6-cp310-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: tylax-0.3.6-cp310-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c641edba1b4426d4ee703e50a013a92fc3cb1dd2d9d83cd566e0b8e17c93801a
|
|
| MD5 |
98d87b3c4811581d713fbb1c458b0384
|
|
| BLAKE2b-256 |
1fb5a47043aef8e6fd7f0d33397d3e39912ffad6b826199fe6759648411edfcd
|
Provenance
The following attestation bundles were made for tylax-0.3.6-cp310-abi3-manylinux_2_34_x86_64.whl:
Publisher:
python-release.yml on scipenai/tylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tylax-0.3.6-cp310-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
c641edba1b4426d4ee703e50a013a92fc3cb1dd2d9d83cd566e0b8e17c93801a - Sigstore transparency entry: 1440033228
- Sigstore integration time:
-
Permalink:
scipenai/tylax@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/scipenai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tylax-0.3.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: tylax-0.3.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
863a060e8bce14985fb18acf4d45cc1837d2310fafe1ad4125abb71e5e27ef1e
|
|
| MD5 |
3ce4f0b910ed3ace6272ddd411f3c72b
|
|
| BLAKE2b-256 |
c7e9e0d50ea5838b53b9fd7278db79e957133ba6f89d7da5006c67758e315b03
|
Provenance
The following attestation bundles were made for tylax-0.3.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
python-release.yml on scipenai/tylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tylax-0.3.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
863a060e8bce14985fb18acf4d45cc1837d2310fafe1ad4125abb71e5e27ef1e - Sigstore transparency entry: 1440033250
- Sigstore integration time:
-
Permalink:
scipenai/tylax@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/scipenai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tylax-0.3.6-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tylax-0.3.6-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6756afc0d647c5a1412135846878e4c2720d098f0d62c8f07417b9b485a34aed
|
|
| MD5 |
d739875c61ca710d40b5e7579067580b
|
|
| BLAKE2b-256 |
03a01c4ae7df10e083662685f4d62b23ae033336e9c0823a17f1ec63ffbe707e
|
Provenance
The following attestation bundles were made for tylax-0.3.6-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
python-release.yml on scipenai/tylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tylax-0.3.6-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
6756afc0d647c5a1412135846878e4c2720d098f0d62c8f07417b9b485a34aed - Sigstore transparency entry: 1440033243
- Sigstore integration time:
-
Permalink:
scipenai/tylax@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/scipenai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tylax-0.3.6-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: tylax-0.3.6-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0d883a650c0e553fe5b36e968530f78cd0c61bd34dc03f6b5d6d1c2d5635d38
|
|
| MD5 |
2e85e43669bd5e11f5760f70497c0e01
|
|
| BLAKE2b-256 |
ba5e1d2c536e639ca31f8b7af362ada50467fe68090ae8859b254bc23811000a
|
Provenance
The following attestation bundles were made for tylax-0.3.6-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
python-release.yml on scipenai/tylax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tylax-0.3.6-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
e0d883a650c0e553fe5b36e968530f78cd0c61bd34dc03f6b5d6d1c2d5635d38 - Sigstore transparency entry: 1440033225
- Sigstore integration time:
-
Permalink:
scipenai/tylax@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/scipenai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@4cee7aca4bd672a6f582fed357aba3b1929099a2 -
Trigger Event:
push
-
Statement type: