Left aligned equations
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
In my document, I have a block of 3 equations that need to be aligned on the =
sign. This is the code:
documentclass[a4paper, 11pt]book
usepackageamsmath
begindocument
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&=y \
&textx3 &&=y^2+x2
endalignat
enddocument
However, I'd also like this block of equations to be left-aligned. Instead, with that code, it is centered on the page.
In a related post, someone suggested to use fleqn
as a document class. Nevertheless, I cannot use that, because some of the equations in my document have to be centered, not all of them have to be left-aligned.
alignat alignment
add a comment |Â
up vote
3
down vote
favorite
In my document, I have a block of 3 equations that need to be aligned on the =
sign. This is the code:
documentclass[a4paper, 11pt]book
usepackageamsmath
begindocument
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&=y \
&textx3 &&=y^2+x2
endalignat
enddocument
However, I'd also like this block of equations to be left-aligned. Instead, with that code, it is centered on the page.
In a related post, someone suggested to use fleqn
as a document class. Nevertheless, I cannot use that, because some of the equations in my document have to be centered, not all of them have to be left-aligned.
alignat alignment
You want just these three to be aligned on the left margin, but still numbered at the right margin?
â Steven B. Segletes
3 hours ago
Yes, exactly. All equations in my document are numbered at the right margin, but I do not want all of them to be aligned at the left margin
â Mary
3 hours ago
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
In my document, I have a block of 3 equations that need to be aligned on the =
sign. This is the code:
documentclass[a4paper, 11pt]book
usepackageamsmath
begindocument
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&=y \
&textx3 &&=y^2+x2
endalignat
enddocument
However, I'd also like this block of equations to be left-aligned. Instead, with that code, it is centered on the page.
In a related post, someone suggested to use fleqn
as a document class. Nevertheless, I cannot use that, because some of the equations in my document have to be centered, not all of them have to be left-aligned.
alignat alignment
In my document, I have a block of 3 equations that need to be aligned on the =
sign. This is the code:
documentclass[a4paper, 11pt]book
usepackageamsmath
begindocument
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&=y \
&textx3 &&=y^2+x2
endalignat
enddocument
However, I'd also like this block of equations to be left-aligned. Instead, with that code, it is centered on the page.
In a related post, someone suggested to use fleqn
as a document class. Nevertheless, I cannot use that, because some of the equations in my document have to be centered, not all of them have to be left-aligned.
alignat alignment
alignat alignment
asked 3 hours ago
Mary
604
604
You want just these three to be aligned on the left margin, but still numbered at the right margin?
â Steven B. Segletes
3 hours ago
Yes, exactly. All equations in my document are numbered at the right margin, but I do not want all of them to be aligned at the left margin
â Mary
3 hours ago
add a comment |Â
You want just these three to be aligned on the left margin, but still numbered at the right margin?
â Steven B. Segletes
3 hours ago
Yes, exactly. All equations in my document are numbered at the right margin, but I do not want all of them to be aligned at the left margin
â Mary
3 hours ago
You want just these three to be aligned on the left margin, but still numbered at the right margin?
â Steven B. Segletes
3 hours ago
You want just these three to be aligned on the left margin, but still numbered at the right margin?
â Steven B. Segletes
3 hours ago
Yes, exactly. All equations in my document are numbered at the right margin, but I do not want all of them to be aligned at the left margin
â Mary
3 hours ago
Yes, exactly. All equations in my document are numbered at the right margin, but I do not want all of them to be aligned at the left margin
â Mary
3 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
it is not very clear to me what you like to obtain, so below are two options which cross my mind:
- in the first is used
flalign
math environment from theamsmath
package - in second the
gather
environment (also fromamsmat
) is enclosed infleqn
environment proviedad by he packagenccmath
(red lines indicate text borders)
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginflalign
textxxxxxxx1 &= 1/y &\
textx2 &= y &\
textx3 &= y^2+x2 &
endflalign
or
beginfleqn
begingather
textxxxxxxx1 = 1/y \
textx2 = y \
textx3 = y^2+x2
endgather
endfleqn
enddocument
edit:
from your comments follows that you like to have something like this:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginfleqn
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&= y \
&textx3 &&= y^2+x2
endalignat
endfleqn
enddocument
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
this means, that you like to big space between left side of equations and=
sign?
â Zarko
2 hours ago
Exactly. I cannot manage to do that withalignat
, nor withflalign
â Mary
2 hours ago
I took the liberty of simplifying the last code also to get the spacing right.;-)
â egreg
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
add a comment |Â
up vote
1
down vote
A solution not really completely automated, but you can do your job till find a completed automated method:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagelipsum
newsaveboxmylongbox
newsaveboxmybox
newcommandlonger[1]saveboxmylongboxhbox$#1$
newcommandforceLeft[1]saveboxmybox$#1$useboxmyboxhspacedimexprwdmylongbox-wdmybox
begindocument
lipsum[2]
%Store the longer item
longertextxxxxxxx1
beginflalign
textxxxxxxx1 &= 1/y &\
%Use forceleft command for the others
forceLefttextx2 &= y &\
forceLeftfrac13cdot x_2 &= y^2+x2 &
endflalign
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
it is not very clear to me what you like to obtain, so below are two options which cross my mind:
- in the first is used
flalign
math environment from theamsmath
package - in second the
gather
environment (also fromamsmat
) is enclosed infleqn
environment proviedad by he packagenccmath
(red lines indicate text borders)
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginflalign
textxxxxxxx1 &= 1/y &\
textx2 &= y &\
textx3 &= y^2+x2 &
endflalign
or
beginfleqn
begingather
textxxxxxxx1 = 1/y \
textx2 = y \
textx3 = y^2+x2
endgather
endfleqn
enddocument
edit:
from your comments follows that you like to have something like this:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginfleqn
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&= y \
&textx3 &&= y^2+x2
endalignat
endfleqn
enddocument
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
this means, that you like to big space between left side of equations and=
sign?
â Zarko
2 hours ago
Exactly. I cannot manage to do that withalignat
, nor withflalign
â Mary
2 hours ago
I took the liberty of simplifying the last code also to get the spacing right.;-)
â egreg
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
add a comment |Â
up vote
3
down vote
it is not very clear to me what you like to obtain, so below are two options which cross my mind:
- in the first is used
flalign
math environment from theamsmath
package - in second the
gather
environment (also fromamsmat
) is enclosed infleqn
environment proviedad by he packagenccmath
(red lines indicate text borders)
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginflalign
textxxxxxxx1 &= 1/y &\
textx2 &= y &\
textx3 &= y^2+x2 &
endflalign
or
beginfleqn
begingather
textxxxxxxx1 = 1/y \
textx2 = y \
textx3 = y^2+x2
endgather
endfleqn
enddocument
edit:
from your comments follows that you like to have something like this:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginfleqn
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&= y \
&textx3 &&= y^2+x2
endalignat
endfleqn
enddocument
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
this means, that you like to big space between left side of equations and=
sign?
â Zarko
2 hours ago
Exactly. I cannot manage to do that withalignat
, nor withflalign
â Mary
2 hours ago
I took the liberty of simplifying the last code also to get the spacing right.;-)
â egreg
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
it is not very clear to me what you like to obtain, so below are two options which cross my mind:
- in the first is used
flalign
math environment from theamsmath
package - in second the
gather
environment (also fromamsmat
) is enclosed infleqn
environment proviedad by he packagenccmath
(red lines indicate text borders)
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginflalign
textxxxxxxx1 &= 1/y &\
textx2 &= y &\
textx3 &= y^2+x2 &
endflalign
or
beginfleqn
begingather
textxxxxxxx1 = 1/y \
textx2 = y \
textx3 = y^2+x2
endgather
endfleqn
enddocument
edit:
from your comments follows that you like to have something like this:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginfleqn
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&= y \
&textx3 &&= y^2+x2
endalignat
endfleqn
enddocument
it is not very clear to me what you like to obtain, so below are two options which cross my mind:
- in the first is used
flalign
math environment from theamsmath
package - in second the
gather
environment (also fromamsmat
) is enclosed infleqn
environment proviedad by he packagenccmath
(red lines indicate text borders)
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginflalign
textxxxxxxx1 &= 1/y &\
textx2 &= y &\
textx3 &= y^2+x2 &
endflalign
or
beginfleqn
begingather
textxxxxxxx1 = 1/y \
textx2 = y \
textx3 = y^2+x2
endgather
endfleqn
enddocument
edit:
from your comments follows that you like to have something like this:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagenccmath
%---------------- show page layout. don't use in a real document!
usepackageshowframe
renewcommandShowFrameLinethickness0.15pt
renewcommand*ShowFrameColorcolorred
%---------------------------------------------------------------%
begindocument
beginfleqn
beginalignat2
&textxxxxxxx1 &&= 1/y \
&textx2 &&= y \
&textx3 &&= y^2+x2
endalignat
endfleqn
enddocument
edited 1 hour ago
egreg
682k8318123060
682k8318123060
answered 2 hours ago
Zarko
112k861150
112k861150
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
this means, that you like to big space between left side of equations and=
sign?
â Zarko
2 hours ago
Exactly. I cannot manage to do that withalignat
, nor withflalign
â Mary
2 hours ago
I took the liberty of simplifying the last code also to get the spacing right.;-)
â egreg
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
add a comment |Â
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
this means, that you like to big space between left side of equations and=
sign?
â Zarko
2 hours ago
Exactly. I cannot manage to do that withalignat
, nor withflalign
â Mary
2 hours ago
I took the liberty of simplifying the last code also to get the spacing right.;-)
â egreg
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
The first option is the most similar to what I'd like to obtain; however I'd like to also have x2 and x3 aligned at the left margin
â Mary
2 hours ago
this means, that you like to big space between left side of equations and
=
sign?â Zarko
2 hours ago
this means, that you like to big space between left side of equations and
=
sign?â Zarko
2 hours ago
Exactly. I cannot manage to do that with
alignat
, nor with flalign
â Mary
2 hours ago
Exactly. I cannot manage to do that with
alignat
, nor with flalign
â Mary
2 hours ago
I took the liberty of simplifying the last code also to get the spacing right.
;-)
â egreg
1 hour ago
I took the liberty of simplifying the last code also to get the spacing right.
;-)
â egreg
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
@egreg, thank you very much. i now is better!
â Zarko
1 hour ago
add a comment |Â
up vote
1
down vote
A solution not really completely automated, but you can do your job till find a completed automated method:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagelipsum
newsaveboxmylongbox
newsaveboxmybox
newcommandlonger[1]saveboxmylongboxhbox$#1$
newcommandforceLeft[1]saveboxmybox$#1$useboxmyboxhspacedimexprwdmylongbox-wdmybox
begindocument
lipsum[2]
%Store the longer item
longertextxxxxxxx1
beginflalign
textxxxxxxx1 &= 1/y &\
%Use forceleft command for the others
forceLefttextx2 &= y &\
forceLeftfrac13cdot x_2 &= y^2+x2 &
endflalign
enddocument
add a comment |Â
up vote
1
down vote
A solution not really completely automated, but you can do your job till find a completed automated method:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagelipsum
newsaveboxmylongbox
newsaveboxmybox
newcommandlonger[1]saveboxmylongboxhbox$#1$
newcommandforceLeft[1]saveboxmybox$#1$useboxmyboxhspacedimexprwdmylongbox-wdmybox
begindocument
lipsum[2]
%Store the longer item
longertextxxxxxxx1
beginflalign
textxxxxxxx1 &= 1/y &\
%Use forceleft command for the others
forceLefttextx2 &= y &\
forceLeftfrac13cdot x_2 &= y^2+x2 &
endflalign
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
A solution not really completely automated, but you can do your job till find a completed automated method:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagelipsum
newsaveboxmylongbox
newsaveboxmybox
newcommandlonger[1]saveboxmylongboxhbox$#1$
newcommandforceLeft[1]saveboxmybox$#1$useboxmyboxhspacedimexprwdmylongbox-wdmybox
begindocument
lipsum[2]
%Store the longer item
longertextxxxxxxx1
beginflalign
textxxxxxxx1 &= 1/y &\
%Use forceleft command for the others
forceLefttextx2 &= y &\
forceLeftfrac13cdot x_2 &= y^2+x2 &
endflalign
enddocument
A solution not really completely automated, but you can do your job till find a completed automated method:
documentclass[a4paper, 11pt]book
usepackageamsmath
usepackagelipsum
newsaveboxmylongbox
newsaveboxmybox
newcommandlonger[1]saveboxmylongboxhbox$#1$
newcommandforceLeft[1]saveboxmybox$#1$useboxmyboxhspacedimexprwdmylongbox-wdmybox
begindocument
lipsum[2]
%Store the longer item
longertextxxxxxxx1
beginflalign
textxxxxxxx1 &= 1/y &\
%Use forceleft command for the others
forceLefttextx2 &= y &\
forceLeftfrac13cdot x_2 &= y^2+x2 &
endflalign
enddocument
answered 1 hour ago
koleygr
9,5551634
9,5551634
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%2f450921%2fleft-aligned-equations%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
You want just these three to be aligned on the left margin, but still numbered at the right margin?
â Steven B. Segletes
3 hours ago
Yes, exactly. All equations in my document are numbered at the right margin, but I do not want all of them to be aligned at the left margin
â Mary
3 hours ago