Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Would you like to help me please i'm a beginner ! what's wrong with my code?

{\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*}}

thank you

share|improve this question
    
Remove all the empty lines. Remove the closing \\$$. Add \documentclass{article} and \usepackage{amsmath} and \begin{document} at the top. Add \end{document} at the bottom. –  Dan Mar 20 at 21:53
3  
While you're at it, replace every {eqnarray*} with either {align} or {align*}, and remove the & characters which follow your = signs. (Don't use eqnarray, it's not very good!) –  Niel de Beaudrap Mar 20 at 21:56
    
my code with documentclass begin and a –  Haouam Mar 20 at 21:58

1 Answer 1

Your error is in the spurious $$. But don't use eqnarray. Never ever.

\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}

Increasing the line spacing is not required.

enter image description here

share|improve this answer
    
Thank you very much ! –  Haouam Mar 20 at 22:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.