\begin{array}{c}...\end{array}
\begin{aligned}...\end{aligned}
\newcommand{\cell}[1]{\kern .03em #1\kern.03em}
\begin{aligned}
\begin{array}{|c|c|c|c|c|c|}
\hline
8 & 5 & 3 & 2 & 1 & 1 \\
\hline
\end{array}
\\
\begin{array}{ c c c c c c }
\cell 0 & \cell 1 & \cell 2 & \cell 3 & \cell 4 & \cell 5 \kern.4em \\
\end{array}
\end{aligned}
On Apr 8, 2024, at 2:05 PM, Sangeeth Sudheer <sangeet...@gmail.com> wrote:
I'm using MathJax inside Obsidian and was running into an issue trying to get the below snippet to render correctly:\begin{aligned}
\begin{array}{|c|c|c|c|c|c|}
\hline
8 & 5 & 3 & 2 & 1 & 1 \\
\hline
\end{array}
\\
\begin{array}{ c c c c c c }
0 & 1 & 2 & 3 & 4 & 5 \\
\end{array}
\end{aligned}I tried the same snippet in MathJax demo link and I see the same issue:
<CleanShot 2024-04-08 at 23.2...@2x.png>
Katex renders this as expected:
<CleanShot 2024-04-08 at 23.3...@2x.png>
Is this an issue in MathJax or is the snippet not in line with expectations?
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/0b7e8dcd-2101-45c1-a2fb-0425a86dc3ccn%40googlegroups.com.
<CleanShot 2024-04-08 at 23.2...@2x.png><CleanShot 2024-04-08 at 23.3...@2x.png>
I'm happy for now with \begin{array}{c} but I agree that the latter looks correct (and I missed spotting the misalignment in the Katex screenshot I shared in the original message). But, would rather keep it simple.
You mentioned this is fixed in v4 so does that mean the end result would look closer to the output of the more complicated solution you shared?
Also wondering in general, if I need to stack an array on top of another array like this, is the solution you shared the canonical one or is there a way to say customize border color of the array to be transparent?
<style>.no-lines > mjx-box,.no-lines > mjx-box > mjx-mtable > mjx-table > mjx-itable > mjx-mtr > mjx-mtd,.no-lines > mjx-table > mjx-itable > mjx-mtr > mjx-mtd,.no-lines > mjx-table > mjx-itable {border-color: transparent ! important;}</style>
$$
\begin{aligned}\begin{array}{|c|c|c|c|c|c|}\hline8 & 5 & 3 & 2 & 1 & 1 \\\hline\end{array}\\
\class{no-lines}{\begin{array}{|c|c|c|c|c|c|}
0 & 1 & 2 & 3 & 4 & 5 \\\end{array}}\end{aligned}
$$