A universal method for left-hand alignment of a sequence of equalities












1















With this code



documentclass[a4paper,12pt]{article}
usepackage{mathtools, mathrsfs}
makeatletter
letsave@mathaccentmathaccent
newcommand*if@single[3]{%
setbox0hbox{${mathaccent"0362{#1}}^H$}%
setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
ifdimht0=ht2 #3else #2fi
}
%The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
%Use a separate algorithm for single symbols:
newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
newcommand*wide@bar@[3]{%
begingroup
defmathaccent##1##2{%
%Enable nesting of accents:
letmathaccentsave@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
if#32 letmacc@nucleusfirst@char fi
%Determine the italic correction:
setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
dimen@wdtw@
advancedimen@-wdz@
%Now dimen@ is the italic correction of the symbol.
dividedimen@ 3
@tempdimawdtw@
advance@tempdima-scriptspace
%Now @tempdima is the width of the symbol.
divide@tempdima 10
advancedimen@-@tempdima
%Now dimen@ = (italic correction / 3) - (Breite / 10)
ifdimdimen@>z@ dimen@0ptfi
%The bar will be shortened in the case dimen@<0 !
rel@kern{0.6}kern-dimen@
if#31
overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
advancedimen@0.4dimexprmacc@kerna
%Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
letfinal@kern#2%
ifdimdimen@<z@ letfinal@kern1fi
iffinal@kern1 kern-dimen@fi
else
overline{rel@kern{-0.6}kerndimen@#1}%
fi
}%
macc@depth@ne
letmath@bgroup@empty letmath@egroupmacc@set@skewchar
mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
macc@set@skewcharrelax
letmathaccentVmacc@nested@a
%The following initialises macc@kerna and calls mathaccent:
if#31
macc@nested@arelax111{#1}%
else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
defgobble@till@marker##1endmarker{}%
futureletfirst@chargobble@till@marker#1endmarker
ifcatnoexpandfirst@char Aelse
deffirst@char{}%
fi
macc@nested@arelax111{first@char}%
fi
endgroup
}
makeatother
begin{document}
[begin{aligned}
mathscr F(bar{r}(t))&=& int_a^{b} L dt& =&int_a^{b} left[L frac{dt}{dtau}right]dtau=\
=int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-dfrac{u^{2}}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-dfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
=int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau&&&&\
end{aligned}
]
end{document}


I have this output:



enter image description here



and I would like to have the following alignment as the image below:



enter image description here



In the last few days I have done several tests but I have not succeeded. For other formulas the alignment on the left is very good. With this formula I can't do it.



Lastly, how can I improve the shape of the integral of the second line where the two green rectangles are highlighted? The square brackets do not respect the length of the integral symbol.










share|improve this question























  • It is not eqnarray. Use a single & per line, before the first =.

    – egreg
    3 hours ago











  • @egreg Kindest Prof. I ask you a kindness; please can you give me a complete answer with the directions that I have given? I hope that the translation from Italian into English with DeepL is clear. Thank you in advance.

    – Sebastiano
    3 hours ago













  • Is it normal practice where you come from to have an = sign at the end of one line and the start of the next? because it definitely isn't here, you shouldn't have one at the end of the line

    – Au101
    3 hours ago
















1















With this code



documentclass[a4paper,12pt]{article}
usepackage{mathtools, mathrsfs}
makeatletter
letsave@mathaccentmathaccent
newcommand*if@single[3]{%
setbox0hbox{${mathaccent"0362{#1}}^H$}%
setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
ifdimht0=ht2 #3else #2fi
}
%The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
%Use a separate algorithm for single symbols:
newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
newcommand*wide@bar@[3]{%
begingroup
defmathaccent##1##2{%
%Enable nesting of accents:
letmathaccentsave@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
if#32 letmacc@nucleusfirst@char fi
%Determine the italic correction:
setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
dimen@wdtw@
advancedimen@-wdz@
%Now dimen@ is the italic correction of the symbol.
dividedimen@ 3
@tempdimawdtw@
advance@tempdima-scriptspace
%Now @tempdima is the width of the symbol.
divide@tempdima 10
advancedimen@-@tempdima
%Now dimen@ = (italic correction / 3) - (Breite / 10)
ifdimdimen@>z@ dimen@0ptfi
%The bar will be shortened in the case dimen@<0 !
rel@kern{0.6}kern-dimen@
if#31
overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
advancedimen@0.4dimexprmacc@kerna
%Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
letfinal@kern#2%
ifdimdimen@<z@ letfinal@kern1fi
iffinal@kern1 kern-dimen@fi
else
overline{rel@kern{-0.6}kerndimen@#1}%
fi
}%
macc@depth@ne
letmath@bgroup@empty letmath@egroupmacc@set@skewchar
mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
macc@set@skewcharrelax
letmathaccentVmacc@nested@a
%The following initialises macc@kerna and calls mathaccent:
if#31
macc@nested@arelax111{#1}%
else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
defgobble@till@marker##1endmarker{}%
futureletfirst@chargobble@till@marker#1endmarker
ifcatnoexpandfirst@char Aelse
deffirst@char{}%
fi
macc@nested@arelax111{first@char}%
fi
endgroup
}
makeatother
begin{document}
[begin{aligned}
mathscr F(bar{r}(t))&=& int_a^{b} L dt& =&int_a^{b} left[L frac{dt}{dtau}right]dtau=\
=int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-dfrac{u^{2}}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-dfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
=int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau&&&&\
end{aligned}
]
end{document}


I have this output:



enter image description here



and I would like to have the following alignment as the image below:



enter image description here



In the last few days I have done several tests but I have not succeeded. For other formulas the alignment on the left is very good. With this formula I can't do it.



Lastly, how can I improve the shape of the integral of the second line where the two green rectangles are highlighted? The square brackets do not respect the length of the integral symbol.










share|improve this question























  • It is not eqnarray. Use a single & per line, before the first =.

    – egreg
    3 hours ago











  • @egreg Kindest Prof. I ask you a kindness; please can you give me a complete answer with the directions that I have given? I hope that the translation from Italian into English with DeepL is clear. Thank you in advance.

    – Sebastiano
    3 hours ago













  • Is it normal practice where you come from to have an = sign at the end of one line and the start of the next? because it definitely isn't here, you shouldn't have one at the end of the line

    – Au101
    3 hours ago














1












1








1








With this code



documentclass[a4paper,12pt]{article}
usepackage{mathtools, mathrsfs}
makeatletter
letsave@mathaccentmathaccent
newcommand*if@single[3]{%
setbox0hbox{${mathaccent"0362{#1}}^H$}%
setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
ifdimht0=ht2 #3else #2fi
}
%The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
%Use a separate algorithm for single symbols:
newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
newcommand*wide@bar@[3]{%
begingroup
defmathaccent##1##2{%
%Enable nesting of accents:
letmathaccentsave@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
if#32 letmacc@nucleusfirst@char fi
%Determine the italic correction:
setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
dimen@wdtw@
advancedimen@-wdz@
%Now dimen@ is the italic correction of the symbol.
dividedimen@ 3
@tempdimawdtw@
advance@tempdima-scriptspace
%Now @tempdima is the width of the symbol.
divide@tempdima 10
advancedimen@-@tempdima
%Now dimen@ = (italic correction / 3) - (Breite / 10)
ifdimdimen@>z@ dimen@0ptfi
%The bar will be shortened in the case dimen@<0 !
rel@kern{0.6}kern-dimen@
if#31
overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
advancedimen@0.4dimexprmacc@kerna
%Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
letfinal@kern#2%
ifdimdimen@<z@ letfinal@kern1fi
iffinal@kern1 kern-dimen@fi
else
overline{rel@kern{-0.6}kerndimen@#1}%
fi
}%
macc@depth@ne
letmath@bgroup@empty letmath@egroupmacc@set@skewchar
mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
macc@set@skewcharrelax
letmathaccentVmacc@nested@a
%The following initialises macc@kerna and calls mathaccent:
if#31
macc@nested@arelax111{#1}%
else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
defgobble@till@marker##1endmarker{}%
futureletfirst@chargobble@till@marker#1endmarker
ifcatnoexpandfirst@char Aelse
deffirst@char{}%
fi
macc@nested@arelax111{first@char}%
fi
endgroup
}
makeatother
begin{document}
[begin{aligned}
mathscr F(bar{r}(t))&=& int_a^{b} L dt& =&int_a^{b} left[L frac{dt}{dtau}right]dtau=\
=int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-dfrac{u^{2}}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-dfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
=int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau&&&&\
end{aligned}
]
end{document}


I have this output:



enter image description here



and I would like to have the following alignment as the image below:



enter image description here



In the last few days I have done several tests but I have not succeeded. For other formulas the alignment on the left is very good. With this formula I can't do it.



Lastly, how can I improve the shape of the integral of the second line where the two green rectangles are highlighted? The square brackets do not respect the length of the integral symbol.










share|improve this question














With this code



documentclass[a4paper,12pt]{article}
usepackage{mathtools, mathrsfs}
makeatletter
letsave@mathaccentmathaccent
newcommand*if@single[3]{%
setbox0hbox{${mathaccent"0362{#1}}^H$}%
setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
ifdimht0=ht2 #3else #2fi
}
%The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
%Use a separate algorithm for single symbols:
newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
newcommand*wide@bar@[3]{%
begingroup
defmathaccent##1##2{%
%Enable nesting of accents:
letmathaccentsave@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
if#32 letmacc@nucleusfirst@char fi
%Determine the italic correction:
setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
dimen@wdtw@
advancedimen@-wdz@
%Now dimen@ is the italic correction of the symbol.
dividedimen@ 3
@tempdimawdtw@
advance@tempdima-scriptspace
%Now @tempdima is the width of the symbol.
divide@tempdima 10
advancedimen@-@tempdima
%Now dimen@ = (italic correction / 3) - (Breite / 10)
ifdimdimen@>z@ dimen@0ptfi
%The bar will be shortened in the case dimen@<0 !
rel@kern{0.6}kern-dimen@
if#31
overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
advancedimen@0.4dimexprmacc@kerna
%Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
letfinal@kern#2%
ifdimdimen@<z@ letfinal@kern1fi
iffinal@kern1 kern-dimen@fi
else
overline{rel@kern{-0.6}kerndimen@#1}%
fi
}%
macc@depth@ne
letmath@bgroup@empty letmath@egroupmacc@set@skewchar
mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
macc@set@skewcharrelax
letmathaccentVmacc@nested@a
%The following initialises macc@kerna and calls mathaccent:
if#31
macc@nested@arelax111{#1}%
else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
defgobble@till@marker##1endmarker{}%
futureletfirst@chargobble@till@marker#1endmarker
ifcatnoexpandfirst@char Aelse
deffirst@char{}%
fi
macc@nested@arelax111{first@char}%
fi
endgroup
}
makeatother
begin{document}
[begin{aligned}
mathscr F(bar{r}(t))&=& int_a^{b} L dt& =&int_a^{b} left[L frac{dt}{dtau}right]dtau=\
=int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-dfrac{u^{2}}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-dfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
=int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau&&&&\
end{aligned}
]
end{document}


I have this output:



enter image description here



and I would like to have the following alignment as the image below:



enter image description here



In the last few days I have done several tests but I have not succeeded. For other formulas the alignment on the left is very good. With this formula I can't do it.



Lastly, how can I improve the shape of the integral of the second line where the two green rectangles are highlighted? The square brackets do not respect the length of the integral symbol.







math-mode vertical-alignment align best-practices brackets






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 3 hours ago









SebastianoSebastiano

10.3k42060




10.3k42060













  • It is not eqnarray. Use a single & per line, before the first =.

    – egreg
    3 hours ago











  • @egreg Kindest Prof. I ask you a kindness; please can you give me a complete answer with the directions that I have given? I hope that the translation from Italian into English with DeepL is clear. Thank you in advance.

    – Sebastiano
    3 hours ago













  • Is it normal practice where you come from to have an = sign at the end of one line and the start of the next? because it definitely isn't here, you shouldn't have one at the end of the line

    – Au101
    3 hours ago



















  • It is not eqnarray. Use a single & per line, before the first =.

    – egreg
    3 hours ago











  • @egreg Kindest Prof. I ask you a kindness; please can you give me a complete answer with the directions that I have given? I hope that the translation from Italian into English with DeepL is clear. Thank you in advance.

    – Sebastiano
    3 hours ago













  • Is it normal practice where you come from to have an = sign at the end of one line and the start of the next? because it definitely isn't here, you shouldn't have one at the end of the line

    – Au101
    3 hours ago

















It is not eqnarray. Use a single & per line, before the first =.

– egreg
3 hours ago





It is not eqnarray. Use a single & per line, before the first =.

– egreg
3 hours ago













@egreg Kindest Prof. I ask you a kindness; please can you give me a complete answer with the directions that I have given? I hope that the translation from Italian into English with DeepL is clear. Thank you in advance.

– Sebastiano
3 hours ago







@egreg Kindest Prof. I ask you a kindness; please can you give me a complete answer with the directions that I have given? I hope that the translation from Italian into English with DeepL is clear. Thank you in advance.

– Sebastiano
3 hours ago















Is it normal practice where you come from to have an = sign at the end of one line and the start of the next? because it definitely isn't here, you shouldn't have one at the end of the line

– Au101
3 hours ago





Is it normal practice where you come from to have an = sign at the end of one line and the start of the next? because it definitely isn't here, you shouldn't have one at the end of the line

– Au101
3 hours ago










3 Answers
3






active

oldest

votes


















2














My mathematician's eyes bleed when I see something like



frac{<whatever}{sqrt{1-dfrac{u^2}{c^2}}


appearing more than once; I guess in your document it appears many times.



documentclass[a4paper,12pt]{article}
usepackage{mathtools, mathrsfs,bm}

makeatletter
%<...long code omitted for brevity...>
makeatother

begin{document}
[
begin{aligned}
mathscr F(bar{r}(t))
&= int_a^{b} L dt = int_a^{b} left[L frac{dt}{dtau}right],dtau=\
&=int_a^{b} [-mc^2-qvarphigamma(u)+qbar{u}cdot widebar{A}gamma(u)] ,dtau=\
&=int_a^{b} [-mc^2+q,bm{mathcal{U}}cdot bm{mathcal{A}}] ,dtau\
end{aligned}
]
where
[
gamma(u)=left(1-frac{u^2}{c^2}right)^{-1/2}
]
end{document}


There should be a single & per line.



I also fixed the usage of left and right and loaded bm that performs better than amsbsy and its boldsymbol command, replaced by bm (but boldsymbol works as well).



enter image description here






share|improve this answer































    1














    Here are some suggestions:



    enter image description here



    documentclass{article}

    usepackage{mathtools,mathrsfs,bm,bigints}

    begin{document}

    [
    begin{aligned}
    mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
    &= bigint_a^b left[ -m c^2 - q varphi dfrac{1}{sqrt{1 - dfrac{u^2}{c^2}}} +
    q frac{bar{u} cdot bar{A}}{sqrt{1 - dfrac{u^2}{c^2}}} right] ,mathrm{d}tau = \
    &= int_a^b bigl[ -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr] mathrm{d}tau
    end{aligned}
    ]

    begin{align*}
    mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
    &= int_a^b bigl( -m c^2 - q varphi / sqrt{1 - u^2 / c^2} +
    q (bar{u} cdot bar{A}) / sqrt{1 - u^2 / c^2} ,bigr) ,mathrm{d}tau = \
    &= int_a^b bigl( -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr) ,mathrm{d}tau
    end{align*}

    end{document}


    The first suggestion uses an extended integral from bigints, but it places far too big an emphasis visually. Hence the second suggestion, and to use a less-intrusive fraction of the form a / b.






    share|improve this answer
























    • No, please, no! ;-)

      – egreg
      3 hours ago



















    0














    First you had unnecessary ampersands, and others were missing.



    To have some equations left aligned, the simplest way is to use the fleqn environment from nccmath. Further, I improved the layout of the square roots, using the mfrac command (medium-sized fractions) instead of dfrac.



    documentclass[a4paper,12pt]{article}
    usepackage{mathtools, mathrsfs, nccmath}
    usepackage[showframe]{geometry}
    makeatletter
    letsave@mathaccentmathaccent
    newcommand*if@single[3]{%
    setbox0hbox{${mathaccent"0362{#1}}^H$}%
    setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
    ifdimht0=ht2 #3else #2fi
    }
    %The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
    newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
    %If there's a superscript following the bar, then no negative kern may follow the bar;
    %an additional {} makes sure that the superscript is high enough in this case:
    newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
    %Use a separate algorithm for single symbols:
    newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
    newcommand*wide@bar@[3]{%
    begingroup
    defmathaccent##1##2{%
    %Enable nesting of accents:
    letmathaccentsave@mathaccent
    %If there's more than a single symbol, use the first character instead (see below):
    if#32 letmacc@nucleusfirst@char fi
    %Determine the italic correction:
    setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
    setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
    dimen@wdtw@
    advancedimen@-wdz@
    %Now dimen@ is the italic correction of the symbol.
    dividedimen@ 3
    @tempdimawdtw@
    advance@tempdima-scriptspace
    %Now @tempdima is the width of the symbol.
    divide@tempdima 10
    advancedimen@-@tempdima
    %Now dimen@ = (italic correction / 3) - (Breite / 10)
    ifdimdimen@>z@ dimen@0ptfi
    %The bar will be shortened in the case dimen@<0 !
    rel@kern{0.6}kern-dimen@
    if#31
    overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
    advancedimen@0.4dimexprmacc@kerna
    %Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
    letfinal@kern#2%
    ifdimdimen@<z@ letfinal@kern1fi
    iffinal@kern1 kern-dimen@fi
    else
    overline{rel@kern{-0.6}kerndimen@#1}%
    fi
    }%
    macc@depth@ne
    letmath@bgroup@empty letmath@egroupmacc@set@skewchar
    mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
    macc@set@skewcharrelax
    letmathaccentVmacc@nested@a
    %The following initialises macc@kerna and calls mathaccent:
    if#31
    macc@nested@arelax111{#1}%
    else
    %If the argument consists of more than one symbol, and if the first token is
    %a letter, use that letter for the computations:
    defgobble@till@marker##1endmarker{}%
    futureletfirst@chargobble@till@marker#1endmarker
    ifcatnoexpandfirst@char Aelse
    deffirst@char{}%
    fi
    macc@nested@arelax111{first@char}%
    fi
    endgroup
    }
    makeatother

    begin{document}

    begin{fleqn}
    begin{align*}
    mathscr F(bar{r}(t))&= int_a^{b} L dt =int_a^{b} left[L frac{dt}{dtau}right]dtau=\
    & =int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-mfrac{u^{2}mathstrut}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-mfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
    & =int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau\
    end{align*}
    end{fleqn}

    end{document}


    enter image description here






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "85"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477369%2fa-universal-method-for-left-hand-alignment-of-a-sequence-of-equalities%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      My mathematician's eyes bleed when I see something like



      frac{<whatever}{sqrt{1-dfrac{u^2}{c^2}}


      appearing more than once; I guess in your document it appears many times.



      documentclass[a4paper,12pt]{article}
      usepackage{mathtools, mathrsfs,bm}

      makeatletter
      %<...long code omitted for brevity...>
      makeatother

      begin{document}
      [
      begin{aligned}
      mathscr F(bar{r}(t))
      &= int_a^{b} L dt = int_a^{b} left[L frac{dt}{dtau}right],dtau=\
      &=int_a^{b} [-mc^2-qvarphigamma(u)+qbar{u}cdot widebar{A}gamma(u)] ,dtau=\
      &=int_a^{b} [-mc^2+q,bm{mathcal{U}}cdot bm{mathcal{A}}] ,dtau\
      end{aligned}
      ]
      where
      [
      gamma(u)=left(1-frac{u^2}{c^2}right)^{-1/2}
      ]
      end{document}


      There should be a single & per line.



      I also fixed the usage of left and right and loaded bm that performs better than amsbsy and its boldsymbol command, replaced by bm (but boldsymbol works as well).



      enter image description here






      share|improve this answer




























        2














        My mathematician's eyes bleed when I see something like



        frac{<whatever}{sqrt{1-dfrac{u^2}{c^2}}


        appearing more than once; I guess in your document it appears many times.



        documentclass[a4paper,12pt]{article}
        usepackage{mathtools, mathrsfs,bm}

        makeatletter
        %<...long code omitted for brevity...>
        makeatother

        begin{document}
        [
        begin{aligned}
        mathscr F(bar{r}(t))
        &= int_a^{b} L dt = int_a^{b} left[L frac{dt}{dtau}right],dtau=\
        &=int_a^{b} [-mc^2-qvarphigamma(u)+qbar{u}cdot widebar{A}gamma(u)] ,dtau=\
        &=int_a^{b} [-mc^2+q,bm{mathcal{U}}cdot bm{mathcal{A}}] ,dtau\
        end{aligned}
        ]
        where
        [
        gamma(u)=left(1-frac{u^2}{c^2}right)^{-1/2}
        ]
        end{document}


        There should be a single & per line.



        I also fixed the usage of left and right and loaded bm that performs better than amsbsy and its boldsymbol command, replaced by bm (but boldsymbol works as well).



        enter image description here






        share|improve this answer


























          2












          2








          2







          My mathematician's eyes bleed when I see something like



          frac{<whatever}{sqrt{1-dfrac{u^2}{c^2}}


          appearing more than once; I guess in your document it appears many times.



          documentclass[a4paper,12pt]{article}
          usepackage{mathtools, mathrsfs,bm}

          makeatletter
          %<...long code omitted for brevity...>
          makeatother

          begin{document}
          [
          begin{aligned}
          mathscr F(bar{r}(t))
          &= int_a^{b} L dt = int_a^{b} left[L frac{dt}{dtau}right],dtau=\
          &=int_a^{b} [-mc^2-qvarphigamma(u)+qbar{u}cdot widebar{A}gamma(u)] ,dtau=\
          &=int_a^{b} [-mc^2+q,bm{mathcal{U}}cdot bm{mathcal{A}}] ,dtau\
          end{aligned}
          ]
          where
          [
          gamma(u)=left(1-frac{u^2}{c^2}right)^{-1/2}
          ]
          end{document}


          There should be a single & per line.



          I also fixed the usage of left and right and loaded bm that performs better than amsbsy and its boldsymbol command, replaced by bm (but boldsymbol works as well).



          enter image description here






          share|improve this answer













          My mathematician's eyes bleed when I see something like



          frac{<whatever}{sqrt{1-dfrac{u^2}{c^2}}


          appearing more than once; I guess in your document it appears many times.



          documentclass[a4paper,12pt]{article}
          usepackage{mathtools, mathrsfs,bm}

          makeatletter
          %<...long code omitted for brevity...>
          makeatother

          begin{document}
          [
          begin{aligned}
          mathscr F(bar{r}(t))
          &= int_a^{b} L dt = int_a^{b} left[L frac{dt}{dtau}right],dtau=\
          &=int_a^{b} [-mc^2-qvarphigamma(u)+qbar{u}cdot widebar{A}gamma(u)] ,dtau=\
          &=int_a^{b} [-mc^2+q,bm{mathcal{U}}cdot bm{mathcal{A}}] ,dtau\
          end{aligned}
          ]
          where
          [
          gamma(u)=left(1-frac{u^2}{c^2}right)^{-1/2}
          ]
          end{document}


          There should be a single & per line.



          I also fixed the usage of left and right and loaded bm that performs better than amsbsy and its boldsymbol command, replaced by bm (but boldsymbol works as well).



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 3 hours ago









          egregegreg

          723k8819173220




          723k8819173220























              1














              Here are some suggestions:



              enter image description here



              documentclass{article}

              usepackage{mathtools,mathrsfs,bm,bigints}

              begin{document}

              [
              begin{aligned}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= bigint_a^b left[ -m c^2 - q varphi dfrac{1}{sqrt{1 - dfrac{u^2}{c^2}}} +
              q frac{bar{u} cdot bar{A}}{sqrt{1 - dfrac{u^2}{c^2}}} right] ,mathrm{d}tau = \
              &= int_a^b bigl[ -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr] mathrm{d}tau
              end{aligned}
              ]

              begin{align*}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 - q varphi / sqrt{1 - u^2 / c^2} +
              q (bar{u} cdot bar{A}) / sqrt{1 - u^2 / c^2} ,bigr) ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr) ,mathrm{d}tau
              end{align*}

              end{document}


              The first suggestion uses an extended integral from bigints, but it places far too big an emphasis visually. Hence the second suggestion, and to use a less-intrusive fraction of the form a / b.






              share|improve this answer
























              • No, please, no! ;-)

                – egreg
                3 hours ago
















              1














              Here are some suggestions:



              enter image description here



              documentclass{article}

              usepackage{mathtools,mathrsfs,bm,bigints}

              begin{document}

              [
              begin{aligned}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= bigint_a^b left[ -m c^2 - q varphi dfrac{1}{sqrt{1 - dfrac{u^2}{c^2}}} +
              q frac{bar{u} cdot bar{A}}{sqrt{1 - dfrac{u^2}{c^2}}} right] ,mathrm{d}tau = \
              &= int_a^b bigl[ -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr] mathrm{d}tau
              end{aligned}
              ]

              begin{align*}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 - q varphi / sqrt{1 - u^2 / c^2} +
              q (bar{u} cdot bar{A}) / sqrt{1 - u^2 / c^2} ,bigr) ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr) ,mathrm{d}tau
              end{align*}

              end{document}


              The first suggestion uses an extended integral from bigints, but it places far too big an emphasis visually. Hence the second suggestion, and to use a less-intrusive fraction of the form a / b.






              share|improve this answer
























              • No, please, no! ;-)

                – egreg
                3 hours ago














              1












              1








              1







              Here are some suggestions:



              enter image description here



              documentclass{article}

              usepackage{mathtools,mathrsfs,bm,bigints}

              begin{document}

              [
              begin{aligned}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= bigint_a^b left[ -m c^2 - q varphi dfrac{1}{sqrt{1 - dfrac{u^2}{c^2}}} +
              q frac{bar{u} cdot bar{A}}{sqrt{1 - dfrac{u^2}{c^2}}} right] ,mathrm{d}tau = \
              &= int_a^b bigl[ -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr] mathrm{d}tau
              end{aligned}
              ]

              begin{align*}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 - q varphi / sqrt{1 - u^2 / c^2} +
              q (bar{u} cdot bar{A}) / sqrt{1 - u^2 / c^2} ,bigr) ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr) ,mathrm{d}tau
              end{align*}

              end{document}


              The first suggestion uses an extended integral from bigints, but it places far too big an emphasis visually. Hence the second suggestion, and to use a less-intrusive fraction of the form a / b.






              share|improve this answer













              Here are some suggestions:



              enter image description here



              documentclass{article}

              usepackage{mathtools,mathrsfs,bm,bigints}

              begin{document}

              [
              begin{aligned}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= bigint_a^b left[ -m c^2 - q varphi dfrac{1}{sqrt{1 - dfrac{u^2}{c^2}}} +
              q frac{bar{u} cdot bar{A}}{sqrt{1 - dfrac{u^2}{c^2}}} right] ,mathrm{d}tau = \
              &= int_a^b bigl[ -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr] mathrm{d}tau
              end{aligned}
              ]

              begin{align*}
              mathscr{F}(bar{r}(t)) &= int_a^b L ,mathrm{d}t = int_a^b left[L dfrac{mathrm{d}t}{mathrm{d}tau} right] ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 - q varphi / sqrt{1 - u^2 / c^2} +
              q (bar{u} cdot bar{A}) / sqrt{1 - u^2 / c^2} ,bigr) ,mathrm{d}tau = \
              &= int_a^b bigl( -m c^2 + q,bm{mathcal{U}} cdot bm{mathcal{A}} bigr) ,mathrm{d}tau
              end{align*}

              end{document}


              The first suggestion uses an extended integral from bigints, but it places far too big an emphasis visually. Hence the second suggestion, and to use a less-intrusive fraction of the form a / b.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 3 hours ago









              WernerWerner

              446k699831690




              446k699831690













              • No, please, no! ;-)

                – egreg
                3 hours ago



















              • No, please, no! ;-)

                – egreg
                3 hours ago

















              No, please, no! ;-)

              – egreg
              3 hours ago





              No, please, no! ;-)

              – egreg
              3 hours ago











              0














              First you had unnecessary ampersands, and others were missing.



              To have some equations left aligned, the simplest way is to use the fleqn environment from nccmath. Further, I improved the layout of the square roots, using the mfrac command (medium-sized fractions) instead of dfrac.



              documentclass[a4paper,12pt]{article}
              usepackage{mathtools, mathrsfs, nccmath}
              usepackage[showframe]{geometry}
              makeatletter
              letsave@mathaccentmathaccent
              newcommand*if@single[3]{%
              setbox0hbox{${mathaccent"0362{#1}}^H$}%
              setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
              ifdimht0=ht2 #3else #2fi
              }
              %The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
              newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
              %If there's a superscript following the bar, then no negative kern may follow the bar;
              %an additional {} makes sure that the superscript is high enough in this case:
              newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
              %Use a separate algorithm for single symbols:
              newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
              newcommand*wide@bar@[3]{%
              begingroup
              defmathaccent##1##2{%
              %Enable nesting of accents:
              letmathaccentsave@mathaccent
              %If there's more than a single symbol, use the first character instead (see below):
              if#32 letmacc@nucleusfirst@char fi
              %Determine the italic correction:
              setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
              setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
              dimen@wdtw@
              advancedimen@-wdz@
              %Now dimen@ is the italic correction of the symbol.
              dividedimen@ 3
              @tempdimawdtw@
              advance@tempdima-scriptspace
              %Now @tempdima is the width of the symbol.
              divide@tempdima 10
              advancedimen@-@tempdima
              %Now dimen@ = (italic correction / 3) - (Breite / 10)
              ifdimdimen@>z@ dimen@0ptfi
              %The bar will be shortened in the case dimen@<0 !
              rel@kern{0.6}kern-dimen@
              if#31
              overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
              advancedimen@0.4dimexprmacc@kerna
              %Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
              letfinal@kern#2%
              ifdimdimen@<z@ letfinal@kern1fi
              iffinal@kern1 kern-dimen@fi
              else
              overline{rel@kern{-0.6}kerndimen@#1}%
              fi
              }%
              macc@depth@ne
              letmath@bgroup@empty letmath@egroupmacc@set@skewchar
              mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
              macc@set@skewcharrelax
              letmathaccentVmacc@nested@a
              %The following initialises macc@kerna and calls mathaccent:
              if#31
              macc@nested@arelax111{#1}%
              else
              %If the argument consists of more than one symbol, and if the first token is
              %a letter, use that letter for the computations:
              defgobble@till@marker##1endmarker{}%
              futureletfirst@chargobble@till@marker#1endmarker
              ifcatnoexpandfirst@char Aelse
              deffirst@char{}%
              fi
              macc@nested@arelax111{first@char}%
              fi
              endgroup
              }
              makeatother

              begin{document}

              begin{fleqn}
              begin{align*}
              mathscr F(bar{r}(t))&= int_a^{b} L dt =int_a^{b} left[L frac{dt}{dtau}right]dtau=\
              & =int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-mfrac{u^{2}mathstrut}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-mfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
              & =int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau\
              end{align*}
              end{fleqn}

              end{document}


              enter image description here






              share|improve this answer




























                0














                First you had unnecessary ampersands, and others were missing.



                To have some equations left aligned, the simplest way is to use the fleqn environment from nccmath. Further, I improved the layout of the square roots, using the mfrac command (medium-sized fractions) instead of dfrac.



                documentclass[a4paper,12pt]{article}
                usepackage{mathtools, mathrsfs, nccmath}
                usepackage[showframe]{geometry}
                makeatletter
                letsave@mathaccentmathaccent
                newcommand*if@single[3]{%
                setbox0hbox{${mathaccent"0362{#1}}^H$}%
                setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
                ifdimht0=ht2 #3else #2fi
                }
                %The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
                newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                %If there's a superscript following the bar, then no negative kern may follow the bar;
                %an additional {} makes sure that the superscript is high enough in this case:
                newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
                %Use a separate algorithm for single symbols:
                newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
                newcommand*wide@bar@[3]{%
                begingroup
                defmathaccent##1##2{%
                %Enable nesting of accents:
                letmathaccentsave@mathaccent
                %If there's more than a single symbol, use the first character instead (see below):
                if#32 letmacc@nucleusfirst@char fi
                %Determine the italic correction:
                setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
                setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
                dimen@wdtw@
                advancedimen@-wdz@
                %Now dimen@ is the italic correction of the symbol.
                dividedimen@ 3
                @tempdimawdtw@
                advance@tempdima-scriptspace
                %Now @tempdima is the width of the symbol.
                divide@tempdima 10
                advancedimen@-@tempdima
                %Now dimen@ = (italic correction / 3) - (Breite / 10)
                ifdimdimen@>z@ dimen@0ptfi
                %The bar will be shortened in the case dimen@<0 !
                rel@kern{0.6}kern-dimen@
                if#31
                overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
                advancedimen@0.4dimexprmacc@kerna
                %Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
                letfinal@kern#2%
                ifdimdimen@<z@ letfinal@kern1fi
                iffinal@kern1 kern-dimen@fi
                else
                overline{rel@kern{-0.6}kerndimen@#1}%
                fi
                }%
                macc@depth@ne
                letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                macc@set@skewcharrelax
                letmathaccentVmacc@nested@a
                %The following initialises macc@kerna and calls mathaccent:
                if#31
                macc@nested@arelax111{#1}%
                else
                %If the argument consists of more than one symbol, and if the first token is
                %a letter, use that letter for the computations:
                defgobble@till@marker##1endmarker{}%
                futureletfirst@chargobble@till@marker#1endmarker
                ifcatnoexpandfirst@char Aelse
                deffirst@char{}%
                fi
                macc@nested@arelax111{first@char}%
                fi
                endgroup
                }
                makeatother

                begin{document}

                begin{fleqn}
                begin{align*}
                mathscr F(bar{r}(t))&= int_a^{b} L dt =int_a^{b} left[L frac{dt}{dtau}right]dtau=\
                & =int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-mfrac{u^{2}mathstrut}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-mfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
                & =int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau\
                end{align*}
                end{fleqn}

                end{document}


                enter image description here






                share|improve this answer


























                  0












                  0








                  0







                  First you had unnecessary ampersands, and others were missing.



                  To have some equations left aligned, the simplest way is to use the fleqn environment from nccmath. Further, I improved the layout of the square roots, using the mfrac command (medium-sized fractions) instead of dfrac.



                  documentclass[a4paper,12pt]{article}
                  usepackage{mathtools, mathrsfs, nccmath}
                  usepackage[showframe]{geometry}
                  makeatletter
                  letsave@mathaccentmathaccent
                  newcommand*if@single[3]{%
                  setbox0hbox{${mathaccent"0362{#1}}^H$}%
                  setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
                  ifdimht0=ht2 #3else #2fi
                  }
                  %The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
                  newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                  %If there's a superscript following the bar, then no negative kern may follow the bar;
                  %an additional {} makes sure that the superscript is high enough in this case:
                  newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
                  %Use a separate algorithm for single symbols:
                  newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
                  newcommand*wide@bar@[3]{%
                  begingroup
                  defmathaccent##1##2{%
                  %Enable nesting of accents:
                  letmathaccentsave@mathaccent
                  %If there's more than a single symbol, use the first character instead (see below):
                  if#32 letmacc@nucleusfirst@char fi
                  %Determine the italic correction:
                  setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
                  setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
                  dimen@wdtw@
                  advancedimen@-wdz@
                  %Now dimen@ is the italic correction of the symbol.
                  dividedimen@ 3
                  @tempdimawdtw@
                  advance@tempdima-scriptspace
                  %Now @tempdima is the width of the symbol.
                  divide@tempdima 10
                  advancedimen@-@tempdima
                  %Now dimen@ = (italic correction / 3) - (Breite / 10)
                  ifdimdimen@>z@ dimen@0ptfi
                  %The bar will be shortened in the case dimen@<0 !
                  rel@kern{0.6}kern-dimen@
                  if#31
                  overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
                  advancedimen@0.4dimexprmacc@kerna
                  %Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
                  letfinal@kern#2%
                  ifdimdimen@<z@ letfinal@kern1fi
                  iffinal@kern1 kern-dimen@fi
                  else
                  overline{rel@kern{-0.6}kerndimen@#1}%
                  fi
                  }%
                  macc@depth@ne
                  letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                  mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                  macc@set@skewcharrelax
                  letmathaccentVmacc@nested@a
                  %The following initialises macc@kerna and calls mathaccent:
                  if#31
                  macc@nested@arelax111{#1}%
                  else
                  %If the argument consists of more than one symbol, and if the first token is
                  %a letter, use that letter for the computations:
                  defgobble@till@marker##1endmarker{}%
                  futureletfirst@chargobble@till@marker#1endmarker
                  ifcatnoexpandfirst@char Aelse
                  deffirst@char{}%
                  fi
                  macc@nested@arelax111{first@char}%
                  fi
                  endgroup
                  }
                  makeatother

                  begin{document}

                  begin{fleqn}
                  begin{align*}
                  mathscr F(bar{r}(t))&= int_a^{b} L dt =int_a^{b} left[L frac{dt}{dtau}right]dtau=\
                  & =int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-mfrac{u^{2}mathstrut}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-mfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
                  & =int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau\
                  end{align*}
                  end{fleqn}

                  end{document}


                  enter image description here






                  share|improve this answer













                  First you had unnecessary ampersands, and others were missing.



                  To have some equations left aligned, the simplest way is to use the fleqn environment from nccmath. Further, I improved the layout of the square roots, using the mfrac command (medium-sized fractions) instead of dfrac.



                  documentclass[a4paper,12pt]{article}
                  usepackage{mathtools, mathrsfs, nccmath}
                  usepackage[showframe]{geometry}
                  makeatletter
                  letsave@mathaccentmathaccent
                  newcommand*if@single[3]{%
                  setbox0hbox{${mathaccent"0362{#1}}^H$}%
                  setbox2hbox{${mathaccent"0362{kern0pt#1}}^H$}%
                  ifdimht0=ht2 #3else #2fi
                  }
                  %The bar will be moved to the right by a half of macc@kerna, which is computed by amsmath:
                  newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                  %If there's a superscript following the bar, then no negative kern may follow the bar;
                  %an additional {} makes sure that the superscript is high enough in this case:
                  newcommand*widebar[1]{@ifnextchar^{{wide@bar{#1}{0}}}{wide@bar{#1}{1}}}
                  %Use a separate algorithm for single symbols:
                  newcommand*wide@bar[2]{if@single{#1}{wide@bar@{#1}{#2}{1}}{wide@bar@{#1}{#2}{2}}}
                  newcommand*wide@bar@[3]{%
                  begingroup
                  defmathaccent##1##2{%
                  %Enable nesting of accents:
                  letmathaccentsave@mathaccent
                  %If there's more than a single symbol, use the first character instead (see below):
                  if#32 letmacc@nucleusfirst@char fi
                  %Determine the italic correction:
                  setboxz@hbox{$macc@style{macc@nucleus}_{}$}%
                  setboxtw@hbox{$macc@style{macc@nucleus}{}_{}$}%
                  dimen@wdtw@
                  advancedimen@-wdz@
                  %Now dimen@ is the italic correction of the symbol.
                  dividedimen@ 3
                  @tempdimawdtw@
                  advance@tempdima-scriptspace
                  %Now @tempdima is the width of the symbol.
                  divide@tempdima 10
                  advancedimen@-@tempdima
                  %Now dimen@ = (italic correction / 3) - (Breite / 10)
                  ifdimdimen@>z@ dimen@0ptfi
                  %The bar will be shortened in the case dimen@<0 !
                  rel@kern{0.6}kern-dimen@
                  if#31
                  overline{rel@kern{-0.6}kerndimen@macc@nucleusrel@kern{0.4}kerndimen@}%
                  advancedimen@0.4dimexprmacc@kerna
                  %Place the combined final kern (-dimen@) if it is >0 or if a superscript follows:
                  letfinal@kern#2%
                  ifdimdimen@<z@ letfinal@kern1fi
                  iffinal@kern1 kern-dimen@fi
                  else
                  overline{rel@kern{-0.6}kerndimen@#1}%
                  fi
                  }%
                  macc@depth@ne
                  letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                  mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                  macc@set@skewcharrelax
                  letmathaccentVmacc@nested@a
                  %The following initialises macc@kerna and calls mathaccent:
                  if#31
                  macc@nested@arelax111{#1}%
                  else
                  %If the argument consists of more than one symbol, and if the first token is
                  %a letter, use that letter for the computations:
                  defgobble@till@marker##1endmarker{}%
                  futureletfirst@chargobble@till@marker#1endmarker
                  ifcatnoexpandfirst@char Aelse
                  deffirst@char{}%
                  fi
                  macc@nested@arelax111{first@char}%
                  fi
                  endgroup
                  }
                  makeatother

                  begin{document}

                  begin{fleqn}
                  begin{align*}
                  mathscr F(bar{r}(t))&= int_a^{b} L dt =int_a^{b} left[L frac{dt}{dtau}right]dtau=\
                  & =int_a^{b} Bigl[-mc^2-qvarphidfrac{1}{sqrt{1-mfrac{u^{2}mathstrut}{c^{2}}}}+qfrac{bar{u}cdot widebar{A}}{sqrt{1-mfrac{u^{2}}{c^{2}}}}Bigr] dtau=& &&&\
                  & =int_a^{b} left[-mc^2+q,boldsymbol{mathcal{U}}cdot boldsymbol{mathcal{A}}right] dtau\
                  end{align*}
                  end{fleqn}

                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 3 hours ago









                  BernardBernard

                  171k775203




                  171k775203






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477369%2fa-universal-method-for-left-hand-alignment-of-a-sequence-of-equalities%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      404 Error Contact Form 7 ajax form submitting

                      How to know if a Active Directory user can login interactively

                      Refactoring coordinates for Minecraft Pi buildings written in Python