I understand. Thank you for the clarification. This approach works for me…
1) Markdown
{{< mathjax >}}
$$
\begin{vmatrix}a & b\\
c & d
\end{vmatrix}
$$
{{< /mathjax >}}
2) layouts/shortcodes/mathjax.html:
{{ .Inner }}
3) Inserted into <head>
of page:
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
svg: {
fontCache: 'global'
}
};
</script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
4) Result