-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
54 additions
and
33 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
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
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
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
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,18 +1,39 @@ | ||
import {h, render} from 'preact' | ||
import App from './components/App' | ||
|
||
// Configure MathJax | ||
// Render | ||
|
||
MathJax.Hub.processSectionDelay = 0 | ||
MathJax.Hub.processUpdateDelay = 0 | ||
render(<App />, document.body) | ||
|
||
MathJax.Hub.Config({ | ||
messageStyle: 'none', | ||
skipStartupTypeset: true, | ||
showMathMenu: false, | ||
errorSettings: {message: ['']} | ||
}) | ||
// Configure MathJax | ||
|
||
// Render | ||
window.MathJax = { | ||
// Load noerrors extension to display raw invalid TeX | ||
loader: {load: ['[tex]/noerrors']}, | ||
startup: { | ||
// No typeset at startup | ||
typeset: false | ||
}, | ||
tex: { | ||
// Use noerrors package | ||
packages: {'[+]': ['noerrors']}, | ||
// Set delimiters for inline math | ||
inlineMath: [['\\(', '\\)']] | ||
}, | ||
chtml: { | ||
// Set mjx-merror elements to use TeX fonts instead of default browser font | ||
merrorFont: '' | ||
}, | ||
options: { | ||
// Disable contextual menu | ||
enableMenu: false | ||
} | ||
} | ||
|
||
render(<App />, document.body) | ||
// Load MathJax | ||
|
||
let script = document.createElement('script') | ||
script.src = | ||
'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.1.2/es5/tex-chtml.js' | ||
script.async = true | ||
document.head.appendChild(script) |