你能帮助我吗?我是初学者!我的代码有什么问题?
{\setlength{\jot}{0.40 cm}
\begin{eqnarray*}
n^*_{11} & = & \dfrac{n_{1.}\times n_{.1}}{n} \\
& = & \dfrac{120 \times 120}{200} \\
\text{avec} \quad \sum_{k=1}^{q} n^*_{jk} & = & n_{j.} \quad \text{ et} \quad \sum_{j=1}^{p} n^*_{jk} = n_{.k} \\
n^*_{jk} & = & \dfrac{120\times 120}{200} \\
n^*_{12} & = & \dfrac{n_{1.}\times n_{.2}}{n} \\
& = & \dfrac{120\times 80}{200} \\
n^*_{21} & = & \dfrac{n_{2.}\times n_{.1}}{n} \\
n^*_{21} & = & \dfrac{60\times 120}{200} \\$$
\end{eqnarray*}}
谢谢
答案1
你的错误在于虚假的$$
。但不要使用eqnarray
。永远不要。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
n^*_{11} & = \frac{n_{1{\cdot}}\times n_{{\cdot}1}}{n} \\
& = \frac{120 \times 120}{200} \\
\text{avec} \quad \sum_{k=1}^{q} n^*_{jk} & = n_{j{\cdot}}
\quad \text{et} \quad \sum_{j=1}^{p} n^*_{jk} = n_{.k} \\
n^*_{jk} & = \frac{120\times 120}{200} \\
n^*_{12} & = \frac{n_{1{\cdot}}\times n_{{\cdot}2}}{n} \\
& = \frac{120\times 80}{200} \\
n^*_{21} & = \frac{n_{2{\cdot}}\times n_{{\cdot}1}}{n} \\
n^*_{21} & = \frac{60\times 120}{200}
\end{align*}
\end{document}
不需要增加行距。