djangocms-katex
Provides a django CMS plugin to render formulae using KaTeX and its mhchem extension.
The plugin can display formulae either inline or in display mode. It is text-enabled, and you can add equations to rich text fields of djangocms-text-ckeditor.
The plugin form has a preview functionality that either shows the typed formula. Errors are shown in red.
Installation
For a manual install:
-
run
pip install djangocms-katex -
add the following entries to your
INSTALLED_APPS:"djangocms_katex", -
run
python manage.py migrate
The Code plugin uses the ace code editor which is loaded from a CDN by default.
If you want the ace code editor to be served from static files, please use
djangocms-katex[static-ace] instead of djangocms-katex in your
requirements or with pip. Make the static files for the ace code editor available
to your project by adding djangocms_static_ace to your project's
INSTALLED_APPS.
djangocms-text-ckeditor's inline functionality might interfere with KaTeX's layout.
To ensure a great editing experience deactivate it if you use djangocms-katex by
removing TEXT_INLINE_EDITING = True from your settings.py file.
Usage
Once installed, a new puling ("KaTeX formula") is available and can be entered into any placeholder or within a text plugin.
djangocms-katex only loads required LaTeX JavaScript libraries on demand only. This might lead to formulae initially only shown in source code. To see the rendered formula in such a case, please reload the page which ensures that all required JavaScript is loaded.
Release files for djangocms-katex 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| djangocms_katex-1.0.2.tar.gz | 1.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djangocms_katex-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.7 MB
Release files / djangocms_katex-1.0.2.tar.gz
| Download URL | djangocms_katex-1.0.2.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b154d16c52c5e78d236259c07fd140e674647895488f3255a1e1a305865144f
|
|
BLAKE2b-256 checksum How to use checksums |
1b3be4a995fdb75a5c6a0f58c9a5f2c5b203276a1e8668e8d37a4e7107421e8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / djangocms_katex-1.0.2-py3-none-any.whl
| Download URL | djangocms_katex-1.0.2-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79774fa17f7d328252f6dd05688799fa7ee49abebb7cbe09f0cbf6f103352ac2
|
|
BLAKE2b-256 checksum How to use checksums |
fd002b6791be3ad77c38389c629de9d6adc270fe7d9d5652b81296bf0922f8a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|