pandoc-static-katex
A simple pandoc filter that uses KaTeX to render math equations at build time. It makes possible to display equations without any JavaScript execution in the browser.
Example usage
$ cat math.md
# A title and whatnot.
This is inline $\log(\frac{1}{2})$ and this is display:
$$
\int_{-\infty}^{+\infty}\LambdaLamda(x)dx
$$
$ pandoc -s math.md --filter pandoc-static-katex --to html5 --css https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css -o math.html
Note that the --katex option of pandoc option doesn't add the styles since
pandoc doesn't see any math element after the filter pass.
Installation
The script can be installed by pip:
python3 -m pip install pandoc_static_katex
The filter runs in Python 3.7+.
When the filter is run, KaTeX needs to be installed with nodejs; the command
npx katex
must work on the current path. The filter has been developed with version 0.10.2 of KaTeX.
Additionally, pandoc is needed for most usages.
Development mode
It requires flit to be installed from source in development mode.
flit install --symlink
Test script
If pandoc, katex and the filter have all been installed correctly, the
command:
python3 run_test.py
should produce rendered results in the test_results folder.
Metadata
Release files for pandoc_static_katex 0.1.3
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 |
|---|---|---|---|---|
| pandoc_static_katex-0.1.3.tar.gz | 5.2 kB | Without provenance | Details for pandoc_static_katex-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandoc_static_katex-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pandoc_static_katex-0.1.3-py3-none-any.whl |
Total release size: 8.9 kB
Release files / pandoc_static_katex-0.1.3.tar.gz
| Download URL | pandoc_static_katex-0.1.3.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de0481393617991c7921288b7865de75498675adfb3e9138a32a78007b79cb81
|
|
BLAKE2b-256 checksum How to use checksums |
276c8d96bf67bf6dc7ea30f0f7ce6d334e3d826782a54e57a2f5b548456a4072
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.0
|
Release files / pandoc_static_katex-0.1.3-py3-none-any.whl
| Download URL | pandoc_static_katex-0.1.3-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f280d6c78e2dbdf0e47bedc28ace94ce618f24ac49b23087f9cdc3b6236f838d
|
|
BLAKE2b-256 checksum How to use checksums |
93eceeebea6649adfae48c0c8cf68d93cd8157a97dfe0d1da5d22edbe7ec388e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.0
|
Security for pandoc_static_katex 0.1.3
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.