# google/latexify_py

A library to generate LaTeX expression from Python code.

Repository: https://github.com/google/latexify_py
Canonical: https://ross.abutalabs.com/products/latexify_py
Language: Python
License: Apache-2.0
License Family: permissive
Archived: true
Last push: 2025-02-13T01:27:01+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 6, release rhythm 8, longevity 100
- inputs: {"age_days": 2230, "days_push": 567, "days_rel": 621, "gap_med": null, "n_releases_24m": 1}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7623, forks 394 (observed 2026-08-28T04:10:02.067297+00:00)

## What it is
A Python library that compiles Python source code or AST fragments into corresponding LaTeX math expressions. It includes IPython integration for pretty-printing compiled functions in notebooks.

## Use cases
- convert python functions to latex equations
- render math formulas from code in jupyter notebooks
- generate latex documentation for algorithms
- pretty-print symbolic math from python source
- turn python code into tex expressions for papers

## When to choose
- you want deterministic, rule-based conversion of Python functions to LaTeX without AI
- you work in Jupyter/IPython and want equations rendered from code
- you need to document mathematical algorithms in papers or notes

## When to avoid
- you need to convert arbitrary Python programs, not math-like functions
- you want ML-based code-to-LaTeX translation of handwritten or non-Python input
- you need full TeX document generation rather than expressions

## Facets
- artifact type: library
- maturity: active
- function: parser, serialization, developer-tools
- domain: developer-tools, education, mathematics, documentation
- platform: python, cross-platform
- tags: latex, math-notation, ipython, code-to-latex, ast-transformation

## Member repositories
- google/latexify_py (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:02.067297+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:36:48.608402+00:00, confidence not recorded.
  - readme: https://github.com/google/latexify_py (fetched 2026-08-28T04:10:02.067297+00:00, sha 007078f6ff9a)
  - registry_pypi: https://pypi.org/pypi/latexify_py/json (fetched 2026-08-29T08:31:55.795050+00:00, sha 643fbc57bec7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
