The amsmath cases environment seems to require being placed within \[...\]. What is that syntax? Amsmath documentation does not include these square brackets, yet cases won't compile without them.
Asked
Active
Viewed 840 times
4
1 Answers
5
The amsmath cases environment must be used in math mode. While not absolutely mandatory, cases environments are generally used in display-style math mode. (The other math mode in TeX is frequently called inline-style.) The Plain-TeX method of initiating and terminating display-style math mode -- $$ ... $$ -- should not be used in LaTeX; instead, one should use \[ ... \] to get an unnumbered display-style math environment. Of course, cases environments may be used in numbered equation environments as well.
For more on the differences between $$ ... $$ and \[ ... \], see the posting What are the differences between $$, \[, align, equation and displaymath?
casesenvironment must appear in math mode. Math mode may be entered by$ ... $or\( ... \)for in-line maths and\[ ... \]for displayed maths. There are also environments, such asequationandflalign*which automatically put you in math mode as well, but one way or another, you must be in math mode. The syntax for entering displaymath mode, though, is just\[ ... \]– Au101 Dec 12 '15 at 22:54casesis math. i believe you mean that this environment needs to be put inside\[ ... \], not just ordinary braces. yes, that is true. these are not\textbackslash, but actual backslashes, and the\[ ... \]is a pair of commands that indicates display math with no equation number. this is equivalent to\begin{equation*} ... \end{equation*}(welcome, by the way.) – barbara beeton Dec 12 '15 at 22:54amsmathdocumentation doesn't spell out the meaning or use of\[ ... \]. i've added that to the bugs list. – barbara beeton Dec 12 '15 at 23:21\[and\]are set up in the LaTeX kernel, it's probably not necessary to explain in any detail what these instructions are in the user guide of theamsmathpackage. I think it may suffice to state explicitly in the user guide that thecasesenvironment must be embedded in a math environment -- preferably a display-math environment, right? -- and mention a couple of examples of numbered and unnumbered display-math environments. – Mico Dec 13 '15 at 08:39\begin{equation*} ... \end{equation*}is equivalent to\[ ... \]. i would have assumed it to be obvious that any new command or environment described in theamsmathdocumentation would by necessity have to be within a math environment, but perhaps i'd better add that too. (kind of like the warning on a coffee cup. "the contents may be hot", but ...) – barbara beeton Dec 13 '15 at 13:02