9

I used a * in a bsmallmatrix and found a curious effect. If I write \\* the * is not printed whereas with \\ * it is. Do you guys know why this happens?

My tiny example and screenshot follow below:

\documentclass[12pt]{article}%, border=2pt]{standalone}
\usepackage{mathtools}

\begin{document}

[ \begin{bsmallmatrix}a&a\&\end{bsmallmatrix} ]

[ \begin{bsmallmatrix}a&a\ &\end{bsmallmatrix} ]

\end{document}

StarExample

nopx
  • 181

1 Answers1

14

AMS matrices use a modified form of lookahead that does not skip white space looking for * and [ this is so that you can have

\begin{matrix}
a & b \\
[x] & y
\end{matrix}

with the [ taken as text to be printed not (as it would in a standard array environment} be equivalent to \\[x] and give an error that x isn't a valid length.

* is similar to [ as the array \\ command has a * form \\* even though it is equivalent to \\ as there is no page breaking. (\\* generally is a line break that does not allow a page break at that point).

David Carlisle
  • 757,742