MkDocs and MathJax

后端 未结 5 1360
粉色の甜心
粉色の甜心 2020-12-25 13:54

I\'m new to MkDocs and am writing some technical documentation that requires latex. I\'ve successfully built a small website with one of the MkDocs themes, however it won\'t

5条回答
  •  悲哀的现实
    2020-12-25 14:12

    It looks like be that this extension is not required:

    docs/mathjaxhelper.js

    MathJax.Hub.Config({
      "tex2jax": { inlineMath: [ [ '$', '$' ] ] }
    });
    MathJax.Hub.Config({
      config: ["MMLorHTML.js"],
      jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
      extensions: ["MathMenu.js", "MathZoom.js"]
    });
    

    mkdocs.yml

    markdown_extensions:
      - extra
      - tables
      - fenced_code
    extra_javascript:
      - https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
      - mathjaxhelper.js
    

    Seems to do the trick.

提交回复
热议问题