Skip to main content

LaTeX to MyST converter

Project description

LaTeX to MyST Pandoc Filter

Latex-to-MyST implements a pandoc filter that converts a subset of LaTeX environments to MyST directives. Although it is probably more pandoc compatible to write a custom pandoc writer instead of using RawBlocks and RawInline to mimics one, the existence of panflute makes it much easier for python developers like me to work with filters instead of writers.

To use this filter, install the package by:

pip install latex_to_myst

which adds a cli latex2myst, which can be used to convert latex file to myst by calling:

latex2myst latex_file.tex markdown_file.md

LaTex Environments to MyST Directives

Latex-to-Myst Current supports:

  1. All amsthm blocks,

  2. Display Math

  3. Subplots in the form of {list-table}.

Many LaTeX environments need to be converted in to MyST directives. amsthm for example, can be visualized using the experimental Sphinx-proof Directives.

Unfortunately, MyST does not have native support for subplots, and neither does pandoc. To circumvent the problem, the best solution for now is to use a {list-table} directive. However, this still needs to be fixed as there are some known issues that need to be addressed.

Work in Progress / Known Issues

There are some known issues need to be addressed.

Credits

This module uses panflute heavily.

History

0.0.1 (2021-11-04)

  • First release on PyPI.

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

latex_to_myst-0.0.1.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

latex_to_myst-0.0.1-py2.py3-none-any.whl (14.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file latex_to_myst-0.0.1.tar.gz.

File metadata

  • Download URL: latex_to_myst-0.0.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for latex_to_myst-0.0.1.tar.gz
Algorithm Hash digest
SHA256 638621293ee58be1ca4af803172e0bf421bb5d1de042d203254d737a352eee8e
MD5 8ff6c41beab74bfb1905f6e66964c2c9
BLAKE2b-256 26ccdb9c9d909e1ca32ccbf8482256c9cd9e6a45eeaa402555058c17ab5b14a3

See more details on using hashes here.

File details

Details for the file latex_to_myst-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: latex_to_myst-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for latex_to_myst-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 af2d992add119897b6b3ef1b6f1a2d88ea36946006afde049cd13a9048ade209
MD5 888ce00f01a0e5fd08220603a028fa59
BLAKE2b-256 a46cbbcd263433938944b6ae5b1701620630b88764e1c5bf8df2b52853cac2a1

See more details on using hashes here.

Supported by

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