2
$\begingroup$

$$ \left( \begin{array}{c|c} \Huge{a} & \Huge{b} \\ \hline \Huge{c} & \Huge{d} \end{array} \right) \quad \left( \begin{array}{c|c} \Huge{A_{11}} & & \Huge{A_{12}} \\ \hline \Huge{0} & & \Huge{A_{22}} \end{array} \right) $$ Exactly why does that vertical line appear only once, as it should, on the left, and twice, as it should not, on the right?

MathJax code:

\left(
  \begin{array}{c|c}
        \Huge{a} & \Huge{b} \\
        \hline
        \Huge{c} & \Huge{d}
      \end{array}
\right)
\quad
\left(
  \begin{array}{c|c}
        \Huge{A_{11}} & & \Huge{A_{12}} \\
        \hline
        \Huge{0} & & \Huge{A_{22}}
      \end{array}
\right)
$\endgroup$
6
$\begingroup$
\Huge{A_{11}} & & \Huge{A_{12}} \\

You have included two ampersands instead of one, implicitly creating three columns. But earlier, you specified only two columns: {c|c}. This is causing MathJax to behave oddly.

This raises an error when I try it with pdfLaTeX on my laptop, so it is something to do with MathJax. Use consistent alignment characters (&) and you should not run into this problem.

$\endgroup$
  • $\begingroup$ It was my understanding that LaTeX would extend the column specification for new columns, so I think MathJax is doing the right thing. Is pdfLaTeX raising an error, or a warning? $\endgroup$ – robjohn Apr 25 '14 at 15:00
  • 2
    $\begingroup$ It's really an error: "Extra alignment tab has been changed to \cr." (I know the text sounds like a warning, but it's counted as an error.) It does still produce an output, but by bumping the $A_{12}$ to the first entry of a new row, rather than by adding the third column. $\endgroup$ – mdp Apr 25 '14 at 15:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .