Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
wagtail-polymath allows you to write equations in your Wagtail content using markup and render them beautifully.
wagtail-polymath provides a MathBlock
so you can write equations in markup
(TeX, MathML, ASCIIMath) and render them with MathJax. It features a
live preview:
MathBlock
uses MathJax for rendering so there is very little to do on
the front end. Simply include the MathJax JS and render the raw
MathBlock
content as you would for any other streamfield plain text
block.
wagtail-polymath even includes a template tag to include the MathJax JS for you from a CDN. By default, MathJax is configured to accept all recognised markup (TeX, MathML, ASCIIMath) and renders them to HTML. To change the configuration, you can pass the desired config command to the templatetag. See the MathJax documentation for possible configurations.
For help on using the markup languages see the relevant MathJax documentation (e.g. https://docs.mathjax.org/en/v2.7-latest/tex.html) and the markup language-specific documentation (e.g. https://en.wikibooks.org/wiki/LaTeX)
Install wagtailmath:
pip install wagtailmath
Add it to your INSTALLED_APPS
:
# settings.py
INSTALLED_APPS = (
# ...
"wagtailmath",
# ...
)
Use MathBlock
in your StreamField
content:
from wagtailmath.blocks import MathBlock
class MyPage(Page):
body = StreamField([
('heading', blocks.CharBlock(classname="full title")),
('paragraph', blocks.RichTextBlock()),
('equation', MathBlock())
])
Use the mathjax
template tag in your front end template to load the
MathJax library:
{% load wagtailmath %}
...
<script src="{% mathjax %}"></script>
All contributions are welcome! See CONTRIBUTING.md
Supported versions:
FAQs
Wagtail StreamField block for rendering mathematical equations
We found that wagtailmath demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.