2

This gives a way of combining two different math environments (so there is no extra vertical skip):

Adjusting vertical skip between equations

But add labels to that exsample

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{gather}
  \begin{split}
    1 + 1 = 2\\
    1 * 2 * 3 * 4 * 5 * 6 * 7 = 7!
  \end{split}\\
  \begin{align}
    7 + 5 &= 12\label{a}\\
    12 &= 11 + 1\label{b}
  \end{align}
\end{gather}

\end{document}

and a problem occurs:

! Package amsmath Error: Multiple \label's: label 'a' will be lost.

What to do?

3

Use aligned, together with the trick in the previous answer:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\multispan{2}\hfill$
  {\begin{aligned}
   & 1 + 1 = 2\\
   & 1 * 2 * 3 * 4 * 5 * 6 * 7 = 7!
  \end{aligned}}
  $\hfill \label{A} \\
  7 + 5 &= 12+1-1+1-1+1-1+1-1 \label{B} \\
     12 &= 11 + 1 \label{C}
\end{align}
Equations \eqref{A}, \eqref{B} and \eqref{C}

\end{document}

enter image description here

0

You can not use align inside gather ... With combination of align and split as follows:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
    \begin{align}
\begin{split}
                    1 + 1 & = 2\\
1 * 2 * 3 * 4 * 5 * 6 * 7 & = 7!
\end{split}                         \label{eq:a}   \\
                    7 + 5 & = 12    \label{eq:b}   \\
                       12 & = 11 + 1\label{eq:c}
    \end{align}
Equations \eqref{eq:a}, \eqref{eq:b} and \eqref{eq:c} \dots
\end{document}

enter image description here

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.