https://github.com/google/latexify_py
A library to generate LaTeX expression from Python code.
https://github.com/google/latexify_py
Last synced: about 1 month ago
JSON representation
A library to generate LaTeX expression from Python code.
- Host: GitHub
- URL: https://github.com/google/latexify_py
- Owner: google
- License: apache-2.0
- Created: 2020-07-25T12:50:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-13T01:27:01.000Z (4 months ago)
- Last Synced: 2025-05-07T07:13:48.416Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 317 KB
- Stars: 7,476
- Watchers: 56
- Forks: 398
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesomeLibrary - latexify_py - A library to generate LaTeX expression from Python code. (语言资源库 / python)
README
# latexify
[](https://pypi.org/project/latexify-py/)
[](https://pypi.org/project/latexify-py/)
[](https://github.com/google/latexify_py/blob/main/LICENSE)
[](https://pepy.tech/project/latexify-py)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)`latexify` is a Python package to compile a fragment of Python source code to a
corresponding $\LaTeX$ expression:
`latexify` provides the following functionalities:
* Libraries to compile Python source code or AST to $\LaTeX$.
* IPython classes to pretty-print compiled functions.## FAQs
1. *Which Python versions are supported?*
Syntaxes on **Pythons 3.9 to 3.13** are officially supported, or will be supported.
2. *Which technique is used?*
`latexify` is implemented as a rule-based system on the official `ast` package.
3. *Are "AI" techniques adopted?*
`latexify` is based on traditional parsing techniques.
If the "AI" meant some techniques around machine learning, the answer is no.## Getting started
See the
[example notebook](https://github.com/google/latexify_py/blob/main/examples/latexify_examples.ipynb),
which provides several
use-cases of this library.You can also try the above notebook on
[Google Colaboratory](https://colab.research.google.com/github/google/latexify_py/blob/main/examples/latexify_examples.ipynb).See also the official
[documentation](https://github.com/google/latexify_py/blob/main/docs/index.md)
for more details.## How to Contribute
To contribute to this project, please refer
[CONTRIBUTING.md](https://github.com/google/latexify_py/blob/develop/CONTRIBUTING.md).## Disclaimer
This software is currently hosted on , but not officially
supported by Google.If you have any issues and/or questions about this software, please visit the
[issue tracker](https://github.com/google/latexify_py/issues)
or contact the [main maintainer](https://github.com/odashi).## License
This software adopts the
[Apache License 2.0](https://github.com/google/latexify_py/blob/develop/LICENSE).