我有以下等式
我用过
\begin{equation}
\centering
A_j =
\begin{cases}
0 & N^2 < N_j^2 \\
\text{must have been constrained,} & N^2 > N_j^2 \\
\text{can take any value as long} & N^2 = N_j^2
\end{cases}
\label{eq:10.30}
\end{equation}
写下方程式(记录在这里http://en.wikipedia.org/wiki/Help:Displaying_a_formula#Continuation_and_cases). 在 latex 中添加 j = 2,3,4,6,7.. 条件的最佳方法是什么?
提前致谢!
答案1
以下是一些选项:
将构造设置为组合
array
,以便对齐“cases
”的内容和 的值j
:使用
amsmath
的gather
:将的值设置为
j
上一段的一部分:
注意方程式标记(标签)位置的差异。
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{equation}
\renewcommand{\arraystretch}{1.2}
\begin{array}{@{}c@{}}
A_j =
\left\{\begin{array}{@{}ll@{}}
0 & N^2 < N_j^2 \\
\text{must have been constrained,} & N^2 > N_j^2 \\
\text{can take any value as long} & N^2 = N_j^2
\end{array}\right. \\
j = 2, 3, \dots
\end{array}
\label{eqn:myeqn1}
\end{equation}
\begin{gather}
A_j =
\begin{cases}
0 & N^2 < N_j^2 \\
\text{must have been constrained,} & N^2 > N_j^2 \\
\text{can take any value as long} & N^2 = N_j^2
\end{cases} \label{eqn:myeqn2} \\
j = 2, 3, \dots \nonumber
\end{gather}
\noindent
\ldots blah blah blah for $j = 2, 3, \dots$
\begin{equation}
A_j =
\begin{cases}
0 & N^2 < N_j^2 \\
\text{must have been constrained,} & N^2 > N_j^2 \\
\text{can take any value as long} & N^2 = N_j^2
\end{cases} \label{eqn:myeqn2}
\end{equation}
\end{document}