pylatexenc
Simple LaTeX parser providing latex-to-unicode and unicode-to-latex conversion
Unicode Text to LaTeX code
The pylatexenc.latexencode module provides a function unicode_to_latex() which converts a unicode string into LaTeX text and escape sequences. It should recognize accented characters and most math symbols. A couple of switches allow you to alter how this function behaves.
You can also run latexencode in command-line to convert plain unicode text (from the standard input or from files given on the command line) into LaTeX code, written on to the standard output.
A third party plug-in for Vim vim-latexencode by @Konfekt provides a corresponding command to operate on a given range.
Parsing LaTeX code & converting to plain text (unicode)
The pylatexenc.latexwalker module provides a series of routines that parse the LaTeX structure of given LaTeX code and returns a logical structure of objects, which can then be used to produce output in another format such as plain text. This is not a replacement for a full (La)TeX engine, rather, this module provides a way to parse a chunk of LaTeX code as mark-up code.
The pylatexenc.latex2text module builds up on top of pylatexenc.latexwalker and provides functions to convert given LaTeX code to plain text with unicode characters.
You can also run latex2text in command-line to convert LaTeX input (either from the standard input, or from files given on the command line) into plain text written on the standard output.
Documentation
Full documentation is available at https://pylatexenc.readthedocs.io/.
License
See LICENSE.txt (MIT License).
NOTE: See copyright notice and license information for file tools/unicode.xml provided in tools/unicode.xml.LICENSE. (The file tools/unicode.xml was downloaded from https://www.w3.org/2003/entities/2007xml/unicode.xml as linked from https://www.w3.org/TR/xml-entity-names/#source.)
Metadata
Release files for pylatexenc 2.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylatexenc-2.11.tar.gz | 165.7 kB | Without provenance | Details for pylatexenc-2.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylatexenc-2.11-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pylatexenc-2.11-py2.py3-none-any.whl |
Total release size: 303.3 kB
Release files / pylatexenc-2.11.tar.gz
| Download URL | pylatexenc-2.11.tar.gz |
|---|---|
| Size | 165.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
305a072a99ce736246049c9da05841b9d718c0f7ea8888f5f596cf15cb621053
|
|
BLAKE2b-256 checksum How to use checksums |
5245ddb0fb04acf95fe9cf9c369814dbdd08651bd2c9ee455f142651e06f4488
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.16
|
Release files / pylatexenc-2.11-py2.py3-none-any.whl
| Download URL | pylatexenc-2.11-py2.py3-none-any.whl |
|---|---|
| Size | 137.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e78e7391d6c104f1ed150e21cfaa58016cdb50aa54406a2eecb793649ffdfdd0
|
|
BLAKE2b-256 checksum How to use checksums |
e7063d67bd912ef337aa4856b466121d03f304aa1bb4d804f9298b6227cd227e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.16
|
Security for pylatexenc 2.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.