Skip to main content
@EmilJeřábek's example
Source Link
LSpice
  • 12.9k
  • 19
  • 25

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour

Including vertical arrows restores the expected behaviour:

\begin{CD}
0 @>>> \mathbf D(C) \\
@| @VVV \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @| @VVV \\ 0 @>>> M \end{CD}$$

even if the arrows are ‘empty’:

\begin{CD}
0 @>>> \mathbf D(C) \\
@. @. \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @. @. \\ 0 @>>> M \end{CD}$$

As @EmilJeřábek points out, changing \\ to \\\\ also fixes the problem:

\begin{CD}
0 @>>> \mathbf D(C) \\\\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\\\ 0 @>>> M \end{CD}$$

I think that this is because \\\\ is interpreted essentially as \\{}\\ ; that is, all that's needed is a non-horizontal row between two ‘horizontal’ rows, even if it's empty.

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour

Including vertical arrows restores the expected behaviour:

\begin{CD}
0 @>>> \mathbf D(C) \\
@| @VVV \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @| @VVV \\ 0 @>>> M \end{CD}$$

even if the arrows are ‘empty’:

\begin{CD}
0 @>>> \mathbf D(C) \\
@. @. \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @. @. \\ 0 @>>> M \end{CD}$$

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour

Including vertical arrows restores the expected behaviour:

\begin{CD}
0 @>>> \mathbf D(C) \\
@| @VVV \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @| @VVV \\ 0 @>>> M \end{CD}$$

even if the arrows are ‘empty’:

\begin{CD}
0 @>>> \mathbf D(C) \\
@. @. \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @. @. \\ 0 @>>> M \end{CD}$$

As @EmilJeřábek points out, changing \\ to \\\\ also fixes the problem:

\begin{CD}
0 @>>> \mathbf D(C) \\\\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\\\ 0 @>>> M \end{CD}$$

I think that this is because \\\\ is interpreted essentially as \\{}\\ ; that is, all that's needed is a non-horizontal row between two ‘horizontal’ rows, even if it's empty.

Vertical arrows fix things
Source Link
LSpice
  • 12.9k
  • 19
  • 25

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour

Including vertical arrows restores the expected behaviour:

\begin{CD}
0 @>>> \mathbf D(C) \\
@| @VVV \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @| @VVV \\ 0 @>>> M \end{CD}$$

even if the arrows are ‘empty’:

\begin{CD}
0 @>>> \mathbf D(C) \\
@. @. \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @. @. \\ 0 @>>> M \end{CD}$$

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour

Including vertical arrows restores the expected behaviour:

\begin{CD}
0 @>>> \mathbf D(C) \\
@| @VVV \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @| @VVV \\ 0 @>>> M \end{CD}$$

even if the arrows are ‘empty’:

\begin{CD}
0 @>>> \mathbf D(C) \\
@. @. \\
0 @>>> M
\end{CD}

$$\begin{CD} 0 @>>> \mathbf D(C) \\ @. @. \\ 0 @>>> M \end{CD}$$

Source Link
LSpice
  • 12.9k
  • 19
  • 25

AMScd columns not aligning

The code

\require{AMScd}\begin{CD}
0 @>>> \mathbf D(C) \\
0 @>>> M
\end{CD}

produces $$\require{AMScd}\begin{CD} 0 @>>> \mathbf D(C) \\ 0 @>>> M \end{CD}$$

To make sure we're seeing the same thing, when I preview the page, it shows up thus for me, with the arrow in the second row aligned with the $\mathbf D(C)$ in the first row:

Non-aligned behaviour

This happens with Firefox, Safari, and Chrome, with all renderers (at least on Safari—I didn't try them all on each browser), in macOS 13.1.

When compiled using TeX (as opposed to MathJax), the result of the code, mutatis mutandis, has the expected alignment of the two arrows:

Expected aligned behaviour