github wikis 中的 LaTeX 数学

人气:182 发布:2022-10-16 标签: github wiki latex

问题描述

是否可以在 github repo wiki 中以任何方式包含 LaTeX 风格的数学?谷歌搜索意味着 github 不再允许使用 MathJax 之类的东西,但大多数参考文献已有多年历史.在 github wiki 中包含 LaTeX 格式的数学有什么(如果有的话)替代方案?

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?

推荐答案

您可以使用 chart.apis.google.com 将 LaTeX 公式渲染为 PNG.它与 Githhub 的 markdown 配合得很好:

You can use chart.apis.google.com to render LaTeX formulas as PNG. It work nicely with Githhub's 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

https

Github Enterprise 的某些安装拒绝 http 并且只有在您使用 https

Some installations of Github Enterprise reject http and work only if you use https

渲染:

870