Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

latexify_py

> 编程语言
Open source

A library to generate LaTeX expression from Python code.

7.6K stars0 likes3 views
WebsiteGitHub

About

A library to generate LaTeX expression from Python code.

latexify

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, which provides several use-cases of this library.

You can also try the above notebook on Google Colaboratory.

See also the official documentation for more details.

How to Contribute

To contribute to this project, please refer CONTRIBUTING.md.

Disclaimer

This software is currently hosted on https://github.com/google, but not officially supported by Google.

If you have any issues and/or questions about this software, please visit the issue tracker or contact the main maintainer.

License

This software adopts the Apache License 2.0.

Issues· 22 open

View all issuesOpen on GitHub
  • #108

    Add ability to generate latex from string that has the function definition

    featureUpdated Jan 19, 2026
  • #215

    Escaping underscores can't be turned off

    triageUpdated Oct 13, 2025
  • #214

    Support greek lambda character

    triageUpdated Apr 28, 2025
  • #200

    math.pow not working properly on google colab

    triageUpdated Mar 18, 2025
  • #213

    Be able to directly specify final latex representation of identifiers

    featureUpdated Feb 2, 2025
  • #211

    Expand support to torch

    featureUpdated Dec 21, 2024
  • #209

    OSS-Fuzz Integration

    featureUpdated May 19, 2024
  • #205

    LatexifyNotSupportedError: Unsupported AST: Slice | tensorflow

    featureUpdated May 5, 2024
  • #88

    Automatically detecting imported libraries

    featureUpdated May 2, 2024
  • #149

    Expand support for Numpy NDArray functions

    featureUpdated Nov 17, 2023

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言