\cases 命令在最初的 TeX 里就已经有了:
\def\cases#1{\left\{\,\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\right.}
(这段代码来自《The TEXbook》)
可以看到它的第二列是没加美元符的,所以就是文本模式。
后来 LaTeX 也继承了这一点:
\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}
(这段代码来自 source2e.pdf)
而 cases 环境是 amsmath 宏包定义的,而且加载该宏包后,\cases 命令不能再用。
Explanation: When the amsmath package is used, the old forms of \pmatrix,
\matrix, and \cases cannot be used any longer because of naming conflicts.
Their syntax did not conform with standard LATEX syntax in any case.
(来自 amsldoc.pdf)
而在这里竟然两个都能用,看来还是因为 MathJax 够宽容。 |