Python KaTeX
Contains functionality to convert an image into KaTeX, using \rules
Also currently only set up to work with Facebook Messengers KaTeX setup, but it should be simple to adapt for other applications.
More functionality is planned, and PRs welcome!
Installation
$ # This will install the python package `katex`, along with the shell command
$ # `image_to_katex`
$ pip install katex
Basic usage
$ # This will generate KaTeX output for that image, where the image is scaled
$ # down to 30 pixels, and where each pixel is 5 units wide
$ image_to_katex image.png -s 30 -ps 5
$ # Display help message
$ image_to_katex --help
Facebook KaTeX info
KaTeX version: v0.8.2 (17/8-2017)
Max length of Facebook messages is 20000 chars.
Facebook renders any KaTeX error messages in the html title attribute.
You can use $$ or \(+\) as delimeters. $$ renders the LaTeX in displayMode, \(+\) renders it inline.
Facebook wraps all inputs in a \color block, like this: \color{#fff}{inp}, where inp is the input
Known KaTeX options:
- displayMode = true if
$$else false - colorIsTextColor: false
- maxSize: 50
- maxExpand = 25
Metadata
Release files for katex 0.0.4
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 |
|---|---|---|---|---|
| katex-0.0.4.tar.gz | 5.3 kB | Without provenance | Details for katex-0.0.4.tar.gz |
Release files / katex-0.0.4.tar.gz
| Download URL | katex-0.0.4.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb5a21808163d6c80c95607cc20df217a4f4fa8d14e99cb6cfde020348b15d98
|
|
BLAKE2b-256 checksum How to use checksums |
2a35a6a790a8a37fa741851dfe4df92ec729153833cbb6d24be97581875c4dd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.14.0 CPython/3.4.3
|
Security for katex 0.0.4
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.