I am a new Latex user,I have loaded these two math equation in my Latex documents and i want to split an equation i have into multiple line
\usepackage{amssymb}
\usepackage{amsthm}
I am reading this topic for breaking the lines over multiple
although what ever i do it does not allow me to compile
MWE
\documentclass[authoryear,preprint,review,12pt]{elsarticle}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\begin{equation}\label{xx}
\begin{split}
A&= 1 + 2 + \\
& 3 +4 +6
\end{split}
\end{equation}
\end{document}
\endinput
So
\begin{equation}
A = 1 + 2 + 3 +4 +6
\end{equation}
I want to place them/break the equation in two lines and retain the format of numbering and equal placing beneath.
i tried
\begin{equation}
A = 1 + 2 + \\
3 +4 +6
\end{equation}
Although it does not work
When i use \begin{multline}
\begin{multline}
A = 1 + 2 + \\
3 +4 +6
\end{multline}
and the following errors
! LaTeX Error: Environment multline undefined.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \begin{multline}
! LaTeX Error: \begin{document} ended by \end{multline}.See the LaTeX manual or LaTeX Companion for explanation.Type H for immediate help.... \end{multline}
Though i get the equation broken it is not numbered, or has a one line distance from my text as the \begin{equation}
Also tried this example as kindly suggested
\begin{equation}\label{xx}
\begin{split}
A&= 1 + 2 + \\
& 3 +4 +6
\end{split}
\end{equation}
and obtaining these
! LaTeX Error: Environment split undefined.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \begin{split}
! Misplaced alignment tab character &. A&
! Misplaced alignment tab character &.<recently read> & &
! LaTeX Error: \begin{equation} on input line 142 ended by \end{split}.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \end{split}
Have i missed anything?



multlineis its own displayed math environment and should be used on its own, not insideequation. Lots of good introductory material is included in the Short Math Guide for LaTeX. – Paul Gessler Jul 07 '14 at 12:22multilineis defined by theamsmathpackage, (b) it is a top level environment and can't be embedded inequation, usesplitinstead (also from theamsmathpackage). – Andrew Swann Jul 07 '14 at 13:04\documentclass{...}; we need to see which packages you've loaded; and\begin{document}and\end{document}are missing. Did you read the answers at the MWE link? My guess is that you haven't loaded theamsmathpackage. But again, without MWE, no way to tell for sure. – Paul Gessler Jul 07 '14 at 13:11elsarticletoo, just remember to issue\usepackage{mathtools}– Andrew Swann Jul 07 '14 at 14:42\usepackage{amsmath}. which is wheresplitis defined. – barbara beeton Jul 07 '14 at 16:05