1

Can someone help me, I want to enumerate my mathematical expressions that I wrote inside $$ ... $$.

$$y=f( \sum_{i=1}^{N} w_ix_i+w_0)$$

I used \align but it doesn't work, I even used \begin{equation}

Please help

Au101
  • 10,278

2 Answers2

6

Like this?

enter image description here

\documentclass{article}


\usepackage{amsmath}


\begin{document}

\begin{align}
y& =f\biggl( \sum_{i=1}^{N} w_ix_i+w_0\biggr), \\
U&=i
\end{align}
\end{document}

P.S.: avoid $$ ... $$; use \[ ... \] or \begin{equation} ... \end{equation} instead.

Au101
  • 10,278
JPi
  • 13,595
  • ! Paragraph ended before \align was complete. that's what i got when i use your proposition – Hala Elomrani Jun 19 '17 at 03:33
  • 2
    @HalaElomrani Definitely not with the code from this answer (as is). I can confirm that it works. If you have another problem, please ask a new separate question. – Henri Menke Jun 19 '17 at 03:44
  • it's working because you added the seconde ligne but if you keep just the first one , exactly like what i'm asking , it will not , i don"t know why , i'm a beginner user of LaTex – Hala Elomrani Jun 19 '17 at 03:48
  • Also, make sure you don't have blank lines in math mode. – JPi Jun 19 '17 at 11:19
3

It's not clear what you are looking for. If you are actually looking for a Plain TeX solution (which the $$...$$ syntax suggests), use \eqalignno. The third column holds the number.

$$\eqalignno{
  y &= f\biggl( \sum_{i=1}^{N} w_ix_i+w_0 \biggr) & (1)
}$$
\bye

enter image description here

You could also use amstex.

\input amstex
\TagsOnRight
$$\align
  y &= f\biggl( \sum_{i=1}^{N} w_ix_i+w_0 \biggr) \tag{1}
\endalign$$
\bye

The output is similar.

Henri Menke
  • 109,596