如何让github在README.org文件中显示内联数学 [英] How can I get github to display inline math in README.org file

查看:560
本文介绍了如何让github在README.org文件中显示内联数学的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了许多HTML前导码,比如下面的最小例子:

$ $ $ $ $ $ $ $ b#+ BEGIN_HTML
< script type =text / javascript
src =http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML >
< / script>
#+ END_HTML
=(solve ab)=应该返回$ X $,从$ AX = B $

内联数学运算在我的桌面上,如果我导出到HTML并在浏览器中查看,但似乎并没有在Github中显示美元符号在输出中回显。



有关如何让Github渲染内联数学的想法吗?请注意关于如何在README.md中执行相同操作的问题的答案不会有帮助,因为降价与许多不同更有特色的组织模式。

编辑:我现在已经学习了Github如何使用 github / markup ,然后使用 org-ruby 解析文件。看起来##BeginSrc等代码块被解析得非常好,但不是前导行或内联数学 - 虽然我还没有真正确认这一点。



@david这是我的网页部分但有希望的相关来源:



README.org

 < article class =markdown-body entry-contentitemprop =mainContentOfPage>< h1>< a id = content-some-math-stuffclass =anchorhref =#some-math-stuffaria-hidden =true>< span class =octicon octicon-link>< / span> < / a>一些数学内容< / h1> 

< p>< code>(解决b)< / code>应该返回$ X $,从$ AX = B $< / p>
< / article>
< / div>


解决方案

https://github.com/github/markup/issues/274 似乎表明目前不可能。这个问题没有解决就关闭了。


I have tried numerous HTML preambles such as the following minimal example:

  #+TITLE: Some math stuff
  #+BEGIN_HTML
         <script type="text/javascript"
            src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
        </script>
  #+END_HTML
  =(solve a b)= should return $X$, from $AX=B$

The inline math works on my desktop if I export to HTML and view in my browser, but does not seem to be rendered in Github where the dollar signs are just echoed in the output.

Any idea on how to get Github to render inline math? Please note the answer to this question on how to do the same with README.md doesn't help as markdown is dissimilar to the much more featureful org mode.

EDIT: I have now learned how Github processes the .org file using github/markup which in turn uses org-ruby to parse the file. It appears that code blocks with #+BeginSrc etc are parsed very well but not the preamble lines or the inline math---though I have not really confirmed this yet.

@david This is the partial but hopefully relevant source from my webpage:

README.org

    <article class="markdown-body entry-content" itemprop="mainContentOfPage"><h1><a id="user-content-some-math-stuff" class="anchor" href="#some-math-stuff" aria-hidden="true"><span class="octicon octicon-link"></span></a>Some math stuff</h1>

<p><code>(solve a b)</code> should return $X$, from $AX=B$</p>
</article>
  </div>

解决方案

https://github.com/github/markup/issues/274 seems to indicate that it's not currently possible. The issue was closed with no resolution.

这篇关于如何让github在README.org文件中显示内联数学的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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