Skip to main content

math-svg: A Plugin for Pelican

Build Status PyPI Version License

Render math expressions to svg and embed them.

Installation

This plugin can be installed via:

python -m pip install pelican-math-svg

Requirements

  • required LaTeX tools (all included in TeX Live and possibly other LaTeX distributions):
    • lualatex (or another LaTeX compiler if changed in the settings, see below)
    • pdfcrop
    • dvisvgm
  • scour (optional)
  • svgo (optional)

Configuration

In your pelicanconf.py you can use the following options to tweak the behavior of the plugin:

Setting Description Default Value
`MATH_SVG["titles"] Whether to generate <title> tags containing the raw LaTeX code (recommended for accessibility). True
MATH_SVG["scale_inline"] scaling factor for inline math 1.0
MATH_SVG["scale_display"] scaling factor for display math 1.0
MATH_SVG["latex"]["args"] CLI arguments of the invoked LaTeX compiler "--interaction=errorstopmode", "--halt-on-error"
MATH_SVG["latex"]["preamble"] preamble of the generated LaTeX document [r"\documentclass[crop,border={2pt 0pt}]{standalone}",r"\usepackage{amsmath}",r"\usepackage{amssymb}",]
MATH_SVG["latex"]["program"] LaTeX compiler to use lualatex
MATH_SVG["pdfcrop"]["args"] CLI arguments for pdfcrop --hires
MATH_SVG["dvisvgm"]["args"] CLI arguments for dvisvgm ["--pdf", "--optimize=all", "--no-fonts", "--exact-bbox"]
MATH_SVG["scour"]["args"] CLI arguments for scour ["--strip-xml-prolog", "--remove-descriptions", "--remove-metadata", "--enable-comment-stripping", "--strip-xml-space", "--enable-id-stripping",]
MATH_SVG["scour"]["enabled"] whether to use scour to optimize SVG output True if scour is in $PATH, False otherwise
MATH_SVG["svgo"]["args"] CLI arguments for svgo ["--multipass", "--precision", "5"]
MATH_SVG["svgo"]["enabled"] whether to use svgo to optimize SVG output True if svgo is in $PATH, False otherwise

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

License

This project is licensed under the GPLv3 license.

Metadata

Release files for pelican-math-svg 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-math-svg 0.6.0
File Size Uploaded Provenance Actions
pelican-math-svg-0.6.0.tar.gz 20.1 kB Without provenance Details for pelican-math-svg-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pelican-math-svg 0.6.0
File Interpreter ABI Platform Actions
pelican_math_svg-0.6.0-py3-none-any.whl Python 3 none any Details for pelican_math_svg-0.6.0-py3-none-any.whl

Total release size: 41.1 kB

Release files / pelican-math-svg-0.6.0.tar.gz

Download URL pelican-math-svg-0.6.0.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ada98a90d8245ba803c55a42a97c18bfc63af7a1ae4b6f8c410e43e650d5ce01
BLAKE2b-256 checksum
How to use checksums
2c31488854570473b45d2a9784fec69803c65c4e0e48d4d1c001acccaa3d8513
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.7.11 Linux/5.8.0-1039-azure

Release files / pelican_math_svg-0.6.0-py3-none-any.whl

Download URL pelican_math_svg-0.6.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31edafe8ae46ecbe2b7a010911d82964cef48d0b63fcdb46843dcd6271fbbeea
BLAKE2b-256 checksum
How to use checksums
85eda544d3a7a7e4cbc8c8be7d2386ab2ff3c50b50c9d38572046d9de5a60c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.7.11 Linux/5.8.0-1039-azure

Security for pelican-math-svg 0.6.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page