Skip to content

Commit

Permalink
Add onload script for LaTeX rendering settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Jan 3, 2025
1 parent 8da8203 commit 50ca2a2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mira/sources/sympy_ode/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ <h5>Output Model</h5>
</div>
</p>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true}
],
// • rendering keys, e.g.:
throwOnError : false
});
});
</script>
{% endif %}
{% if error %}
<div class="alert alert-danger mt-4" role="alert">
Expand Down

0 comments on commit 50ca2a2

Please sign in to comment.