How to align my equation to left?
I want to display four equations which have different length. I want they align left like this.
But my code give this
The following are my code:
$$begin{aligned} p(a) &=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a) \
&={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}
end{aligned}$$
$$begin{aligned} p(b) &=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b) \
&={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}} end{aligned}$$
$$begin{aligned} p(c) &=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}} end{aligned}$$
$$begin{aligned} p(d) &=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}} end{aligned}$$
Can anyone tell me what I can do?
math-mode align
add a comment |
I want to display four equations which have different length. I want they align left like this.
But my code give this
The following are my code:
$$begin{aligned} p(a) &=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a) \
&={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}
end{aligned}$$
$$begin{aligned} p(b) &=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b) \
&={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}} end{aligned}$$
$$begin{aligned} p(c) &=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}} end{aligned}$$
$$begin{aligned} p(d) &=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}} end{aligned}$$
Can anyone tell me what I can do?
math-mode align
never use$$
in latex, use[
and then thefleqn
option will left align equations.
– David Carlisle
Mar 22 at 8:45
add a comment |
I want to display four equations which have different length. I want they align left like this.
But my code give this
The following are my code:
$$begin{aligned} p(a) &=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a) \
&={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}
end{aligned}$$
$$begin{aligned} p(b) &=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b) \
&={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}} end{aligned}$$
$$begin{aligned} p(c) &=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}} end{aligned}$$
$$begin{aligned} p(d) &=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}} end{aligned}$$
Can anyone tell me what I can do?
math-mode align
I want to display four equations which have different length. I want they align left like this.
But my code give this
The following are my code:
$$begin{aligned} p(a) &=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a) \
&={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}
end{aligned}$$
$$begin{aligned} p(b) &=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b) \
&={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}} end{aligned}$$
$$begin{aligned} p(c) &=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}} end{aligned}$$
$$begin{aligned} p(d) &=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d) \
&={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}} end{aligned}$$
Can anyone tell me what I can do?
math-mode align
math-mode align
edited Mar 22 at 8:44
JouleV
8,90222155
8,90222155
asked Mar 22 at 8:39
cholechole
411
411
never use$$
in latex, use[
and then thefleqn
option will left align equations.
– David Carlisle
Mar 22 at 8:45
add a comment |
never use$$
in latex, use[
and then thefleqn
option will left align equations.
– David Carlisle
Mar 22 at 8:45
never use
$$
in latex, use [
and then the fleqn
option will left align equations.– David Carlisle
Mar 22 at 8:45
never use
$$
in latex, use [
and then the fleqn
option will left align equations.– David Carlisle
Mar 22 at 8:45
add a comment |
2 Answers
2
active
oldest
votes
Here is a proposal
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&;={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&;={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}}
end{align*}
end{document}
Why do you use scriptstyle
? It is very hard to read the fractions! Use tfrac
instead!
You should remove ;
in the &;={scriptstyle...
lines to align the =
s. I prefer that way.
I strongly recommend this one
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&=tfrac{1}{2} tfrac{2}{3}+tfrac{1}{4} tfrac{1}{3}+tfrac{1}{3}+tfrac{1}{3}=tfrac{1}{2}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&=tfrac{1}{2} tfrac{1}{6}+tfrac{1}{4} tfrac{1}{2}+tfrac{1}{3} tfrac{1}{3}=tfrac{1}{4}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{4} tfrac{1}{6}+tfrac{1}{8} 0+tfrac{1}{8}=tfrac{1}{8}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{8} tfrac{1}{3}+tfrac{1}{8} tfrac{1}{3}=tfrac{1}{3}
end{align*}
end{document}
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
1
@chole Then you should usetfrac
instead ofscriptstylefrac
.
– JouleV
Mar 22 at 8:58
2
+1 for recommendingtfrac
in place ofscriptstylefrac
.
– Mico
Mar 22 at 9:00
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
1
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using$$
but If I had answered I would also have suggestedalign*
rather than[begin{aligned}
:-)
– David Carlisle
Mar 22 at 9:08
|
show 1 more comment
I propose this layout, using the fleqn
environment and, as in my opinion, medium sized fractions will look best, I also use the medmath
and mfrac
commands, each from nccmath
:
documentclass{article}
usepackage{amsmath, nccmath}
begin{document}
begin{fleqn}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&quad= medmath{frac{1}{2}cdot frac{2}{3}+frac{1}{4}cdot frac{1}{3}+frac{1}{3}+frac{1}{3}}=mfrac{1}{2} \[1ex]
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&quad= medmath{frac{1}{2}cdot frac{1}{6}+frac{1}{4}cdot frac{1}{2}+frac{1}{3}cdot frac{1}{3}}=mfrac{1}{4} \[1ex]
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{4}cdot frac{1}{6}+frac{1}{8},0 + frac{1}{8}}=mfrac{1}{8} \[1ex]
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{8}cdot frac{1}{3}+frac{1}{8cdot } frac{1}{3}}=mfrac{1}{3}
end{align*}
end{fleqn}
end{document}
add a comment |
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
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480865%2fhow-to-align-my-equation-to-left%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is a proposal
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&;={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&;={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}}
end{align*}
end{document}
Why do you use scriptstyle
? It is very hard to read the fractions! Use tfrac
instead!
You should remove ;
in the &;={scriptstyle...
lines to align the =
s. I prefer that way.
I strongly recommend this one
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&=tfrac{1}{2} tfrac{2}{3}+tfrac{1}{4} tfrac{1}{3}+tfrac{1}{3}+tfrac{1}{3}=tfrac{1}{2}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&=tfrac{1}{2} tfrac{1}{6}+tfrac{1}{4} tfrac{1}{2}+tfrac{1}{3} tfrac{1}{3}=tfrac{1}{4}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{4} tfrac{1}{6}+tfrac{1}{8} 0+tfrac{1}{8}=tfrac{1}{8}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{8} tfrac{1}{3}+tfrac{1}{8} tfrac{1}{3}=tfrac{1}{3}
end{align*}
end{document}
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
1
@chole Then you should usetfrac
instead ofscriptstylefrac
.
– JouleV
Mar 22 at 8:58
2
+1 for recommendingtfrac
in place ofscriptstylefrac
.
– Mico
Mar 22 at 9:00
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
1
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using$$
but If I had answered I would also have suggestedalign*
rather than[begin{aligned}
:-)
– David Carlisle
Mar 22 at 9:08
|
show 1 more comment
Here is a proposal
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&;={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&;={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}}
end{align*}
end{document}
Why do you use scriptstyle
? It is very hard to read the fractions! Use tfrac
instead!
You should remove ;
in the &;={scriptstyle...
lines to align the =
s. I prefer that way.
I strongly recommend this one
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&=tfrac{1}{2} tfrac{2}{3}+tfrac{1}{4} tfrac{1}{3}+tfrac{1}{3}+tfrac{1}{3}=tfrac{1}{2}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&=tfrac{1}{2} tfrac{1}{6}+tfrac{1}{4} tfrac{1}{2}+tfrac{1}{3} tfrac{1}{3}=tfrac{1}{4}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{4} tfrac{1}{6}+tfrac{1}{8} 0+tfrac{1}{8}=tfrac{1}{8}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{8} tfrac{1}{3}+tfrac{1}{8} tfrac{1}{3}=tfrac{1}{3}
end{align*}
end{document}
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
1
@chole Then you should usetfrac
instead ofscriptstylefrac
.
– JouleV
Mar 22 at 8:58
2
+1 for recommendingtfrac
in place ofscriptstylefrac
.
– Mico
Mar 22 at 9:00
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
1
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using$$
but If I had answered I would also have suggestedalign*
rather than[begin{aligned}
:-)
– David Carlisle
Mar 22 at 9:08
|
show 1 more comment
Here is a proposal
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&;={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&;={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}}
end{align*}
end{document}
Why do you use scriptstyle
? It is very hard to read the fractions! Use tfrac
instead!
You should remove ;
in the &;={scriptstyle...
lines to align the =
s. I prefer that way.
I strongly recommend this one
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&=tfrac{1}{2} tfrac{2}{3}+tfrac{1}{4} tfrac{1}{3}+tfrac{1}{3}+tfrac{1}{3}=tfrac{1}{2}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&=tfrac{1}{2} tfrac{1}{6}+tfrac{1}{4} tfrac{1}{2}+tfrac{1}{3} tfrac{1}{3}=tfrac{1}{4}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{4} tfrac{1}{6}+tfrac{1}{8} 0+tfrac{1}{8}=tfrac{1}{8}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{8} tfrac{1}{3}+tfrac{1}{8} tfrac{1}{3}=tfrac{1}{3}
end{align*}
end{document}
Here is a proposal
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&;={scriptstyle frac{1}{2} frac{2}{3}+frac{1}{4} frac{1}{3}+frac{1}{3}+frac{1}{3}=frac{1}{2}}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&;={scriptstylefrac{1}{2} frac{1}{6}+frac{1}{4} frac{1}{2}+frac{1}{3} frac{1}{3}=frac{1}{4}}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{4} frac{1}{6}+frac{1}{8} 0+frac{1}{8}=frac{1}{8}}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&;={scriptstylefrac{1}{2} frac{1}{12}+frac{1}{8} frac{1}{3}+frac{1}{8} frac{1}{3}=frac{1}{3}}
end{align*}
end{document}
Why do you use scriptstyle
? It is very hard to read the fractions! Use tfrac
instead!
You should remove ;
in the &;={scriptstyle...
lines to align the =
s. I prefer that way.
I strongly recommend this one
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&=tfrac{1}{2} tfrac{2}{3}+tfrac{1}{4} tfrac{1}{3}+tfrac{1}{3}+tfrac{1}{3}=tfrac{1}{2}\
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&=tfrac{1}{2} tfrac{1}{6}+tfrac{1}{4} tfrac{1}{2}+tfrac{1}{3} tfrac{1}{3}=tfrac{1}{4}\
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{4} tfrac{1}{6}+tfrac{1}{8} 0+tfrac{1}{8}=tfrac{1}{8}\
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&=tfrac{1}{2} tfrac{1}{12}+tfrac{1}{8} tfrac{1}{3}+tfrac{1}{8} tfrac{1}{3}=tfrac{1}{3}
end{align*}
end{document}
edited Mar 22 at 8:59
answered Mar 22 at 8:49
JouleVJouleV
8,90222155
8,90222155
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
1
@chole Then you should usetfrac
instead ofscriptstylefrac
.
– JouleV
Mar 22 at 8:58
2
+1 for recommendingtfrac
in place ofscriptstylefrac
.
– Mico
Mar 22 at 9:00
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
1
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using$$
but If I had answered I would also have suggestedalign*
rather than[begin{aligned}
:-)
– David Carlisle
Mar 22 at 9:08
|
show 1 more comment
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
1
@chole Then you should usetfrac
instead ofscriptstylefrac
.
– JouleV
Mar 22 at 8:58
2
+1 for recommendingtfrac
in place ofscriptstylefrac
.
– Mico
Mar 22 at 9:00
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
1
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using$$
but If I had answered I would also have suggestedalign*
rather than[begin{aligned}
:-)
– David Carlisle
Mar 22 at 9:08
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
Thank you very much. I use 'scriptstyle' because I want the second line of the equation to be small.
– chole
Mar 22 at 8:55
1
1
@chole Then you should use
tfrac
instead of scriptstylefrac
.– JouleV
Mar 22 at 8:58
@chole Then you should use
tfrac
instead of scriptstylefrac
.– JouleV
Mar 22 at 8:58
2
2
+1 for recommending
tfrac
in place of scriptstylefrac
.– Mico
Mar 22 at 9:00
+1 for recommending
tfrac
in place of scriptstylefrac
.– Mico
Mar 22 at 9:00
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
@chole If my answer helps you, please mark your question as resolved by clicking the checkmark on the left of my answer.
– JouleV
Mar 22 at 9:02
1
1
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using
$$
but If I had answered I would also have suggested align*
rather than [begin{aligned}
:-)– David Carlisle
Mar 22 at 9:08
+1 yes as I commented under the question the direct answer why there was no left alignment was due to using
$$
but If I had answered I would also have suggested align*
rather than [begin{aligned}
:-)– David Carlisle
Mar 22 at 9:08
|
show 1 more comment
I propose this layout, using the fleqn
environment and, as in my opinion, medium sized fractions will look best, I also use the medmath
and mfrac
commands, each from nccmath
:
documentclass{article}
usepackage{amsmath, nccmath}
begin{document}
begin{fleqn}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&quad= medmath{frac{1}{2}cdot frac{2}{3}+frac{1}{4}cdot frac{1}{3}+frac{1}{3}+frac{1}{3}}=mfrac{1}{2} \[1ex]
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&quad= medmath{frac{1}{2}cdot frac{1}{6}+frac{1}{4}cdot frac{1}{2}+frac{1}{3}cdot frac{1}{3}}=mfrac{1}{4} \[1ex]
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{4}cdot frac{1}{6}+frac{1}{8},0 + frac{1}{8}}=mfrac{1}{8} \[1ex]
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{8}cdot frac{1}{3}+frac{1}{8cdot } frac{1}{3}}=mfrac{1}{3}
end{align*}
end{fleqn}
end{document}
add a comment |
I propose this layout, using the fleqn
environment and, as in my opinion, medium sized fractions will look best, I also use the medmath
and mfrac
commands, each from nccmath
:
documentclass{article}
usepackage{amsmath, nccmath}
begin{document}
begin{fleqn}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&quad= medmath{frac{1}{2}cdot frac{2}{3}+frac{1}{4}cdot frac{1}{3}+frac{1}{3}+frac{1}{3}}=mfrac{1}{2} \[1ex]
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&quad= medmath{frac{1}{2}cdot frac{1}{6}+frac{1}{4}cdot frac{1}{2}+frac{1}{3}cdot frac{1}{3}}=mfrac{1}{4} \[1ex]
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{4}cdot frac{1}{6}+frac{1}{8},0 + frac{1}{8}}=mfrac{1}{8} \[1ex]
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{8}cdot frac{1}{3}+frac{1}{8cdot } frac{1}{3}}=mfrac{1}{3}
end{align*}
end{fleqn}
end{document}
add a comment |
I propose this layout, using the fleqn
environment and, as in my opinion, medium sized fractions will look best, I also use the medmath
and mfrac
commands, each from nccmath
:
documentclass{article}
usepackage{amsmath, nccmath}
begin{document}
begin{fleqn}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&quad= medmath{frac{1}{2}cdot frac{2}{3}+frac{1}{4}cdot frac{1}{3}+frac{1}{3}+frac{1}{3}}=mfrac{1}{2} \[1ex]
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&quad= medmath{frac{1}{2}cdot frac{1}{6}+frac{1}{4}cdot frac{1}{2}+frac{1}{3}cdot frac{1}{3}}=mfrac{1}{4} \[1ex]
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{4}cdot frac{1}{6}+frac{1}{8},0 + frac{1}{8}}=mfrac{1}{8} \[1ex]
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{8}cdot frac{1}{3}+frac{1}{8cdot } frac{1}{3}}=mfrac{1}{3}
end{align*}
end{fleqn}
end{document}
I propose this layout, using the fleqn
environment and, as in my opinion, medium sized fractions will look best, I also use the medmath
and mfrac
commands, each from nccmath
:
documentclass{article}
usepackage{amsmath, nccmath}
begin{document}
begin{fleqn}
begin{align*}
p(a)&=p(a) p(a rightarrow a)+p(b) p(b rightarrow a)+p(c) p(c rightarrow a)+p(d) p(d rightarrow a)\
&quad= medmath{frac{1}{2}cdot frac{2}{3}+frac{1}{4}cdot frac{1}{3}+frac{1}{3}+frac{1}{3}}=mfrac{1}{2} \[1ex]
p(b)&=p(a) p(a rightarrow b)+p(b) p(b rightarrow b)+p(c) p(c rightarrow b)\
&quad= medmath{frac{1}{2}cdot frac{1}{6}+frac{1}{4}cdot frac{1}{2}+frac{1}{3}cdot frac{1}{3}}=mfrac{1}{4} \[1ex]
p(c)&=p(a) p(a rightarrow c)+p(b) p(b rightarrow c)+p(c) p(c rightarrow c)+p(d) p(d rightarrow c)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{4}cdot frac{1}{6}+frac{1}{8},0 + frac{1}{8}}=mfrac{1}{8} \[1ex]
p(d)&=p(a) p(a rightarrow d)+p(c) p(c rightarrow d)+p(d) p(d rightarrow d)\
&quad= medmath{frac{1}{2}cdot frac{1}{12}+frac{1}{8}cdot frac{1}{3}+frac{1}{8cdot } frac{1}{3}}=mfrac{1}{3}
end{align*}
end{fleqn}
end{document}
edited Mar 22 at 10:50
answered Mar 22 at 10:12
BernardBernard
174k776207
174k776207
add a comment |
add a comment |
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.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480865%2fhow-to-align-my-equation-to-left%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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
never use
$$
in latex, use[
and then thefleqn
option will left align equations.– David Carlisle
Mar 22 at 8:45