From 166f1f679843818965d6045f49bab9edfacc0704 Mon Sep 17 00:00:00 2001 From: Evan Widloski Date: Fri, 27 Sep 2019 10:58:04 -0500 Subject: [PATCH] mathtex-script: Use html 'defer' attribute (#2069) * Use html 'defer' attribute Instead of putting the extension script tag at the bottom, we can use the `defer` attribute to execute the script after all other content is loaded. It has [very good](https://caniuse.com/#feat=script-defer) browser support. * fix checksums * use sha384 hashes * update to Katex 0.11.1 --- contrib/mathtex-script-type/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/mathtex-script-type/README.md b/contrib/mathtex-script-type/README.md index 308ad89e..37a726ce 100644 --- a/contrib/mathtex-script-type/README.md +++ b/contrib/mathtex-script-type/README.md @@ -9,27 +9,27 @@ This extension isn't part of KaTeX proper, so the script should be separately included in the page, in addition to KaTeX. Load the extension by adding the following line to your HTML file. -This extension should be loaded *after* all `script type=math/tex` blocks that you want to render. ```html - + ``` You can download the script and use it locally, or from a local KaTeX installation instead. For example, in the following simple page, we first load KaTeX as usual. Then, in the body, we use a `math/tex` script to typeset the equation `x+\sqrt{1-x^2}`. -After we're done writing `math/tex` scripts, we load this extension. + ```html + - - - - - - - - + + + + + + + + ```