././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 010212 x ustar 00 28 mtime=1744279816.6899176
python_markdown_math-0.9/ 0000755 0001751 0000166 00000000000 14775714411 015234 5 ustar 00runner docker ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1744279808.0
python_markdown_math-0.9/LICENSE 0000644 0001751 0000166 00000002736 14775714400 016247 0 ustar 00runner docker Copyright 2015-2025 Dmitry Shachnev
``` [upgrading documentation]: https://docs.mathjax.org/en/latest/upgrading/v2.html#math-script-example [Arithmatex]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/ Math Delimiters --------------- For inline math, use `\(...\)`. For standalone math, use `$$...$$`, `\[...\]` or `\begin...\end`. The single-dollar delimiter (`$...$`) for inline math is disabled by default, but can be enabled by passing `enable_dollar_delimiter=True` in the extension configuration. If you want to use [GitLab-style delimiters] (``$`...`$`` for inline math, and a code block-like `` ```math...``` `` syntax for standalone), use `use_gitlab_delimiters=True` configuration option. If you want to this extension to generate a preview node (which will be shown when MathJax has not yet processed the node, or when JavaScript is unavailable), use `add_preview=True` configuration option. [GitLab-style delimiters]: https://docs.gitlab.com/user/markdown/#math-equations Notes ----- If you use [ReText](https://github.com/retext-project/retext), this extension is not needed as it is included by default. This extension also works with Katex. Use the following in your page ``: ```html ``` ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1744279808.0 python_markdown_math-0.9/README.md 0000644 0001751 0000166 00000007176 14775714400 016524 0 ustar 00runner docker [][Actions] [Actions]: https://github.com/mitya57/python-markdown-math/actions Math extension for Python-Markdown ================================== This extension adds math formulas support to [Python-Markdown]. [Python-Markdown]: https://github.com/Python-Markdown/markdown Installation ------------ ### Install from PyPI ``` $ pip install python-markdown-math ``` ### Install locally Use `pip install .` to install this extension from a local Git checkout. The extension name is `mdx_math`, so you need to add that name to your list of Python-Markdown extensions. Check [Python-Markdown documentation] for details on how to load extensions. [Python-Markdown documentation]: https://python-markdown.github.io/reference/#extensions Usage ----- To use this extension, you need to include [MathJax] library in HTML files, like: ```html ``` [MathJax]: https://www.mathjax.org/ Also, you need to specify a configuration for MathJax. Please note that most of standard configurations include `tex2jax` extension, which is not needed with this code. Example of configuration for MathJax 2.x: ```html ``` If you want to use MathJax 3.x, you need to teach it to understand 2.x-style `\n' ``` Usage from the command line: ``` $ echo "\(e^x\)" | python3 -m markdown -x mdx_math
``` [upgrading documentation]: https://docs.mathjax.org/en/latest/upgrading/v2.html#math-script-example [Arithmatex]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/ Math Delimiters --------------- For inline math, use `\(...\)`. For standalone math, use `$$...$$`, `\[...\]` or `\begin...\end`. The single-dollar delimiter (`$...$`) for inline math is disabled by default, but can be enabled by passing `enable_dollar_delimiter=True` in the extension configuration. If you want to use [GitLab-style delimiters] (``$`...`$`` for inline math, and a code block-like `` ```math...``` `` syntax for standalone), use `use_gitlab_delimiters=True` configuration option. If you want to this extension to generate a preview node (which will be shown when MathJax has not yet processed the node, or when JavaScript is unavailable), use `add_preview=True` configuration option. [GitLab-style delimiters]: https://docs.gitlab.com/user/markdown/#math-equations Notes ----- If you use [ReText](https://github.com/retext-project/retext), this extension is not needed as it is included by default. This extension also works with Katex. Use the following in your page ``: ```html ``` ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1744279808.0 python_markdown_math-0.9/changelog 0000644 0001751 0000166 00000003456 14775714400 017114 0 ustar 00runner docker Version 0.9, 2025-04-10 ======================= * Fixed handling of begin/end inside inline math. - Thanks to Tianxiang Xia for the bug report. * Modernized packaging. * Python ≥ 3.9 and setuptools ≥ 77.0 are now required. Version 0.8, 2020-11-03 ======================= * GitLab-style math blocks are now supported in nested environments such as lists. - Thanks to Ran Shaham for the contribution. * Tests now pass with Python-Markdown 3.3. Version 0.7, 2020-06-19 ======================= * This extension now requires Python ≥ 3.4 and Python-Markdown ≥ 3.0. * Fixed deprecation warnings with Python-Markdown 3.x. * Added support for GitLab-style delimiters. Version 0.6, 2018-06-13 ======================= * Include LICENSE and tests in the tarball. Version 0.5, 2018-05-03 ======================= * Re-upload with fixed metadata and description. Version 0.4, 2018-05-03 ======================= * Added AsciiMath support. To switch from LaTeX syntax to AsciiMath, set the “use_asciimath” configuration option to true. * The dollar sign can now be escaped when the “enable_dollar_delimiter” option is enabled (\$ produces $). * Inline math can now be used inside standalone math. Version 0.3, 2017-03-24 ======================= * Added “add_preview” configuration option, which adds preview nodes as recognized by MathJax before every script node. - Thanks to Antoine Amarilli and Danni Randeris for their initial work. * Added a test suite. * Documentation improvements. Version 0.2, 2015-12-05 ======================= * Fix compatibility with earlier Python-Markdown versions. - Thanks to Bryan A. Jones for the contribution. * Add installation instructions from PyPI. - Thanks to Drew Hubl for the contribution. Version 0.1, 2015-08-12 ======================= * Initial release. ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1744279808.0 python_markdown_math-0.9/mdx_math.py 0000644 0001751 0000166 00000013073 14775714400 017411 0 ustar 00runner docker ''' Math extension for Python-Markdown ================================== Adds support for displaying math formulas using [MathJax](http://www.mathjax.org/). Author: 2015-2025, Dmitry Shachnev