Skip to main content

Easy LaTeX rendering for Django.

Project description

|pypi| |travis| |coveralls| |quality| |maintain| |website| |license|

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.


python install

Quick start

1. Add "latexify" to your INSTALLED_APPS setting like this:

.. code-block:: python


2. In your template, load latexify by including::

{% load latexify %}

3. In the HTML header of your template, include::

{% include 'latexify/stylesheets.html' %}

4. In the bottom of your HTML body, include the following to load the JS associated with latexify::

{% include "latexify/scripts.html" %}

5. Latexify your text by including the template tag, for example

.. code-block:: html

{% 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:



1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D


All parts of django-latexify are free to use and abuse under the `open-source MIT license <>`_.

.. |logo| image::
:width: 100px
:alt: django-latexify
.. |example| image::
:scale: 50 %
.. |travis| image::
:alt: Build Status - master branch
.. |coveralls| image::
.. |pypi| image::
:alt: Latest PyPI version
.. |license| image::
:alt: Software license
.. |website| image::
.. |quality| image::
.. |maintain| image::

Project details

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_latexify-0.2.1-py2.py3-none-any.whl (16.0 kB 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