1

I am using flalign for left alingment of two equations, but I also want to give them one label for which I found the split environment. But they are not working together. The question is how to align left two equations but give them one common label?

  • fl in flalign stands for full length not flush left, normally alignment is a document property so [fleqn] option to the documentclass or amsmath. "not working together" does not really give any clue as to what you did, or what error message you got. – David Carlisle Sep 12 '15 at 10:06
4

The question is not yet clear, do you mean one of the following variations of the theme?

\documentclass{article}
\usepackage{amsmath}

\begin{document}
  \hrule
  \begin{flalign}
    \begin{gathered}
      \text{First equation.}\hfill\\
      \text{Second equation.}
    \end{gathered}
    &&
  \end{flalign}
  \hrule
  \begin{flalign}
    \begin{gathered}
      \text{Bla} \\
      \text{Centered}
    \end{gathered}
    &&
  \end{flalign}
  \hrule
  \begin{flalign}
    \begin{aligned}
      1 + 2 &= 3 \\
      4 &= 2^2 * 2^0
    \end{aligned}
    &&
  \end{flalign}
  \hrule
\end{document}

Result

Variations with updated information. The first case puts all to the left, the second case is more complicate, it sets the equations in the middle, but the text to the left:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\hrule
\begin{flalign}
  \begin{aligned}
    \text{or}\quad f &= m \frac{dv}{dt};\\
    \text{or}\quad f &= m \frac{d^2y}{dt^2};
  \end{aligned}
  &&
\end{flalign}
\hrule
\begin{flalign}
  \begin{gathered}
    \rlap{or}\vphantom{\frac{dv}{dt}} \\
    \rlap{or}\vphantom{\frac{d^2y}{dt^2}}
  \end{gathered}
  &&
  \begin{aligned}
    f &= m \frac{dv}{dt};\\
    f &= m \frac{d^2y}{dt^2};
  \end{aligned}
  &&
\end{flalign}
\hrule
\end{document}

Result

  • I intended the first example. I am using your code like this which is not working. The error is, Extra alignment tab has been changed to \cr. \begin{document} \begin{flalign} \begin{gathered} \text{or} && f &= m \frac{dv}{dt};&\\ \text{or} &&f &= m \frac{d^2y}{dt^2}; \end{gathered} && \end{flalign} \end{document} – Qasim Chaudhari Sep 13 '15 at 6:19
  • If you want to align the equations additionally, then aligned should be used instead of gathered. I have updated the answer with two more variants with the text part on left. It remains unclear, where the equations should go. – Heiko Oberdiek Sep 13 '15 at 6:52
  • I was looking for case 2 here. The only remaining question is the purpose of vphantom here. I removed it and the output was still the same. By the way, that's an incredible amount of help. Thanks! – Qasim Chaudhari Sep 13 '15 at 10:38
  • @QasimChaudhari The \vphantom are needed to get the correct baselines for "or". – Heiko Oberdiek Sep 13 '15 at 10:43

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.