This is a -users question, not a -developers question, but it's not clear to me where to post such questions. Apologies if this is inappropriate, and if you have pointers to a good place to ask, I'd appreciate that.
I'm looking for an example of how to create a script from the document \
I don't think it makes sense to auto-insert this snippet at the end. You can only do so after the document has been parsed, and in that case, you might as well run the code directly. So add something like this to your <head>:
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body);
});
</script>
You could insert the script in that handler instead, but as I said, it would be more work for no gain.
@gagern that makes sense, thanks. I am very uneducated in JS and the DOM.
@gagern That looks useful to more people. We should add that to the auto-render docs.