diff --git a/docs/browser.md b/docs/browser.md index d82a619e..b4c4449c 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -4,7 +4,27 @@ title: Browser --- > KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9–11. -## Global +## Starter template + +```html + + + +
+ + + + + + + + + ... + +``` + +## Loading as Global If you include the `katex.js` directly, the `katex` object will be available as a global variable. @@ -20,10 +40,10 @@ KaTeX also provides minified versions: ``` -The loading of scripts are [deferred using `defer` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes) +The examples above load the script [deferred using the `defer` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes) to speed up page rendering. The `katex` object will be available after [`DOMContentLoaded` event is fired on the `document`](https://developer.mozilla.org/ko/docs/Web/Reference/Events/DOMContentLoaded). -If you do not use `defer`, `katex` object will be available after corresponding +If you do not use `defer`, `katex` object will be available after the corresponding `script` tag. If KaTeX is not used immediately or not critical, it is possible to load KaTeX diff --git a/docs/issues.md b/docs/issues.md index 6e3c12a4..2bc23731 100644 --- a/docs/issues.md +++ b/docs/issues.md @@ -2,6 +2,11 @@ id: issues title: Common Issues --- +- Be sure to include `` at the top of your HTML file, as + otherwise your browser will render in "[quirks mode](https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode)" + which can cause KaTeX to sometimes render incorrectly. + This header is needed even inside `