Search code examples
latexmatrixrendermathjax

How do I render an Augmented Matrix with MathJax?


I'm looking for a way to render an Augmented Matrix in MathJax. In addition, I'd like to do things like right-align the text in the columns.

I found a LaTeX solution for this, but I'm not sure how to integrate it with MathJax - or even if its possible. I notice that the \makeatletter command is not supported by MathJax.

Is it possible to do this?


Solution

  • (I think this should belong on http://tex.stackexchange.com)

    If you don't need fancy formatting, the code in Wikipedia works fine with MathJax.

    $$
      \left[\begin{array}{rrr|r}
        1 & 2 & 4 & 8 \\
        16 & 32 & 64 & 128 \\
        256 & 512 & 1024 & 2048
      \end{array}\right]
    $$
    

    enter image description here