2

I want to create an flalign* environment in which there are some instructions in the form of text, aligned to the left also, but not disturbing the alignment of the rest of the equation system.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
 \begin{flalign*}
  this~is &= an~equation&&\\
  &= yet~another~equation&&\\
  \text{here's some text that I'd want to have aligned left, without disturbing the equation alignment system}&&\\
  &= and~the~continued~equation~system
 \end{flalign*}
\end{document}

In my above MWE, the \text{~} section shifts the whole system of equations to the right, although I'd like all the equations to be aligned to the left.

I'd like to be able to stop and then restart flalign* where it was, for two reasons:

  1. The alignment of the text will be independent from that of the equations, resulting in les problems.

  2. The appropriate margin will be placed between the text a equation systems, just like it would for any text that is independent of an equation system environment. What I don't like in my MWE is that the text is squished into the equation system as though it is an equation itself, although I'd like it to stand out more, and have spacing that is coherent with the rest of my document.

So, to recap, I want to start an flalign* environment, "pause" it, insert one or more generic lines of text in my document, then restart the flalign* where it was, in such a way that both equation systems be aligned to each other.

NOTE: If, for whatever reason, your solution results in all the equation systems in the document being aligned to each other, then that won't solve it for me, as I also have many flalign* environments that I want to keep independent from each other within my same document.

4
  • 6
    Use \intertext instead of \text. Commented Feb 14, 2023 at 13:07
  • 2
    See also \shortintertext (mathtools package). Commented Feb 14, 2023 at 14:11
  • @IanThompson Works! Thank you.
    – GPWR
    Commented Feb 14, 2023 at 19:04
  • @JohnKormylo Thanks! For those interested, see page 11 of the amsmath manual: ams.org/arc/tex/amsmath/amsldoc.pdf
    – GPWR
    Commented Feb 14, 2023 at 19:05

2 Answers 2

4

First off, don't use flalign. If you want flush left equations, pass amsmath the relevant options. Then you can and should use equation for single equations, or gather for groups of unaligned ones.

Here I set \mathindent to zero, but I recommend not doing it.

What you need is \intertext.

\documentclass{article}
\usepackage[fleqn]{amsmath}

\setlength{\mathindent}{0pt}

\begin{document}

I'm not sure why using \texttt{flalign}
\begin{flalign*}
  this~is &= an~equation&&\\
  &= yet~another~equation&&
  \intertext{here's some text that I'd want to have aligned left, 
    without disturbing the equation alignment system}
  &= and~the~continued~equation~system
\end{flalign*}
because \texttt{align} is much easier
\begin{align*}
  this~is &= an~equation\\
  &= yet~another~equation
  \intertext{here's some text that I'd want to have aligned left,
    without disturbing the equation alignment system}
  &= and~the~continued~equation~system
\end{align*}

\end{document}

enter image description here

1
  • Thank you for your time. Yes, you're right. I was just blindly using flalign* because it's the first command I fell upon on the internet, but I can see why it'd be bad practice. I appreciate you answering so clearly and completely, and solving that extra issue. Peace.
    – GPWR
    Commented Feb 14, 2023 at 19:02
2

Please check the below (not sure whether it exactly match with you)

 \begin{flalign*}
\intertext{this is} &= \text{an equation}\\
  &= \text{yet another equation}\\
\intertext{there's some text that I'd want to have aligned left, without disturbing the equation alignment system}
  &= \text{and the continued equation system}
 \end{flalign*}

enter image description here

3
  • 1
    Sorry, I missed to add \mathindent, thanks to sir egreg
    – MadyYuvi
    Commented Feb 14, 2023 at 13:57
  • Thank you! Your answer works perfectly. +1. I marked egreg's as the solution because it's more complete, but your answer is just fine too. I appreciate your time, and God bless you.
    – GPWR
    Commented Feb 14, 2023 at 18:59
  • @GPWR Thanks for your kind words.
    – MadyYuvi
    Commented Feb 15, 2023 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .