Reputation: 135
I am trying to write inline matrix with MathJax with some of the suggested way mentioned here. e.g.
$det(A) =\begin{vmatrix}a_(11)&a_(12)\\a_(21)&a_(22) \end{vmatrix}$
or
det(A) =$\begin{vmatrix}a_(11)&a_(12)\\a_(21)&a_(22) \end{vmatrix}$
or
det(A) =$$\begin{vmatrix}a_(11)&a_(12)\\a_(21)&a_(22) \end{vmatrix}$$
or
$\bigl( \begin{smallmatrix} a_(11) & a_(12) \\ a_(21) & a_(22) \end{smallmatrix} \bigr)$
However, none of the these code makes it inline in HTML. Could anyone please let me know how one needs to write it down to render it inline?
[![screenshot of current webpage]]
[1]: https://i.sstatic.net/09Cq5.png
I have below given code added into <head>
tag :
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-MML-AM_CHTML">
</script>
Upvotes: 0
Views: 426
Reputation: 12260
Because many web pages use dollar signs for monetary values, these are not used for math delimiters by default. You must enable them yourself if you wan to use them. To so do, use
<script>
MathJax = {
TeX: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
*before the script that loads latest.js
to do this.
See the MathJax documentation for more details.
Upvotes: 0