././@PaxHeader 0000000 0000000 0000000 00000000034 00000000000 010212 x ustar 00 28 mtime=1604424737.3620787
python-markdown-math-0.8/ 0000755 0001750 0001750 00000000000 00000000000 015054 5 ustar 00dmitry dmitry ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1528890100.0
python-markdown-math-0.8/LICENSE 0000644 0001750 0001750 00000002736 00000000000 016071 0 ustar 00dmitry dmitry Copyright 2015-2017 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://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#math 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 ``` Platform: UNKNOWN Requires-Python: >=3.6 Description-Content-Type: text/markdown ././@PaxHeader 0000000 0000000 0000000 00000000026 00000000000 010213 x ustar 00 22 mtime=1591698367.0 python-markdown-math-0.8/README.md 0000644 0001750 0001750 00000007214 00000000000 016337 0 ustar 00dmitry dmitry [][Travis] [Travis]: https://travis-ci.org/mitya57/python-markdown-math 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 `setup.py build` and `setup.py install` to build and install this extension, respectively. 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://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#math 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=1604423536.0 python-markdown-math-0.8/changelog 0000644 0001750 0001750 00000003107 00000000000 016727 0 ustar 00dmitry dmitry 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=1604251660.0 python-markdown-math-0.8/mdx_math.py 0000644 0001750 0001750 00000012744 00000000000 017237 0 ustar 00dmitry dmitry # -*- coding: utf-8 -*- ''' Math extension for Python-Markdown ================================== Adds support for displaying math formulas using [MathJax](http://www.mathjax.org/). Author: 2015-2020, Dmitry Shachnev