Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tk-21st/latex-to-myst
LaTeX to MyST parser
https://github.com/tk-21st/latex-to-myst
latex myst pandoc-filter python
Last synced: 25 days ago
JSON representation
LaTeX to MyST parser
- Host: GitHub
- URL: https://github.com/tk-21st/latex-to-myst
- Owner: TK-21st
- License: bsd-3-clause
- Created: 2021-11-02T12:29:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-13T23:56:56.000Z (over 2 years ago)
- Last Synced: 2024-11-15T10:25:12.227Z (2 months ago)
- Topics: latex, myst, pandoc-filter, python
- Language: Python
- Homepage: https://tk-21st.github.io/latex-to-myst/
- Size: 1.62 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- License: LICENSE
Awesome Lists containing this project
README
===========================
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 :code:`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 :code:`{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 :code:`{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... _`panflute`: https://github.com/sergiocorreia/panflute
.. _`Sphinx-proof Directives`: https://sphinx-proof.readthedocs.io/en/latest/syntax.html#collection-of-directives
.. _`amsthm`: https://ctan.org/pkg/amsthm?lang=en`
.. _`known issues`: https://github.com/TK-21st/latex-to-myst/issues/1
.. _`pandoc`: https://pandoc.org/