1

I have system of equations (2 consecutive lines of equations) that I need to display. I use to do this just using two consecutive equation environments, but then I noticed the spacing is rather larger between the equations. I've read up on the align environment, which works, but does it ensure the spacing between the equations won't overlap? I would like to be consistent with my approach and if I'm going to run into issues with align later, I assume learn a better option now.

The amsmath does cover most of the options (I believe aligned is another environment? But no multiple numbers/labels?) but it doesn't say how to include numbering and labels for each equation (for the ones where the option is available).

  • Hi. Could you please provide an MWE (minimal working example). – shahrina ismail Dec 21 '16 at 5:13
  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – CarLaTeX Dec 21 '16 at 5:15
0

Don't use successive equations to number a system of equations. Rather use align which naturally numbers each in the same, consistent way. To avoid selective numbering, use \nonumber (or \notag), and to provide unique tags to select equations, use \tag{<tag>}.

enter image description here

\documentclass{article}

\usepackage{amsmath}
\usepackage[nopar]{lipsum}

\begin{document}

\lipsum[2]
\begin{align}
           f(x) &= ax^2 + bx + c \\
  ax^2 + bx + c &= g(x) \\
           f(x) &= g(x) \nonumber \\
  dx^2 + ex + f &= f + ex + dx^2 \tag{quadratic}
\end{align}
\lipsum[3]

\end{document}

The starred version align* removes all automatic numbering (like placing \nonumber next to each equation).

align does make sure the successive equations don't overlap, and also that the equations align horizontally with the placed & alignment marks.

aligned is similar, but is typically used to create an alignment with a single number. Here is the same example with aligned:

enter image description here

\documentclass{article}

\usepackage{amsmath}
\usepackage[nopar]{lipsum}

\begin{document}

\lipsum[2]
\begin{equation}
  \begin{aligned}
             f(x) &= ax^2 + bx + c \\
    ax^2 + bx + c &= g(x) \\
             f(x) &= g(x) \\
    dx^2 + ex + f &= f + ex + dx^2
  \end{aligned}
\end{equation}
\lipsum[3]

\end{document}
| improve this answer | |

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.