如何在我的 github 存储库页面上自动发布数学标记?

发布于 2024-11-06 02:06:09 字数 766 浏览 2 评论 0原文

我不确定这是否可能,但这就是我想做的:

我想创建一个 文学程序,托管在 github 上,并将生成的人类友好文献自动发布在我的 github 项目页面上。我所说的“自动发布”是指我可以在本地计算机上运行一个以“git Push origin master”结尾的脚本,并最终在 github 上发布一个人性化、包含数学的文档。我愿意在实现这一目标的程序上做出妥协,但越简单越好。

很多人不知道什么是文学编程,所以我总结一下。在这个系统中,您可以编写单个文档,该文档可以翻译成源代码或人类友好的文档。目的是用英语(或其他自然语言)非常清楚地解释算法,当用户对阅读您的算法和直接使用它一样感兴趣时,它被认为是有用的。有些人(如 Donald Knuth)认为文字编程是构建任何复杂软件的关键工具。

这样做的一个想法是生成类似 README.md 文件的文件作为 Literate 程序的输出,但我不知道 github 的 Markdown 格式有任何数学支持。看起来 github 的 wiki 可能支持一些数学,但我不知道如何从代码生成 wiki —— 例如,我希望能够做一个 git push origin master code> 从我的机器上,并自动更新 github wiki。

(另外,要理解为什么数学支持很重要:我来自一个总是使用 TeX 或 LaTeX 撰写论文的世界,并且我对其他使用 LaTeX 的作者也可以使用的通用系统感兴趣。

)如何实现这一目标?

I'm not sure if this is possible, but this is what I'd like to do:

I'd like to create a literate program, hosted on github, and have the resulting human-friendly literature automatically published on my github's project page. By "automatically published," I mean that I can run a script on my local machine that ends with "git push origin master," and ends up with a published human-friendly, math-containing document on github. I'm open to compromises on the procedure to get there, but the simpler, the better.

Many people don't know what literate programming is, so I'll summarize that. It's a system where you write a single document that can be translated into either source code or a human-friendly document. The purpose is to very clearly explain the algorithm, in English (or other natural language), and it is considered useful when users may be as interested in reading about your algorithm as they are in using it directly. Some folks (like Donald Knuth) consider literate programming as a critical tool in building any complex piece of software.

One idea to do this would be to generate something like a README.md file as the output of the literate program, but I don't know of any math support in github's markdown formatting. It looks like github's wikis might support some math, but I don't know how to make the wiki be generated from the code -- as in, I'd like to be able to do a git push origin master from my machine, and have the github wiki automatically updated.

(Also, to understand why math support is important: I'm coming from a world of always using TeX or LaTeX to write papers, and I'm interested in a general system that other authors used to LaTeX could also use.)

Any ideas how to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦屿孤独相伴 2024-11-13 02:06:09

wiki 由他们自己的 git 存储库提供支持,因此您可以推送它并让它自动更新。不过,这是一个与主要仓库不同的仓库。据我所知,这些内容仅在 wiki 中受支持,而不是在主存储库 Markdown 处理器中受支持。

The wikis are backed by their own git repo, so you can push to it and have it automatically update. That's a different repo than the main one though. As far as I know that stuff is only supported in the wikis, not in the main repo markdown processor.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文