在第三方网站上渲染 LaTeX?

发布于 2024-08-29 16:52:19 字数 823 浏览 4 评论 0原文

网络上有一些网站将 LaTeX 呈现为更易读的形式,例如 Wikipedia、一些 Wordpress 博客和 MathOverflow。他们可能使用图像、MathML、jsMath 或类似的东西。

网络上还有其他网站,LaTeX 内联显示且不渲染,例如 arXiv、各种数学论坛或我的电子邮件。事实上,在 arXiv 论文的摘要中包含原始 LaTeX 的情况很常见,例如 这篇论文

是否有适用于 Firefox 的插件,或者是否可以编写一个插件,在本身不提供渲染机制的页面中渲染 LaTeX? (LaTeX 将包含在美元符号内,例如 $\pi$。请参阅上面的 arXiv 链接。)

一些注释

There are some sites on the web that render LaTeX into some more readable form, such as Wikipedia, some Wordpress blogs, and MathOverflow. They may use images, MathML, jsMath, or something like that.

There are other sites on the web where LaTeX appears inline and is not rendered, such as the arXiv, various math forums, or my email. In fact, it is quite common to see an arXiv paper's abstract with raw LaTeX in it, e.g. this paper.

Is there a plugin available for Firefox, or would it be possible to write one, that renders LaTeX within pages that do not provide a rendering mechanism themselves? (The LaTeX would be enclosed within dollar signs, e.g. $\pi$. See the arXiv link above.)

Some notes:

  • It may be impossible to render some of the code, because authors often copy-paste code directly from their source TeX files, which may contain things like "\cite{foo}" or undefined commands. These should be left alone.

  • This question is a repost of a question from MathOverflow that was closed for not being related to math. There is one answer there, which is helpful, but perhaps Stack Overflow can provide better answers.

  • I program a lot, but Javascript is not my specialty, so comments along the lines of "look at this library" are not particularly helpful to me (but may be to others).

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

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

发布评论

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

评论(2

思念满溢 2024-09-05 16:52:19

这个 Greasemonkey 脚本可以检测内联 LaTeX 并将其呈现为 MathML。它的作用非常好。

There is this Greasemonkey script that detects and renders inline LaTeX as MathML. It works pretty well at what it does.

深白境迁sunset 2024-09-05 16:52:19

现在有一个针对 Gmail 的解决方案:GmailTeX http://alexeev.org/gmailtex.html 编写瓦列里·阿列克谢耶夫.

There is now a solution for Gmail: GmailTeX http://alexeev.org/gmailtex.html written by Valery Alexeev.

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