Matrix equation does not get displayed

95 views
Skip to first unread message

chandra

unread,
Apr 2, 2013, 8:07:43 AM4/2/13
to mathja...@googlegroups.com
I am using pandoc to generate HTML , including LaTeX formulae, that are rendered into mathematical formulae by MathJax. Things were working correctly until recently when I discovered that a matrix equation did not get rendered by MathJax.

My source markdown text contains this:

 If all this seems too abstract, here is a concrete example of a $2 \times 3$ matrix:
$$
A = \left[
1 & 3 & 5\\
2 & 4 & 6\\
\right]
$$
where we have $a_{12} = 3$ and $a_{21} = 2.$

This is rendered by pandoc into HTML as

If all this seems too abstract, here is a concrete example of a <span class="math">\(2 \times 3\)</span> matrix: <span class="math">\[
A = \left[
1 &amp; 3 &amp; 5\\
2 &amp; 4 &amp; 6\\
\right]
\]</span> where we have <span class="math">\(a_{12} = 3\)</span> and <span class="math">\(a_{21} = 2.\)</span></p>

 MathJax used to render this correctly but now I see the image shown above. [Sorry I cannot figure out how to re-position it :-( ]

    

Can anyone tell me what I am doing wrong?

In case you want to see the rest of the correctly rendered MathJax stuff as part of a blog, please see:

http://swanlotus.org/varieties-of-multiplication/

Thank you.



Davide P. Cervone

unread,
Apr 2, 2013, 8:25:18 AM4/2/13
to mathja...@googlegroups.com
You are missing the \begin{matrix}...\end{matrix} around the matrix itself.  The ampersands (&) must be within a table of some sort, and you don't currently have one.  Try

$$
A = \left[
\begin{matrix}

1 & 3 & 5\\
2 & 4 & 6\\
\end{matrix}
\right]
$$

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

R (Chandra) Chandrasekhar

unread,
Apr 2, 2013, 11:01:11 PM4/2/13
to mathja...@googlegroups.com
Thank you, Davide. That fixed it. :-)

Can I use

\begin{bmatrix} ... \end{bmatrix}

instead of

\left[\begin{matrix} ...\end{matrix}\right]?

That is, does the latest MathJax also work with the AMS extensions?

Thanks.

Chandra
>> <https://lh6.googleusercontent.com/-E8MuWRvAt08/UVrJrCqj8KI/AAAAAAAAAAk/liKR5GqtTbU/s1600/matrix-not-rendered.png>

Peter Krautzberger

unread,
Apr 3, 2013, 12:13:59 AM4/3/13
to mathja...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.

Davide P. Cervone

unread,
Apr 3, 2013, 7:10:23 AM4/3/13
to mathja...@googlegroups.com
Yes you can use bmatrix or the other AMS versions of matrix. You can see the complete list of supported macros and environments at

http://docs.mathjax.org/en/latest/tex.html#supported-latex-commands

Davide

Davide P. Cervone

unread,
Apr 3, 2013, 7:10:52 AM4/3/13
to mathja...@googlegroups.com
OOPS, I see Peter already answered! Sorry for the repeat.

Davide
Reply all
Reply to author
Forward
0 new messages