How to write these system in nice form

I got this system of three equations. I want to write them in nice form

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{align}
e^{y}[m_0 \sin(c)-m_1\cos(kh)]=&0 \\
e^{-\alpha h}[m_0 \sin(kh)+m_2\tan(kh)]&=0 \\
m_0\left[2k\kappa  \sin(kh)\cosh(yu)-2\alpha\kappa \cos (k h)\sinh (\alpha h)\right]
\nonumber \\+m_1[-k+\alpha \kappa e^{yu} \cos(c)+k e^{y} \cos(kh)]\nonumber \\+m_2[w+\alpha  e^{-y}
\tan(kh)-k  e^{-y}\sin(c)]&=0
\end{align}

\end{document}

• The first & should be behind the equal sign. Also, be more precise in your question. – Zoxume Apr 23 '16 at 12:46

I'd avoid aligning the =0 bits that would give too much prominence to the less significant part. Here are two proposals:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{align}
& e^{y}[m_0 \sin(c)-m_1\cos(kh)]=0 \\[1ex]
& e^{-\alpha h}[m_0 \sin(kh)+m_2\tan(kh)]=0 \\[1ex]
& \!\begin{aligned}[b]
& m_0[2k\kappa \sin(kh)\cosh(yu)-2\alpha\kappa \cos(kh)\sinh(\alpha h)] \\
& \qquad+m_1[-k+\alpha \kappa e^{yu} \cos(c)+k e^{y} \cos(kh)] \\
\end{aligned}
\end{align}

\begin{align}
& e^{y}[m_0 \sin(c)-m_1\cos(kh)]=0 \\[1ex]
& e^{-\alpha h}[m_0 \sin(kh)+m_2\tan(kh)]=0 \\[1ex]
& \!\begin{aligned}[b]
m_0[2k\kappa \sin(kh)\cosh(yu)-2\alpha\kappa \cos(kh)\sinh(\alpha h)] \\
{}+m_1[-k+\alpha \kappa e^{yu} \cos(c)+k e^{y} \cos(kh)] \\
{}+m_2[w+\alpha e^{-y}\tan(kh)-k e^{-y}\sin(c)]&=0
\end{aligned}
\end{align}

\end{document}


• Why do you add a negative space (\!) at the beginning of the last equality? – Zoxume Apr 23 '16 at 13:33
• @Zoxume It's a known (mis)feature of aligned. See tex.stackexchange.com/questions/98482/… – egreg Apr 23 '16 at 13:35

Maybe this?

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{align}
e^{y}[m_0 \sin(c)-m_1\cos(kh)]&=0 \\
e^{-\alpha h}[m_0 \sin(kh)+m_2\tan(kh)]&=0 \\[1ex]
\begin{aligned}[b] m_0 [2k\kappa \sin(kh)\cosh(yu) -2\alpha\kappa \cos (k h)\sinh (\alpha h)]&
\\{}+m_1 [-k +\alpha \kappa e^{yu} \cos(c) +k e^{y} \cos(kh)]& \\{}+m_2 [w +\alpha e^{-y} \tan(kh) -k e^{-y}\sin(c)]& \end{aligned}&=0
\end{align}

\end{document}


Use alignat. Here is my attempt

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{alignat}{4}
e^{y}         & [m_0 \sin(c)                     & - & m_1\cos(kh)] &=0 \\
e^{-\alpha h} & [m_0 \sin(kh)                    & + & m_2\tan(kh)] &=0 \\
m_0 & [2k\kappa \sin(kh)\cosh(yu)      & - & 2\alpha\kappa \cos (k h)\sinh (\alpha h)] \nonumber \\
+m_1 & [-k+\alpha \kappa e^{yu} \cos(c) & + & k e^{y} \cos(kh)] \nonumber \\
+m_2 & [w+\alpha  e^{-y} \tan(kh)       & - & k  e^{-y}\sin(c)] &=0
\end{alignat}

\end{document}


Also, check this question answer for more tricks on cleaning the equation.