commit 4ead46c4ab0b28faa9b41e688818700e7972e7a1 parent 59b87539b9f422d144d4c1b3481374eb226a112b Author: Martin von Gagern <Martin.vGagern@gmx.net> Date: Wed, 11 Jan 2017 21:04:52 +0100 Describe using auto renderer in html head (#623) Describe using auto renderer in html head Motivated by #621. Diffstat:
| M | contrib/auto-render/README.md | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/contrib/auto-render/README.md b/contrib/auto-render/README.md @@ -27,6 +27,22 @@ before the close body tag: See [index.html](index.html) for an example. +If you prefer to have all your setup inside the html `<head>`, +you can use the following script there +(instead of the one above at the end of the `<body>`): + +```html +<head> + ... + <script> + document.addEventListener("DOMContentLoaded", function() { + renderMathInElement(document.body); + }); + </script> + ... +</head> +``` + ### API This extension exposes a single function, `window.renderMathInElement`, with