Multiple alignment in math mode without much space
Clash Royale CLAN TAG#URR8PPP
up vote
7
down vote
favorite
There are several post on multiple alignments, but I cant find a solution regarding my problem.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument
I am using the following code and I want to multiple align the staments that are following after the comma and quad
. I tried to multilpe align them with &&
but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.
math-mode equations align
add a comment |Â
up vote
7
down vote
favorite
There are several post on multiple alignments, but I cant find a solution regarding my problem.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument
I am using the following code and I want to multiple align the staments that are following after the comma and quad
. I tried to multilpe align them with &&
but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.
math-mode equations align
2
If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow
) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
â moewe
Aug 15 at 11:17
1
That said, maybealignat
is for you:beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
â moewe
Aug 15 at 11:18
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
There are several post on multiple alignments, but I cant find a solution regarding my problem.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument
I am using the following code and I want to multiple align the staments that are following after the comma and quad
. I tried to multilpe align them with &&
but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.
math-mode equations align
There are several post on multiple alignments, but I cant find a solution regarding my problem.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginflalign*
Xty-XtXbetahat &= lambda s\
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, quad quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, quad forall j in 1,...,p
endflalign*
enddocument
I am using the following code and I want to multiple align the staments that are following after the comma and quad
. I tried to multilpe align them with &&
but the space between the equations and the other arguments will be far too large. I roughly want the same space as produced by quad but with an alignment of the arguments.
math-mode equations align
math-mode equations align
asked Aug 15 at 11:10
rook1996
994
994
2
If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow
) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
â moewe
Aug 15 at 11:17
1
That said, maybealignat
is for you:beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
â moewe
Aug 15 at 11:18
add a comment |Â
2
If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (Leftrightarrow
) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.
â moewe
Aug 15 at 11:17
1
That said, maybealignat
is for you:beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
â moewe
Aug 15 at 11:18
2
2
If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (
Leftrightarrow
) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.â moewe
Aug 15 at 11:17
If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (
Leftrightarrow
) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.â moewe
Aug 15 at 11:17
1
1
That said, maybe
alignat
is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
â moewe
Aug 15 at 11:18
That said, maybe
alignat
is for you: beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
â moewe
Aug 15 at 11:18
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
10
down vote
accepted
For multiple alignment points you can use alignat
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat & = lambda s\
Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
1
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
add a comment |Â
up vote
7
down vote
The flalign
environmentâÂÂs name means full length align, which means that the whole line width will be used when there is more than one alignment point.
In order to control the alignment you can use alignat
or just align
if you don't want to bother.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
%usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
sectiontextttalignat
beginalignat*2
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&quad& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&quad& forall j in 1,dots,p
endalignat*
sectiontextttalign
beginalign*
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&& forall j in 1,dots,p
endalign*
enddocument
A few points to note.
latin1
is not âÂÂfor WindowsâÂÂ. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.- The options
bibtotocnumbered
andliststotoc
are deprecated. underbrace<code>_<code>
should be braced in order to keep the correct spacing, sounderbrace<code>_<code>
.- Never use
...
in the input, butdots
or, if needed, one amongdotsc
,dotsb
ordotsm
(see Difference of the dots*).
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
1
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with thefleqn
option.
â egreg
Aug 21 at 18:59
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
1
@rook1996 Sorry, the correct command isfleqn[0pt]
â egreg
Aug 22 at 14:43
 |Â
show 4 more comments
up vote
6
down vote
You need alignat*
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat &= lambda s && \
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
endalignat*
enddocument
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
add a comment |Â
up vote
4
down vote
Some layout improvements (at least for my taste): I used underbracket
from mathtools
in preference to underbrace
which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines
(from mathtools again) â this adds another column in alignat
. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm
.
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[utf8]inputenc %% für Windows
usepackage[ngerman]babel
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathrmT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathrmT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*3
& & Xty-XtXbetahat & = lambda s\
ArrowBetweenLines
& & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
& & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
ArrowBetweenLines
& & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
For multiple alignment points you can use alignat
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat & = lambda s\
Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
1
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
add a comment |Â
up vote
10
down vote
accepted
For multiple alignment points you can use alignat
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat & = lambda s\
Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
1
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
add a comment |Â
up vote
10
down vote
accepted
up vote
10
down vote
accepted
For multiple alignment points you can use alignat
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat & = lambda s\
Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
For multiple alignment points you can use alignat
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat & = lambda s\
Leftrightarrow underbraceXt y_p times 1 & = underbracevphantom Xt y lambda s_p times 1, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
answered Aug 15 at 11:17
Phelype Oleinik
16.7k33668
16.7k33668
1
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
add a comment |Â
1
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
1
1
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
Ummm, you were 30 sec faster ...
â AboAmmar
Aug 15 at 11:21
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
@AboAmmar It happens ;)
â Phelype Oleinik
Aug 15 at 11:25
add a comment |Â
up vote
7
down vote
The flalign
environmentâÂÂs name means full length align, which means that the whole line width will be used when there is more than one alignment point.
In order to control the alignment you can use alignat
or just align
if you don't want to bother.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
%usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
sectiontextttalignat
beginalignat*2
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&quad& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&quad& forall j in 1,dots,p
endalignat*
sectiontextttalign
beginalign*
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&& forall j in 1,dots,p
endalign*
enddocument
A few points to note.
latin1
is not âÂÂfor WindowsâÂÂ. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.- The options
bibtotocnumbered
andliststotoc
are deprecated. underbrace<code>_<code>
should be braced in order to keep the correct spacing, sounderbrace<code>_<code>
.- Never use
...
in the input, butdots
or, if needed, one amongdotsc
,dotsb
ordotsm
(see Difference of the dots*).
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
1
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with thefleqn
option.
â egreg
Aug 21 at 18:59
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
1
@rook1996 Sorry, the correct command isfleqn[0pt]
â egreg
Aug 22 at 14:43
 |Â
show 4 more comments
up vote
7
down vote
The flalign
environmentâÂÂs name means full length align, which means that the whole line width will be used when there is more than one alignment point.
In order to control the alignment you can use alignat
or just align
if you don't want to bother.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
%usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
sectiontextttalignat
beginalignat*2
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&quad& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&quad& forall j in 1,dots,p
endalignat*
sectiontextttalign
beginalign*
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&& forall j in 1,dots,p
endalign*
enddocument
A few points to note.
latin1
is not âÂÂfor WindowsâÂÂ. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.- The options
bibtotocnumbered
andliststotoc
are deprecated. underbrace<code>_<code>
should be braced in order to keep the correct spacing, sounderbrace<code>_<code>
.- Never use
...
in the input, butdots
or, if needed, one amongdotsc
,dotsb
ordotsm
(see Difference of the dots*).
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
1
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with thefleqn
option.
â egreg
Aug 21 at 18:59
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
1
@rook1996 Sorry, the correct command isfleqn[0pt]
â egreg
Aug 22 at 14:43
 |Â
show 4 more comments
up vote
7
down vote
up vote
7
down vote
The flalign
environmentâÂÂs name means full length align, which means that the whole line width will be used when there is more than one alignment point.
In order to control the alignment you can use alignat
or just align
if you don't want to bother.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
%usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
sectiontextttalignat
beginalignat*2
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&quad& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&quad& forall j in 1,dots,p
endalignat*
sectiontextttalign
beginalign*
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&& forall j in 1,dots,p
endalign*
enddocument
A few points to note.
latin1
is not âÂÂfor WindowsâÂÂ. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.- The options
bibtotocnumbered
andliststotoc
are deprecated. underbrace<code>_<code>
should be braced in order to keep the correct spacing, sounderbrace<code>_<code>
.- Never use
...
in the input, butdots
or, if needed, one amongdotsc
,dotsb
ordotsm
(see Difference of the dots*).
The flalign
environmentâÂÂs name means full length align, which means that the whole line width will be used when there is more than one alignment point.
In order to control the alignment you can use alignat
or just align
if you don't want to bother.
%%%%% Dokumentenklasse mit verschiedenen Attributen
documentclass[a4paper, abstracton,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
%usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
sectiontextttalignat
beginalignat*2
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&quad& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&quad& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&quad& forall j in 1,dots,p
endalignat*
sectiontextttalign
beginalign*
Xty-XtXbetahat
&= lambda s\
Leftrightarrow underbraceXt y_p times 1
&= underbracevphantom Xt y lambda s_p times 1,
&& s in [-1,1]^p \
intertextDas $j$-te Element entspricht
xt_jy
&= lambda s_j,
&& s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy|
&leq lambda,
&& forall j in 1,dots,p
endalign*
enddocument
A few points to note.
latin1
is not âÂÂfor WindowsâÂÂ. Use it if the file is encoded in Latin-1, but you should switch to UTF-8 as soon as possible.- The options
bibtotocnumbered
andliststotoc
are deprecated. underbrace<code>_<code>
should be braced in order to keep the correct spacing, sounderbrace<code>_<code>
.- Never use
...
in the input, butdots
or, if needed, one amongdotsc
,dotsb
ordotsm
(see Difference of the dots*).
answered Aug 15 at 11:30
egreg
683k8418193064
683k8418193064
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
1
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with thefleqn
option.
â egreg
Aug 21 at 18:59
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
1
@rook1996 Sorry, the correct command isfleqn[0pt]
â egreg
Aug 22 at 14:43
 |Â
show 4 more comments
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
1
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with thefleqn
option.
â egreg
Aug 21 at 18:59
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
1
@rook1996 Sorry, the correct command isfleqn[0pt]
â egreg
Aug 22 at 14:43
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
Based on your post here tex.stackexchange.com/questions/446939/â¦, how can I left aligned all the first equation inside alignat
â rook1996
Aug 21 at 12:52
1
1
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 IâÂÂll check later
â egreg
Aug 21 at 13:20
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the
fleqn
option.â egreg
Aug 21 at 18:59
@rook1996 I'm not sure about left alignment: this should be a global decision, which can be obtained with the
fleqn
option.â egreg
Aug 21 at 18:59
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
just need it for the Appendix part and not global
â rook1996
Aug 21 at 19:00
1
1
@rook1996 Sorry, the correct command is
fleqn[0pt]
â egreg
Aug 22 at 14:43
@rook1996 Sorry, the correct command is
fleqn[0pt]
â egreg
Aug 22 at 14:43
 |Â
show 4 more comments
up vote
6
down vote
You need alignat*
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat &= lambda s && \
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
endalignat*
enddocument
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
add a comment |Â
up vote
6
down vote
You need alignat*
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat &= lambda s && \
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
endalignat*
enddocument
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
add a comment |Â
up vote
6
down vote
up vote
6
down vote
You need alignat*
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat &= lambda s && \
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
endalignat*
enddocument
You need alignat*
:
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[latin1]inputenc %% für Windows
usepackage[ngerman]babel
usepackageamsthm
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathbfT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathbfT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*2
Xty-XtXbetahat &= lambda s && \
Leftrightarrow underbraceXt y_p times 1 &= underbracevphantomXtylambda s_ptimes1, &&quad s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p
endalignat*
enddocument
edited Aug 15 at 11:28
answered Aug 15 at 11:18
AboAmmar
30.5k22780
30.5k22780
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
add a comment |Â
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
I'll give you +1 for the slowness :-) of 30 sec.
â Sebastiano
Aug 15 at 11:28
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
Haha.. thanks, this time you won by a nose. Best thing actually about tex.sx is how people are helpful and responsive.
â AboAmmar
Aug 15 at 11:42
add a comment |Â
up vote
4
down vote
Some layout improvements (at least for my taste): I used underbracket
from mathtools
in preference to underbrace
which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines
(from mathtools again) â this adds another column in alignat
. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm
.
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[utf8]inputenc %% für Windows
usepackage[ngerman]babel
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathrmT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathrmT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*3
& & Xty-XtXbetahat & = lambda s\
ArrowBetweenLines
& & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
& & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
ArrowBetweenLines
& & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
add a comment |Â
up vote
4
down vote
Some layout improvements (at least for my taste): I used underbracket
from mathtools
in preference to underbrace
which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines
(from mathtools again) â this adds another column in alignat
. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm
.
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[utf8]inputenc %% für Windows
usepackage[ngerman]babel
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathrmT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathrmT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*3
& & Xty-XtXbetahat & = lambda s\
ArrowBetweenLines
& & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
& & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
ArrowBetweenLines
& & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Some layout improvements (at least for my taste): I used underbracket
from mathtools
in preference to underbrace
which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines
(from mathtools again) â this adds another column in alignat
. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm
.
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[utf8]inputenc %% für Windows
usepackage[ngerman]babel
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathrmT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathrmT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*3
& & Xty-XtXbetahat & = lambda s\
ArrowBetweenLines
& & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
& & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
ArrowBetweenLines
& & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
Some layout improvements (at least for my taste): I used underbracket
from mathtools
in preference to underbrace
which doesn't look so nice for small formulæ. Also, I used ArrowBetweenLines
(from mathtools again) â this adds another column in alignat
. Last, I don't see why the transposed symbol should be in boldface, so I used mathrm
.
documentclass[a4paper, abstracton, bibtotocnumbered,liststotoc,12pt]scrartcl
%%%%% Betriebssystemabhängige Eingabedekodierung
usepackage[T1]fontenc
usepackage[utf8]inputenc %% für Windows
usepackage[ngerman]babel
usepackagemathtools
newcommandmatr[1]mathbf#1
newcommandXmatrX %Matrix von X
newcommandymatry %y als voller Vektor
newcommandXtX^mathrmT %Matrix von X
newcommandxmatrx%Regressor von X
newcommandxtx^mathrmT%Regressor von X
newcommandbetahathatbeta %betahat
begindocument
beginalignat*3
& & Xty-XtXbetahat & = lambda s\
ArrowBetweenLines
& & underbracket[0.4pt]Xt y_p times 1 & = mkern-2muunderbracket[0.4pt]mkern2mu vphantomylambda smkern1mu_p times 1mkern-1mu, & quad & s in [-1,1]^p \
intertexttextnormalDas $j$-te Element entspricht
& & xt_jy &= lambda s_j, & quad & s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \
ArrowBetweenLines
& & |xt_jy| &leq lambda, & quad & forall j in 1,dots,p
endalignat*
enddocument
answered Aug 15 at 11:59
Bernard
156k763189
156k763189
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446117%2fmultiple-alignment-in-math-mode-without-much-space%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
If you look at published mathematical literature (books and papers) you will find that almost no one uses equivalence arrows (
Leftrightarrow
) at the beginning of each line. Whether that is because people think it is a bad idea in general or whether they just can't get it done sensibly in LaTeX is probably open for interpretation.â moewe
Aug 15 at 11:17
1
That said, maybe
alignat
is for you:beginalignat*2 Xty-XtXbetahat &= lambda s\ Leftrightarrow underbraceXt y_p times 1 &= underbracevphantom Xt y lambda s_p times 1, &&quad s in [-1,1]^p \ intertexttextnormalDas $j$-te Element entspricht xt_jy &= lambda s_j, &&quad s_j in [-1,1] Leftrightarrow lambda s_j in [-lambda, lambda] \ Leftrightarrow |xt_jy| &leq lambda, &&quad forall j in 1,...,p endalignat*
â moewe
Aug 15 at 11:18