TransWikia.com

Spacing issues with align, aligned and intertext

TeX - LaTeX Asked by HerpDerpington on August 13, 2020

I have the following snippet:

begin{align}
    begin{aligned}
        ab &= abcdefghij&&ABCDEF 
           &            &&-ZYXW
    end{aligned}
    intertext{not also that}
    ab &= defghijklmn
end{align}

This has a few spacing problems. First, there is the gap between j and A and in the next line before the -. Second, the second equation is misaligned. It should have been aligned at the = of the first equation. How can I fix this?

One Answer

I guess this is what you're trying to obtain:

documentclass{article}
usepackage{mathtools}

begin{document}

begin{align}
        ab &= begin{alignedat}[t]{2}
            abcdefghij&ABCDEF 
           &-ZYXW
           end{alignedat} 
    shortintertext{note also that}
    ab &= defghijklmn
end{align}

end{document} 

enter image description here

Correct answer by Bernard on August 13, 2020

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