如何在一般github的markdown中显示数学方程(不是github的博客) [英] How to show math equations in general github's markdown(not github's blog)
问题描述
经过调查,我发现 mathjax 可以做到这一点.但是当我在 Markdown 文件中写一些例子时,它没有显示正确的方程:
我在markdown文件的头部添加了这个:
然后输入 mathjax 语句:
(E=mc^2),$$x_{1,2} = frac{-b pm sqrt{b^2-4ac}}{2b}.$$
但是 github 没有显示任何数学符号!请帮帮我,谢谢!告诉我如何在 github markdown 页面中显示数学符号.
但是 github 没有显示任何数学符号!请帮帮我,谢谢!
GitHub 降价解析由 .您可以轻松找到帮助您完成该任务的在线工具,例如 www.url-encode-decode.com
After investigating, I've found mathjax can do this. But when I write some example in my markdown file, it doesn't show the correct equations:
I have added this in the head of markdown file:
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>
And type the mathjax statement:
(E=mc^2),$$x_{1,2} = frac{-b pm sqrt{b^2-4ac}}{2b}.$$
But github shows nothing for the math symbols! Please help me, thanks! Tell me how to show math symbols in github markdown pages.
But github show nothing for the math symbols! please help me, thanks!
GitHub markdown parsing is performed by the SunDown (ex libUpSkirt) library.
The motto of the library is "Standards compliant, fast, secure markdown processing library in C". The important word being "secure" there, considering your question :).
Indeed, allowing javascript to be executed would be a bit off of the MarkDown standard text-to-HTML contract.
Moreover, everything that looks like a HTML tag is either escaped or stripped out.
Tell me how to show math symbols in general github markdown.
Your best bet would be to find a website similar to yuml.me which can generate on-the-fly images from by parsing the provided URL querystring.
Update
I've found some sites providing users with such service: codedogs.com (no longer seems to support embedding) or iTex2Img. You may want to try them out. Of course, others may exist and some Google-fu will help you find them.
given the following markdown syntax
![equation](http://www.sciweavers.org/tex2img.php?eq=1%2Bsin%28mc%5E2%29&bc=White&fc=Black&im=jpg&fs=12&ff=arev&edit=)
it will display the following image
Note: In order for the image to be properly displayed, you'll have to ensure the querystring part of the url is percent encoded. You can easily find online tools to help you with that task, such as www.url-encode-decode.com
这篇关于如何在一般github的markdown中显示数学方程(不是github的博客)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!