I have the following equation which goes behind the page border:
\begin{equation}
P(word|name_i)= \frac{1}{\sqrt{2\pi\sigma_i^{2}}} \times exp^{\frac{-(tf(name_i,word)*idf(name_i,word)-\mu_i)^{2}}{2\sigma_i^{2}}}
\end{equation}
is there anyway to prevent this to happen?
EDIT
here is the MWE. please note that for the document class, you should download the template from here.
\documentclass{sig-alternate}
\begin{document}
\begin{equation}
P(word|name_i)= \frac{1}{\sqrt{2\pi\sigma_i^{2}}} \times exp^{\frac{-(tf(name_i,word)*idf(name_i,word)-\mu_i)^{2}}{2\sigma_i^{2}}}
\end{equation
\end{document}
Best Answer
I'd use
multline
environment fromamsmath
for this.Output
I don't know what
tf
andidf
are, but if they are meant to be operators, it is better to defineAlso, probably, many words have to be typeset as text.
MWE
Output
If you want to fit it in one line, use
\resizebox
fromgraphicx
MWE
Output
BTW: You should use
e^{...}
or\exp(....)
instead of\exp^(....)
, as Mico suggests in his comment.