django-latexify let’s you easily render text and math equations from your template to look like LaTeX. The app lets you render math equations written in LaTeX on your HTML, or even just regular plain text.
It uses Katex (a fast, easy-to-use JavaScript library for TeX math rendering on the web) for rending math equations and a modification of WiTex (LaTeX like CSS) for rending plain text.
installation
python setup.py install
Quick start
Add “latexify” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'latexify', ... )In your template, load latexify by including:
{% load latexify %}In the HTML header of your template, include:
{% include 'latexify/stylesheets.html' %}In the bottom of your HTML body, include the following to load the JS associated with latexify:
{% include "latexify/scripts.html" %}Latexify your text by including the template tag, for example
{% latexify context_arg %} {% latexify context_arg parse_math=True %} {% latexify 'c = \pm\sqrt{a^2 + b^2}' math_inline=True %} {% latexify 'c = \pm\sqrt{a^2 + b^2}' math_block=True %}
Which will give you the following:
In your HTML, be sure to include this before the <html> tag.
<!DOCTYPE html>
Contributing
Fork it!
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am ‘Add some feature’
Push to the branch: git push origin my-new-feature
Submit a pull request :D
License
All parts of django-latexify are free to use and abuse under the open-source MIT license.
Change Log
Version 0.2:
Support python3.
Metadata
Release files for django-latexify 0.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 | |
|---|---|---|---|---|
| django-latexify-0.3.tar.gz | 7.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_latexify-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / django-latexify-0.3.tar.gz
| Download URL | django-latexify-0.3.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3dbd52e8a7a4844e01536b7f617fac0f6e8a411bb7a1ed9ba24dd0b7e63ce427
|
|
BLAKE2b-256 checksum How to use checksums |
fe516556fcf531ce8cb67031770df1116fc733f8ec504c4e7c75db3875b20579
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6
|
Release files / django_latexify-0.3-py3-none-any.whl
| Download URL | django_latexify-0.3-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfc62937b3e9aee71a5bc854359793c9a82790a799d5b85b9cf35dd23a1ab7c9
|
|
BLAKE2b-256 checksum How to use checksums |
8fe41bda0b4974721b663b991ec6f6fff0dcea1fbf359eae5b36c07e84ee4c95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6
|
Security for django-latexify 0.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.