2

I'm new to laTex and I've started writing my first article with it. I have a number of equations to display, and I'm stuck at the most fundamental level. All the equations that I type are displayed in line, as shown in the image. Could someone please tell me what mistake I'm making here.

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\title{force}
\maketitle
\begin{equation}
m_1*a_1 = F1
m_2*a_2 = F2
\end{equation}
\end{document}

Thank You equations are displayed in line

4

The environment equation can only display one equation line. Very likely you want to use gather or align instead, the latter can be used to align the =:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\title{force}
\maketitle
\noindent
Example for \texttt{gather}:
\begin{gather}
m_1*a_1 = F1\\
m_2*a_2 = F2
\end{gather}
Example for \texttt{align}:
\begin{align}
m_1*a_1 &= F1\\
m_2*a_2 &= F2
\end{align}
\end{document}

Result

  • Thank You very much for the swift reply. It worked, and it gave me an understanding of how this works. Thank You very much – prateek Oct 9 '15 at 19:08
3

amsmath has a number of environments intended for presentation of multiple or multi-line equations. take a look at the documentation: texdoc amsmath.

there is also an online tool if that's more convenient: http://www.texdoc.net/

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.