I'm working on a document on how to solve some basic integral problems. However, I'm having difficulty getting \begin{equation}\end{equation} to do what I need it to do. I would like all of my equations to be aligned (why I started looking at the equation environment) and numbered, but I would also like to put lines of text between parts of the equation to document what is happening.

My problem is, lines of text are inline with equations no matter what I type. Here's what I've tried.

\vec{F_{net}} = m \vec{a}\\
\text{This is a basic equation, and is also on the same line as the previous example}

This code compiles fine, but everything is on one line and runs off the page. What's the best way to fix this?

  • You should just put the \text outside the equation. Why not? – Werner Apr 26 '13 at 18:22
  • @Werner - the OP's write-up wasn't very clear on this point, but he/she may have meant to write that the text is to be inserted between equations that are to be aligned (say, on some equal sign)... – Mico Apr 26 '13 at 18:31
  • @Mico: Then the OP should see Is it possible to break up an align environment and keep the tab positions? and its associated duplicates... – Werner Apr 26 '13 at 18:34

If you have more than one equation and some running text between the equations, you should probably use either the \intertext macro of the amsmath package or the \shortintertext macro of the mathtools package. As the second macro name suggests, it's meant for cases of only a few words between successive equations.

Separately, to have several equations aligned vertically, you should look into using the align environment (provided by the amsmath package).

enter image description here

\vec{F}_{\text{net}} &= m \vec{a} \label{eq:fnet}\\
\intertext{This is a basic equation, and is also on the same line as the previous example. And some more text. And still more text.} 
E &= mc^2 \label{eq:einstein}

Here are some cross-references to equations \eqref{eq:fnet} and \eqref{eq:einstein}.

Option 1:

enter image description here




\vec{F}_\text{net} = m \vec{a}\\
\intertext{This is the Newton's second law of motion when the mass does not change with time. But for time-varying mass, we have to use}
\vec{F}_\text{net} = \frac{\textrm{d}(m\vec{v})}{\textrm{d}t}

  • The OP's write-up wasn't entirely clear, but he/she may be looking to place text between equations that are to be aligned vertically. – Mico Apr 26 '13 at 18:28

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