【发布时间】:2016-01-06 10:52:19
【问题描述】:
我不是开发人员/程序员。我只是想用Gitit 做笔记的人。我已经让它在 Windows 上运行,但使用 MathJax 的数学看起来最好。我不想依赖远程 CDN 来让 MathJax 正常工作(这里经常断电和断网)。该应用程序的作者提到它可以在 Happstack 的“4行代码”中设置:
mathjax-script: https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
# specifies the path to MathJax rendering script.
# You might want to use your own MathJax script to render formulas without
# Internet connection or if you want to use some special LaTeX packages.
# Note: path specified there cannot be an absolute path to a script on your hdd,
# instead you should run your (local if you wish) HTTP server which will
# serve the MathJax.js script. You can easily (in four lines of code) serve
# MathJax.js using http://happstack.com/docs/crashcourse/FileServing.html
# Do not forget the "http://" prefix (e.g. http://localhost:1234/MathJax.js)
本教程的链接已损坏,因此我将不胜感激。是否需要更改任何 MathJax 配置,或者只需提取文件即可?我会用 gitit 写很多数学。我不想设置 Apache 等来服务 MathJax。 Gitit 已经使用 Happstack,我更喜欢使用它。谢谢!
编辑:为了清楚起见,我不确定如何分配端口 1234 来服务这个脚本
【问题讨论】:
-
MathJax 的 CDN 链接已过时。尝试将
d3eoax9i5htok0.cloudfront.net替换为cdn.mathjax.org。要从您自己的服务器运行 MathJax,请参阅docs.mathjax.org/en/latest/installation.html 的文档。 -
未来注意事项:cdn.mathjax.org 即将结束生命周期,请查看 mathjax.org/cdn-shutting-down 以了解迁移提示。