python-markdown-math | Math extension for Python-Markdown | Math library
kandi X-RAY | python-markdown-math Summary
kandi X-RAY | python-markdown-math Summary
Math extension for Python-Markdown
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Process HTML tag
- Creates a new element for the given node
- Handle match
python-markdown-math Key Features
python-markdown-math Examples and Code Snippets
${\{y_{i}, x_{i1}, ..., x_{id}\}}_{i=1}^{n}$
pip install python-markdown-math
markdown.markdown(src, extensions=['mdx-math'])
markdown.markdown(
src,
exten
Community Discussions
Trending Discussions on python-markdown-math
QUESTION
I'm trying to figure out how to render markdown syntax in a similar way than Math StackExchange site. I want it to do with a python library instead of any sort of command line tool.
After a lot of researching I've found markdown and python-markdown-math, so I've decided to go with them. To use both I've just installed them like:
pip install markdown
pip install python-markdown-math
That said, let's start by analizing a little example of the output generated by the math stackexchange site:
And now, let's try to achieve a similar result using markdown
and python-markdown-math
libraries:
ANSWER
Answered 2019-Jan-25 at 22:28As I said in comments the library you use is a thin wrapper that converts Markdown into a format compatible with the MathJax JS-library.
If you are OK with the final rendering performed on the client-side as the SO really does, you need to load and configure the MathJax in your page. You need to read details of the configuration in the documentation of the MathJax here and here. Some (non-minimal) configuration that made your example work for me is:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install python-markdown-math
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page