TransWikia.com

Centralization of equations after using begin {equation} and begin {split}

TeX - LaTeX Asked on April 18, 2021

I’m having trouble centralizing my equations after using begin{equation} and begin{split}, they are always aligned to the right, I don’t understand why.

documentclass[
% -- opções da classe memoir --
12pt,               % tamanho da fonte
oneside,            % para impressão apenas no recto. Oposto a twoside
a4paper,            % tamanho do papel. 
]{article}
usepackage{amsfonts, amssymb, amsmath}

begin{document}
begin{equation}
begin{split}
varDelta ^ {q_{tau}} = q_{tau}left(F_{y_{p}|k=p}right)-q_{tau}left(F_{y_{alpha}|k=alpha}right) 
varDelta^{q_{tau}}=left[q_{tau}left(F_{y_{p}|k=p}right)-q_{tau}left(F_{y_{p}|k=alpha}right)right]+left[q_{tau}left(F_{y_{p}|k=alpha}right)-q_{tau}left(F_{y_{alpha}|k=alpha}right)right]
end{split}
end{equation}
end{document}

When I try, the formulas are centralized:

documentclass[
% -- opções da classe memoir --
12pt,               % tamanho da fonte
oneside,            % para impressão apenas no recto. Oposto a twoside
a4paper,            % tamanho do papel. 
]{article}
usepackage{amsfonts, amssymb, amsmath}

begin{document}
begin{equation}
begin{split}
A = frac{pi r^2}{2} 
= frac{1}{2} pi r^2
end{split}
end{equation}
end{document}

I also tried using begin{align}, but it didn’t work either:

documentclass[
% -- opções da classe memoir --
12pt,               % tamanho da fonte
oneside,            % para impressão apenas no recto. Oposto a twoside
a4paper,            % tamanho do papel. 
]{article}
usepackage{amsfonts, amssymb, amsmath}

begin{document}
begin{align}
varDelta^{q_{tau}}=q_{tau}left(F_{y_{p}|k=p}right)-q_{tau}left(F_{y_{alpha}|k=alpha}right) nonumber 
varDelta^{q_{tau}}=left[q_{tau}left(F_{y_{p}|k=p}right)-q_{tau}left(F_{y_{p}|k=alpha}right)right]+left[q_{tau}left(F_{y_{p}|k=alpha}right)-q_{tau}left(F_{y_{alpha}|k=alpha}right)right] nonumber 
varDelta^{q_{tau}}=varDelta_{X}^{q_{tau}}+varDelta_{S}^{q_{tau}}
end{align}
end{document} 

I would like to know what the problem is. Thanks.

One Answer

I guess you want to align at the equals sign:

documentclass[
% -- opções da classe memoir --
12pt,               % tamanho da fonte
oneside,            % para impressão apenas no recto. Oposto a twoside
a4paper,            % tamanho do papel.
]{article}
usepackage{amsfonts, amssymb, amsmath}

begin{document}
begin{equation}
begin{split}
varDelta^{q_{tau}}&= q_{tau}(F_{y_{p}mid k=p})-q_{tau}(F_{y_{alpha}mid k=alpha}) 
varDelta^{q_{tau}}&=[q_{tau}(F_{y_{p}mid k=p})-q_{tau}(F_{y_{p}mid k=alpha})]
                     +[q_{tau}(F_{y_{p}mid k=alpha})-q_{tau}(F_{y_{alpha}mid k=alpha})]
end{split}
end{equation}
end{document}

enter image description here

However, in this case, I'd remove the second instance of varDelta^{q_{tau}}:

documentclass[
% -- opções da classe memoir --
12pt,               % tamanho da fonte
oneside,            % para impressão apenas no recto. Oposto a twoside
a4paper,            % tamanho do papel. 
]{article}
usepackage{amsfonts, amssymb, amsmath}

begin{document}
begin{equation}
begin{split}
varDelta^{q_{tau}}
&= q_{tau}(F_{y_{p}mid k=p})-q_{tau}(F_{y_{alpha}mid k=alpha}) 
&=[q_{tau}(F_{y_{p}mid k=p})-q_{tau}(F_{y_{p}mid k=alpha})]
 +[q_{tau}(F_{y_{p}mid k=alpha})-q_{tau}(F_{y_{alpha}mid k=alpha})]
end{split}
end{equation}
end{document}

enter image description here

If you want the equations to be separately centered, but I don't think it's your aim, replace split by gathered and remove & to get

enter image description here

I removed all left and right commands, that serve no purpose here and actually spoil the final output.

Correct answer by egreg on April 18, 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