1
\$\begingroup\$

I'm trying to convert this table into MathJax: table to convert

And this is the MathJax code I came up with:

**Table 3.** The regions of the partitioning. Each table entry contains the region name, the algebraic
constraints defining the region, the rectangle point closest to \$P = C + x_0U_0 + x_1U_1 + x_2U_2\$ and
the squared distance from the rectangle to \$P\$.

$$
\begin{array}{c|c|c}
    \begin{array}{c}
        R_{−+}, x_0 < −e_0, x_1 > e_1 \\
        C − e_0U_0 + e_1U_1 \\
        (x_0 + e_0)^2 + (x_1 − e_1)^2 + x^2_2
    \end{array}
    &
    \begin{array}{c}
        R_{0+}, |x_0| ≤ e_0, x_1 > e_1 \\
        C + x_0U_0 + e_1U_1 \\
        (x_1 − e_1)^2 + x^2_2
    \end{array}
    &
    \begin{array}{c}
        R_{++}, x_0 > e_0, x_1 > e_1 \\
        C + e_0U_0 + e_1U_1 \\
        (x_0 - e_0)^2 + (x_1 − e_1)^2 + x^2_2
    \end{array}

    \\\hline

    \begin{array}{c}
    R_{−0}, x_0 < −e_0, |x_1| ≤ e_1 \\
    C − e_0U_0 + x_1U_1 \\
    (x_0 + e_0)^2 + x^2_2
\end{array}
    &
    \begin{array}{c}
    R_{00}, |x_0| ≤ e_0, |x_1| ≤ e_1 \\
    C + x_0U_0 + x_1U_1 \\
    x^2_2
\end{array}
    &
    \begin{array}{c}
    R_{+0}, x_0 > e_0, |x_1| ≤ e_1 \\
    C + e_0U_0 + x_1U_1 \\
    (x_0 - e_0)^2 + x^2_2
\end{array}

    \\\hline

    \begin{array}{c}
    R_{−-}, x_0 < −e_0, x_1 < -e_1 \\
    C − e_0U_0 - e_1U_1 \\
    (x_0 + e_0)^2 + (x_1 + e_1)^2 + x^2_2
\end{array}
    &
    \begin{array}{c}
    R_{0-}, |x_0| ≤ e_0, x_1 < -e_1 \\
    C + x_0U_0 - e_1U_1 \\
    (x_1 + e_1)^2 + x^2_2
\end{array}
    &
    \begin{array}{c}
    R_{+-}, x_0 > e_0, x_1 < -e_1 \\
    C + e_0U_0 - e_1U_1 \\
    (x_0 - e_0)^2 + (x_1 + e_1)^2 + x^2_2
\end{array}
\end{array}
$$

It gives a Missing \end{array} error, but as far as I can see, it's not. Not sure if it's related, but when I pasted my MathJax code (above), the formatting goes a bit wrong after the first \\\hline; in Notepad++, the code is formatted uniformly (all spaces, no tabs).

\$\endgroup\$
1
  • \$\begingroup\$ I was eventually able to solve the problem & have written up an answer. But I'm not entirely sure if this is a useful/appropriate question to raise on GDSE Meta as I don't think it was a MathJax bug. I found & used the Math sandbox to find my answer, so maybe that's worth leaving up for others to find? \$\endgroup\$
    – Pikalek
    Commented Mar 19 at 16:03

0

You must log in to answer this question.

Browse other questions tagged .