Python library for encoding unicode to latex and for parsing LaTeX to generate unicode text
Project description
Python library for encoding unicode to latex and for parsing LaTeX to generate unicode text.
Unicode Text to LaTeX code
latexencode.py provides a function utf8tolatex() which, as its name suggests, 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.py as a script 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.
Parsing LaTeX code & converting to plain text (unicode)
latexwalker.py provides a series of routines (in particular, start with get_latex_nodes()), 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.
latex2text.py builds up on top of latexwalker.py, and provides functions to convert given LaTeX code to plain text with unicode characters.
Note that you can also run latex2text.py as a script 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/ .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pylatexenc-1.5.tar.gz
.
File metadata
- Download URL: pylatexenc-1.5.tar.gz
- Upload date:
- Size: 47.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.8.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.8.0 clint/0.5.1 CPython/2.7.16 Darwin/18.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef2d5260c38e2cb4d2829e8b918914a558557820d4f57cb6588a81e827de2bb3 |
|
MD5 | 2de03e14af97b6866d0a0dcabb18aa56 |
|
BLAKE2b-256 | 2d4493573fef5cb46842ce9a87548008bea92c8f7523c7c2152cfdffee269ed5 |