LaTeX数学在github维基上 [英] LaTeX math in github wikis

查看:163
本文介绍了LaTeX数学在github维基上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过github repo wiki以任何方式包含LaTeX风格的数学?谷歌搜索意味着github不再允许像MathJax这样的东西,但大多数引用已经过去了几年。在github wiki中包含LaTeX格式的数学有哪些(如果有的话)替代方案?

解决方案

您可以使用 chart.apis.google.com 来呈现LaTeX公式为PNG。
与Githhub的降价效果相当:



示例(降价):

 动量与速度的比值为
相对论质量m。

![f1]

相对论质量和相对论的
动能通过公式相联系:

![f2 ]

爱因斯坦希望省略右边的不自然的第二项
,其唯一目的是
以使能量处于静止状态为零,并声明
粒子的总能量服从:
![f3]这是剩余能量![f4]
和动能之和。

[f1]:http://chart.apis.google.com/chart?cht=tx&chl=m=\frac{m_0}{\sqrt{1-{\ frac {v ^ 2} {c ^ 2}}}}
[f2]:http://chart.apis.google.com/chart?cht=tx&chl=E_k=mc^2-m_0c^ 2
[f3]:http://chart.apis.google.com/chart?cht=tx&chl=E=mc^2
[f4]:http://chart.apis。 google.com/chart?hl=zh_CN&c=ch&c=%E5%9B%BE%E5%B7%9B%E5%B7%BF%E5%9B%BF%E5%9B%BF%E5%9F%BF%E5%9B%BF%E5%9B%BF%E5%9B%BF%E5%9F%BF%E5%9F%BF%E5%9F%BF%E5%9F%BF%E5%9B%BF%E5%9B%BB / strong>


Is it possible to include LaTeX-style math in any way with github repo wikis? Googling implies github no longer allows things like MathJax, but most references are years old. What (if any) alternatives are there to including LaTeX-formatted math in github wikis?

解决方案

You can use chart.apis.google.com to render LaTeX formulas as PNG. It work nicely with Githhub's markdown:

Example (Markdown):

The ratio of the momentum to the velocity is
the relativistic mass, m.

![f1]

And the relativistic mass and the relativistic
kinetic energy are related by the formula:

![f2]

Einstein wanted to omit the unnatural second term
on the right-hand side, whose only purpose is
to make the energy at rest zero, and to declare
that the particle has a total energy, which obeys:
![f3] which is a sum of the rest energy ![f4]
and the kinetic energy.

[f1]: http://chart.apis.google.com/chart?cht=tx&chl=m=\frac{m_0}{\sqrt{1-{\frac{v^2}{c^2}}}}
[f2]: http://chart.apis.google.com/chart?cht=tx&chl=E_k=mc^2-m_0c^2
[f3]: http://chart.apis.google.com/chart?cht=tx&chl=E=mc^2
[f4]: http://chart.apis.google.com/chart?cht=tx&chl=m_0c^2

Rendered:

这篇关于LaTeX数学在github维基上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆