TransWikia.com

Aligning mathematical "equations"

TeX - LaTeX Asked on March 3, 2021

I am trying to get the following output (this is just written using Google Docs):

enter image description here

I find that align* doesn’t work here as there is no = present. Further, I would like this to be centralised, so I have not tried using flalign* (as my understanding is that flalign* can only be used to align equations to the left-hand-side).

Any assistance would be much appreciated.

4 Answers

You can use an align, even without =.

enter image description here

documentclass{article}

usepackage{amsmath}

begin{document}

begin{align*}
              & gcd(a, b) ,|, a text{ and } b 
  Rightarrow & gcd(a, b) ,|, ax + by 
  Rightarrow & gcd(a, b) ,|, d
end{align*}

end{document}

Correct answer by Werner on March 3, 2021

These lines can be produced using the "eqnarray"-environment:

begin{eqnarray*}
   gcd(a,b) &|& a and b
 =>gcd(a,b) &|& ax + by
 =>gcd(a,b) &|& d
end{eqnarray*}

Use the asterix (*) to suppress the numbering of the equations and the sign "&" on both of the sign which you want to center around.

Answered by thisismetrying on March 3, 2021

Using align like this should be working:

documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
  & gcd(a,b) mid a  and  b 
 Rightarrow & gcd(a,b) mid ax + by 
 Rightarrow & gcd(a,b) mid d
end{align*}
end{document}

When I compile it, it is well centered and looks like your picture. Hope this helps

Answered by Xandria on March 3, 2021

It does work. Align the | symbol:

documentclass{article}
usepackage{amsmath}

begin{document}

begin{align*}
gcd(a, b) & mid a, b 
implies gcd(a, b) & mid ax + by 
implies gcd(a, b) & mid d
end{align*}

end{document} 

enter image description here

Answered by Bernard on March 3, 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