Describe using auto renderer in html head (#623)

Describe using auto renderer in html head

Motivated by #621.
This commit is contained in:
Martin von Gagern 2017-01-11 21:04:52 +01:00 committed by GitHub
parent 59b87539b9
commit 4ead46c4ab

View File

@ -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