-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable KaTeX rendering with additional delimiters (#19)
* Support rendering math equations using $ or $$ as delimiters. * Also, format the code by .pretterrc.
- Loading branch information
Peng-Yu Chen
authored
Mar 31, 2023
1 parent
64195d2
commit eac6563
Showing
1 changed file
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous"> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" | ||
integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" | ||
crossorigin="anonymous" | ||
/> | ||
|
||
<!-- The loading of KaTeX is deferred to speed up page rendering --> | ||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" crossorigin="anonymous"></script> | ||
<script | ||
defer | ||
src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" | ||
integrity="sha384-PwRUT/YqbnEjkZO0zZxNqcxACrXe+j766U2amXcgMg5457rve2Y7I6ZJSm2A0mS4" | ||
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.4/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" | ||
onload="renderMathInElement(document.body);"></script> | ||
<script | ||
defer | ||
src="https://cdn.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" | ||
integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" | ||
crossorigin="anonymous" | ||
onload="renderMathInElement(document.body, { | ||
delimiters: [ | ||
{left: '$$', right: '$$', display: true}, | ||
{left: '$', right: '$', display: false} | ||
] | ||
});" | ||
></script> |