add macro for \cancelto

This commit is contained in:
Sasserisop 2023-10-08 13:37:18 -06:00
parent a66b2b7373
commit a7799060c6
1 changed files with 6 additions and 3 deletions

View File

@ -91,15 +91,18 @@
<script type="text/javascript"> <script type="text/javascript">
function renderMath(){ renderMathInElement(document.body, { function renderMath(){
const macros = {'\\cancelto': '\\overset{\\phantom{\\normalsize{\\cancel{#2}}}\\hspace{1em}#1}{\\cancel{#2}}'};
renderMathInElement(document.body, {
delimiters: [ delimiters: [
{left: '$$', right: '$$', display: true}, {left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false}, {left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false}, {left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true} {left: '\\[', right: '\\]', display: true}
], ],
throwOnError : false throwOnError : false,
macros : macros
}); });
} }
//document.addEventListener("DOMContentLoaded", renderMath); //document.addEventListener("DOMContentLoaded", renderMath);