开源软件名称(OpenSource Name):KaTeX/KaTeX开源软件地址(OpenSource Url):https://github.com/KaTeX/KaTeX开源编程语言(OpenSource Language):JavaScript 85.5%开源软件介绍(OpenSource Introduction):KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11. KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the list of supported functions. Try out KaTeX on the demo page! Getting startedStarter template<!DOCTYPE html>
<!-- KaTeX requires the use of the HTML5 doctype. Without it, KaTeX may not render properly -->
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
</head>
...
</html> You can also download KaTeX and host it yourself. For details on how to configure auto-render extension, refer to the documentation. APICall katex.render("c = \\pm\\sqrt{a^2 + b^2}", element, {
throwOnError: false
}); Call var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}", {
throwOnError: false
});
// '<span class="katex">...</span>' Make sure to include the CSS and font files in both cases. If you are doing all rendering on the server, there is no need to include the JavaScript on the client. The examples above use the Demo and DocumentationLearn more about using KaTeX on the website! ContributorsCode ContributorsThis project exists thanks to all the people who contribute code. If you'd like to help, see our guide to contributing code. Financial ContributorsBecome a financial contributor and help us sustain our community. IndividualsOrganizationsSupport this project with your organization. Your logo will show up here with a link to your website. LicenseKaTeX is licensed under the MIT License. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论