标题说明了一切:“cases”环境仅在数学模式下有效。文本模式下有替代方案吗?
答案1
您可以使用或环境模拟cases
文本模式的环境:\parbox
tabular
\documentclass{article}
\usepackage{amsmath}
\newcommand\Text{text text text text text text text text text text text text text text text text text text text text text text text text text }
\begin{document}
\[
\left\lbrace\parbox{7cm}{\Text}\right.
\]
\[
\left\lbrace
\begin{tabular}{@{}p{6cm}p{4cm}}
\Text & \Text\Text \\
\Text & \Text\Text
\end{tabular}\right.
\]
\end{document}
答案2
环境cases
在内联数学模式下无需修改即可运行。也就是说,以下内容有效:
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
...
Some interesting text $P_{r-j}=\begin{cases} ... \end{cases}$ and more interesting text.
但是,如果需要,您可以使用array
内联数学模式创建自己的数学模式。以下是示例:
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
Some interesting text
$P_{r-j}=\left\{\def\arraystretch{1.2}\begin{tabular}{@{}l@{\quad}l@{}}
$0$ & if $r-j$ is odd \\
$r!((-1)^{(r-j)/2}$ & if $r-j$ is even.
\end{tabular}\right.$
Of course, this will modify the baseline compared to the display format:
\[
P_{r-j}=\begin{cases}
0 & \text{if $r-j$ is odd} \\
r!((-1)^{(r-j)/2} & \text{if $r-j$ is even.}
\end{cases}
\]
\end{document}
环境内的定义tabular
(重置\arraystretch
为1.2
和列对齐/规范@{}l@{\quad}l@{}
)直接取自cases
amsmath
包裹
答案3
你可以通过行数来定义高度,在本例中为 11
\documentclass{article}
\usepackage[english]{babel}
\usepackage{multirow,bigdelim}
\newcommand\Text{text text text text text text text
text text text text
text text text text text text text text text
text text text text text }
\begin{document}
\begin{tabular}{l p{6cm} }
\ldelim\{{11}{1.5cm}[Left Side ]
& \Text\Text \\
& \Text
\end{tabular}
\end{document}