您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Converts LaTeX on web pages into formatted math using MathJax
AutoLaTeXRenderer is a userscript that automatically converts LaTeX on web pages into formatted math using MathJax. It scans the document for LaTeX expressions and renders them as formatted math, making it easier to read and understand mathematical content on web pages.
To install the AutoLaTeXRenderer userscript, follow these steps:
AutoLaTeXRenderer.js
into the new userscript.Once the userscript is installed and enabled, it will automatically render LaTeX expressions on web pages. You don't need to do anything else. The script will observe the DOM for changes and render LaTeX expressions as they appear.
Here are some examples of LaTeX expressions that will be rendered by the script:
$E = mc^2$
$$\int_{a}^{b} f(x) \, dx$$
The script supports both inline and display math, as well as escaping dollar signs using \$
.
If you would like to contribute to the development of AutoLaTeXRenderer, please follow these steps:
This project is licensed under the MIT License. See the LICENSE file for more information.
To use the tests, follow these steps:
npm install
.npm test
if you have a test script defined in your package.json
file.The tests will verify that the script works as expected and will catch potential issues early. They include unit tests for the addMathJax
function to verify MathJax is loaded correctly and the renderLatex
function to ensure LaTeX is rendered properly.