Mathjax on Github Pages

I started a new project on Github, and since I will need to collaborate with people, I would like to start a decent documentation. I would like to use Github Pages for this task, but the documentation will need to include many equations, for example https://wec-sim.imtqy.com/WEC-Sim/theory.html .

I read online on numerous posts that Mathjax provides a good tool for reading equations in browsers and has been linked to Github pages. However, although I tried to follow many different strategies, I have not yet been able to get my page to show any equations.

You can find my project https://github.com/enricoande/uuv and the corresponding page https://enricoande.imtqy.com/uuv/ . The page is built from https://github.com/enricoande/uuv/blob/master/docs/README.md .

Initially, I could not display the equations at all, but I could see the text on the page. Now I don’t even see the page. This happened after adding a file https://github.com/enricoande/uuv/blob/master/docs/_layouts/page.html that reads

<script type="text/javascript"
    src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Is it possible that the reason I can no longer see my page is because Mathjax is too slow (I found comments on this subject online)? Otherwise, do you have suggestions on what I can do to fix the page for displaying equations?

, Github- html.

, . !

+4
4

HTML- , , script.

, - {{ content }} templating , .

, https://github.com/jekyll/jekyll/blob/master/docs/_layouts/page.html

---
layout: default
---

<section class="standalone">
  <div class="grid">

    <div class="unit whole">
      <article>
        <h1>{{ page.title }}</h1>
        {{ content }}
      </article>
    </div>

    <div class="clear"></div>

  </div>
</section>

index.html ,

---
layout: page
---

( script).

jekyll , ; . . script , .

+1

JS https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML,

console.warn( ": cdn.mathjax.org . https://www.mathjax.org/cdn-shutting-down/ . ')

, https://www.mathjax.org/cdn-shutting-down/.

<script type="text/javascript" async
  src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?...">
</script>
+2

There is a convenient plugin for the Github MathJax problem for Chrome. But the multi-line display is not very happy. You can search for “Github MathJax” in the Chrome store or use the link https://chrome.google.com/webstore/detail/mathjax-plugin-for-imtqy.comemnmodlmafdkllaclgeombjnmnbima.

0
source

Source: https://habr.com/ru/post/1686649/


All Articles