Skip to content

Commit

Permalink
fix (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
infwinston committed Nov 15, 2023
1 parent f43823a commit 4e38b32
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions public/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
window.MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
},
svg: {
fontCache: 'global'
},
startup: {
pageReady: () => {
return MathJax.startup.defaultPageReady();
}
}
};

3 changes: 2 additions & 1 deletion src/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export default function Document() {
<Html lang="en">
<Head>
<link rel="stylesheet" href="/fonts/load.css" />
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="/mathjax.js" async></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-mml-chtml.min.js" async></script>
</Head>
<body>
<Main />
Expand Down

0 comments on commit 4e38b32

Please sign in to comment.