TransWikia.com

How to align two sets of equation separated by some text in a beamer slide?

TeX - LaTeX Asked on December 10, 2021

I want to align the two set of equations on same slide.

I found a similar post How to align a set of multiline equations but there the equations do not involve text as in this case

Here is my MWE

documentclass{beamer}
usepackage[english]{babel}

begin{document}
begin{frame}
frametitle {MWE:Align two set of equations}
begin{center}
begin{align*}
sigma^2&=(a+b)^2-(a+c)^2 \
        &=(a^2+b^2-2ab)-(a^2+c^2-2ac) 
end{align*}
end{center}
Cancel out common terms, then
begin{center}
begin{equation}
sigma^2= b^2-c^2+2(ac-ab) 
end{equation}
end{center}
end{frame}
end{document}

Green arrow shows where I would like my eq 2 to appear.

enter image description here

One Answer

amsmath provides intertext{} for this kind of purpose. For example,

documentclass{beamer}
usepackage{amsmath}
begin{document}
begin{frame}
  frametitle {MWE:  Align two set of equations}
    begin{align*}
      sigma^2&=(a+b)^2-(a+c)^2 \
      &=(a^2+b^2-2ab)-(a^2+c^2-2ac)\
      intertext{Cancel out common terms, then}
      sigma^2&= b^2-c^2+2(ac-ab)
    end{align*}
end{frame}
end{document}

intertext

Answered by cfr on December 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP