2

Equation exceeds one column of IEEE pattern in LaTeX how should I correct it? Please help, the code is attached herewith.

\begin{equation}\label{eq11}
        p\left( {v,h|u,y,...} \right) = {\rm{RelU}}\left( {\left[ {\hat b + {w^h}\left\{ {\left( {{v^T}{w^v}} \right) \circ \left( {{y^T}{w^y}} \right)} \right\}} \\ \right]*\left[ {\hat a + {w^v}\left\{ {\left( {{h^T}{w^h}} \right) \circ \left( {{y^T}{w^y}} \right)} \right\}} \right]} \right)
\end{equation}
  • 1
    Welcome to TeX.SX! Long equations are not automatically split as this requires the author's judgment. – egreg Apr 10 '18 at 9:11
3

Line breaks aren't possible in an equation environment. There are likely several possible ways of doing this, one is to use multline from amsmath, another is a split environment inside equation. Note that \left/\right cannot span a line break, and that you have a lot of brace pairs that are not needed.

enter image description here

\documentclass{IEEEtran}
\usepackage{lipsum}
\usepackage{amsmath}
\DeclareMathOperator{\RelU}{RelU}
\begin{document}
\lipsum*[1]
\begin{multline}\label{eq11}
   p(v,h|u,y,...) = 
   \RelU\bigl( \bigl[ \hat b + w^h \{ ( v^T w^v ) \circ ( y^T w^y ) \}  \bigr]* \\
    \bigl[ \hat a + w^v \{ ( h^T w^h ) \circ ( y^T w^y ) \} \bigr] \bigr)
\end{multline}
\lipsum[2]
\begin{equation}\label{eq12}
\begin{split}
   p(v,h|u,y,...) &= 
   \RelU\bigl( \bigl[ \hat b + w^h \{ ( v^T w^v ) \circ ( y^T w^y ) \}  \bigr]* \\
   &\phantom{{}=\RelU\bigl(} \bigl[ \hat a + w^v \{ ( h^T w^h ) \circ ( y^T w^y ) \} \bigr] \bigr)
\end{split}
\end{equation}
\lipsum
\end{document}
3

I suggest using multline. I took the opportunity to improve and simplify the code:

\documentclass{ieeetran}
\usepackage{mathtools}
\usepackage{lipsum}

 \begin{document}

\lipsum[1]
\begin{multline}\label{eq11}
        p\bigl(v,h\mid u,y\dots \bigr) = \\
  \mathrm{RelU}\Bigl( \Bigl[ {\hat b + {w^h}\bigl\{\bigl(v^T w^v \bigr) \circ \bigl(y^T w^y \bigr) \bigr\}}\Bigr] \\ *
  \Bigl[ {\hat a + {w^v}\bigl\{ \bigl(h^Tw^h \bigl) \circ \bigl( y^T w^y \bigr) \bigr\}} \Bigr] \Bigr)
\end{multline}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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