[Tex/LaTex] overset text over equal sign in in an Align environment


Look at the following example

     & x \\
     \overset{\text{some long explanation}}= & foo \\
     & = bar

what is the best way to get the equal signs aligned? Now I have seen different solution such as adding \overset{\hphantom{\Ň£ext{some long explanation}}}= to the beginning of every line, but I don't really think that is the best solution.
Any better ideas?


I guess what i am actually after is

  1. aligning the first column of the align environment right
  2. aligning the equal sign under the overset text right

Best Answer


  x & \\
    &\overset{\mathclap{\strut\text{some long explanation}}}= foo\\
    & = bar