Skip to main content

DjangoCMS plugin to write equations, utilizing KaTeX

Project description

djangocms-equation

PyPi Version Supported Python Versions License

Test Status Documentation Status Code Coverage This project is using Percy.io for visual regression testing.

Dependabot Status Codacy code quality Code style Python: black Code style TypeScript: prettier

DjangoCMS plugin to write equations, utilizing KaTeX

Features

  • Enables the use of LaTeX for equations with django-cms
  • Live editing of LaTeX Code, via KaTeX
  • Out of the box support for mhchem
  • Configurable allowing of copying of equation LaTeX code

Installation

Install the plugin from PyPi

$ pip install djangocms-equation

Add the plugin to the installed apps in the settings.py of your django-cms project.

"INSTALLED_APPS": [..., "djangocms_equation"]

For the Equations to be properly displayed in djangocms-text-ckeditor, while edit them, you need to add the css file to the allowed files of ckeditor. To do this simply add the following lines to your settings.py of your django-cms project.

CKEDITOR_SETTINGS = {
    "contentsCss": ["/static/djangocms_equation/css/change_form_template.css"]
}

Note:

The equations might not be rendered properly in ckeditor-windows, when they are added the first time. This can be fixed by saving the text plugin or having another equation on the page.

To allow copying of equations LaTeX code, add the following line to your settings.py.

"KATEX_EQUATION_SETTINGS" = {"allow_copy": True}

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.1 (2020-02-20)

  • Added project urls and removed conda badge

0.1.0 (2020-02-20)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms-equation-0.1.1.tar.gz (1.5 MB view hashes)

Uploaded Source

Built Distribution

djangocms_equation-0.1.1-py2.py3-none-any.whl (1.5 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page