pylatexenc
Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion
Decision gist · record as of 2026-08-14
Yes. The package is lightweight (no dependencies), actively maintained, permissively licensed, and fills a specific need for LaTeX-Unicode conversion. It ranks in the top 5000 PyPI packages by downloads and has been stable for over a decade. Install it if you work with LaTeX text processing, bibliographic data, or need bidirectional LaTeX-Unicode conversion.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained with a recent release 20 days ago and consistent commit history; the project has 423 stars and has been stable since its first release in 2015.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions—just retain the license notice.
last release 2026-07-25 (20 days) · last repo commit 2026-08-07 · 423 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,202,657 downloads/mo, #2,141 on PyPI
Alternatives
Verify before relying
pip install pylatexenc
from pylatexenc.latex2text import LatexNodes2Text
from pylatexenc.latexencode import unicode_to_latex
# Convert LaTeX to Unicode
converter = LatexNodes2Text()
plain_text = converter.latex_to_text(r'\'{e}cole')
# Convert Unicode to LaTeX
latex_code = unicode_to_latex('école')- Whether the package supports Python 2.7 in practice or only in classifiers (classifiers list 2.7 but requires_python is unspecified)
What it is and what it does
pylatexenc is a lightweight LaTeX parser and encoder that bridges LaTeX markup and Unicode text. It provides two main capabilities: parsing LaTeX code into a logical structure (via latexwalker) and converting between Unicode strings and LaTeX escape sequences. The package recognizes accented characters, math symbols, and common LaTeX commands, making it useful for applications that need to work with LaTeX-formatted text or convert between LaTeX and plain Unicode representations.
The package has no external runtime dependencies, making installation straightforward. It includes command-line tools (latex2text and latexencode) for batch conversions and is actively maintained with broad platform support (Linux, macOS, Windows). The codebase has been stable since 2015 and receives regular updates.
Use it for
- Convert academic paper titles or bibliographic data from LaTeX to plain Unicode for display in web applications or databases.
- Encode user-supplied Unicode text (names, accented characters, symbols) into LaTeX-safe escape sequences for inclusion in generated LaTeX documents.
- Parse and extract plain text from LaTeX source files for indexing, searching, or text analysis workflows.
- Build tools that process LaTeX markup as structured data rather than raw text, such as document processors or metadata extractors.
- Normalize LaTeX-encoded strings in legacy data systems by converting them to standard Unicode representation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is lightweight (no dependencies), actively maintained, permissively licensed, and fills a specific need for LaTeX-Unicode conversion. It ranks in the top 5000 PyPI packages by downloads and has been stable for over a decade. Install it if you work with LaTeX text processing, bibliographic data, or need bidirectional LaTeX-Unicode conversion.
Install
pylatexenc on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with a recent release 20 days ago and consistent commit history; the project has 423 stars and has been stable since its first release in 2015.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions—just retain the license notice.
Quickstart
pip install pylatexenc
from pylatexenc.latex2text import LatexNodes2Text
from pylatexenc.latexencode import unicode_to_latex
# Convert LaTeX to Unicode
converter = LatexNodes2Text()
plain_text = converter.latex_to_text(r'\'{e}cole')
# Convert Unicode to LaTeX
latex_code = unicode_to_latex('école')
Verify before relying
- Whether the package supports Python 2.7 in practice or only in classifiers (classifiers list 2.7 but requires_python is unspecified)
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 20 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,202,657 / month, #2,141 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Scientific/EngineeringTopic :: Text Processing :: GeneralTopic :: Text Processing :: Markup :: LaTeX |
Evidence: pylatexenc-2.11-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “parse latex markup”
- pylatexencConverts between LaTeX code and Unicode text in both directions,…
- py-asciimathConverts between ASCIIMath, LaTeX, and MathML mathematical notation…
- latex2sympy2Parses LaTeX math expressions and converts them to SymPy symbolic…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also latexcodec · PyLaTeX · pybtex · latex2sympy2 · py-asciimath · latex2sympy2-extended · ansi2html · pyth3 · latex2mathml · docutils