I am using MathJax to attempt to render equations with .NET & DocFX.
This equation gives Missing or unrecognized delimiter for \right error in the browser.
\(D_{text{mi}} = 1 - \frac{U_{c}}{U_{i}} = C_{t} - 0.05 - \lbrack \left( 16C_{t} - 0.5 \right) I_{\text{amb}}/1000\rbrack\)
However if I run it in https://www.mathjax.org/#demo then it previewscorrectly.
Here is my script:
{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
<script type="text/javascript" src="{{_rel}}styles/docfx.vendor.js"></script>
<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script>
<script type="text/javascript" src="{{_rel}}styles/main.js"></script>
<!-- configure MathJax object to define tex macros -->
<!-- Don't forget to escape \, since js also uses \ -->
<script>
MathJax = {
tex: {
packages: ['base'], // extensions to use
inlineMath: [ // start/end delimiter pairs for in-line math
['\\(', '\\)']
],
displayMath: [ // start/end delimiter pairs for display math
['$$', '$$'],
['\[', '\]'],
['\(', '}\)'],
['\(','\)'],
['\\[', '\\]'],
],
}
};
</script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>