Syntax in align environment
Take a look at this here:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{align*}
Leftrightarrow qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{align*}
end{document}
Is it possible to have the equivalences below each other like the equations are?
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow && e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignat*}
end{document}
This almost works but i have the mention problem that the first line is pulled to the very left.
align syntax
add a comment |
Take a look at this here:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{align*}
Leftrightarrow qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{align*}
end{document}
Is it possible to have the equivalences below each other like the equations are?
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow && e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignat*}
end{document}
This almost works but i have the mention problem that the first line is pulled to the very left.
align syntax
2
Of course, you don't want to add the equation number manually, do you?
– egreg
Dec 14 at 8:45
add a comment |
Take a look at this here:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{align*}
Leftrightarrow qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{align*}
end{document}
Is it possible to have the equivalences below each other like the equations are?
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow && e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignat*}
end{document}
This almost works but i have the mention problem that the first line is pulled to the very left.
align syntax
Take a look at this here:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{align*}
Leftrightarrow qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{align*}
end{document}
Is it possible to have the equivalences below each other like the equations are?
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} && (2.6)\
Leftrightarrow && e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignat*}
end{document}
This almost works but i have the mention problem that the first line is pulled to the very left.
align syntax
align syntax
edited Dec 15 at 8:30
asked Dec 14 at 8:33
chri11
384
384
2
Of course, you don't want to add the equation number manually, do you?
– egreg
Dec 14 at 8:45
add a comment |
2
Of course, you don't want to add the equation number manually, do you?
– egreg
Dec 14 at 8:45
2
2
Of course, you don't want to add the equation number manually, do you?
– egreg
Dec 14 at 8:45
Of course, you don't want to add the equation number manually, do you?
– egreg
Dec 14 at 8:45
add a comment |
4 Answers
4
active
oldest
votes
Like so?
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
Leftrightarrow&& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} tag{2.6} \
Leftrightarrow&& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda notag
end{align}
end{document}
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
add a comment |
You also might be interested in the ArrowBetweenLines
from mathtools
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{mathtools}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
& & abc & =def \
ArrowBetweenLines &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
ArrowBetweenLines &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
add a comment |
You don't want to manually number your equations and not because of the fact that the numbers would be unaligned to each other, but because maintaining manual numbering is essentially impossible.
Use the label
-ref
mechanism for this.
Your problem can be solved with alignedat
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one; a real document
% will have nothing like this
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
Leftrightarrow &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
If you happen to have a first line without the arrows, just add the suitable number of alignment points:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}
begin{alignedat}{2}
&qquad& P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow & & P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow & & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow & & frac{d}{dt}(e^{lambda t}P_1(t))&=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
On the other hand, I see no reason for aligning at the equals signs.
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{aligned}
&& & P'_1(t)=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow && & P'_1(t)+lambda P_1(t)=lambda e^{-lambda t} \
Leftrightarrow && & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow && & frac{d}{dt}(e^{lambda t}P_1(t))=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{aligned}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
add a comment |
You can also use alignat
:
Code:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t) &=lambda e^{-lambda t} && (2.6) \
Leftrightarrow &&qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t) &=lambda e^{lambda t} e^{-lambda t}=lambda
end{alignat*}
end{document}
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Each&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.
– Peter Grill
Dec 14 at 17:21
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%2f464802%2fsyntax-in-align-environment%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Like so?
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
Leftrightarrow&& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} tag{2.6} \
Leftrightarrow&& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda notag
end{align}
end{document}
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
add a comment |
Like so?
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
Leftrightarrow&& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} tag{2.6} \
Leftrightarrow&& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda notag
end{align}
end{document}
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
add a comment |
Like so?
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
Leftrightarrow&& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} tag{2.6} \
Leftrightarrow&& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda notag
end{align}
end{document}
Like so?
documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
Leftrightarrow&& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} tag{2.6} \
Leftrightarrow&& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda notag
end{align}
end{document}
edited Dec 14 at 8:53
Bernard
165k769193
165k769193
answered Dec 14 at 8:40
Henri Menke
69.8k8155259
69.8k8155259
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
add a comment |
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
Almost - if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 8:57
add a comment |
You also might be interested in the ArrowBetweenLines
from mathtools
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{mathtools}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
& & abc & =def \
ArrowBetweenLines &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
ArrowBetweenLines &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
add a comment |
You also might be interested in the ArrowBetweenLines
from mathtools
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{mathtools}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
& & abc & =def \
ArrowBetweenLines &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
ArrowBetweenLines &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
add a comment |
You also might be interested in the ArrowBetweenLines
from mathtools
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{mathtools}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
& & abc & =def \
ArrowBetweenLines &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
ArrowBetweenLines &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
You also might be interested in the ArrowBetweenLines
from mathtools
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{mathtools}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
& & abc & =def \
ArrowBetweenLines &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
ArrowBetweenLines &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
answered Dec 14 at 9:09
Bernard
165k769193
165k769193
add a comment |
add a comment |
You don't want to manually number your equations and not because of the fact that the numbers would be unaligned to each other, but because maintaining manual numbering is essentially impossible.
Use the label
-ref
mechanism for this.
Your problem can be solved with alignedat
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one; a real document
% will have nothing like this
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
Leftrightarrow &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
If you happen to have a first line without the arrows, just add the suitable number of alignment points:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}
begin{alignedat}{2}
&qquad& P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow & & P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow & & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow & & frac{d}{dt}(e^{lambda t}P_1(t))&=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
On the other hand, I see no reason for aligning at the equals signs.
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{aligned}
&& & P'_1(t)=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow && & P'_1(t)+lambda P_1(t)=lambda e^{-lambda t} \
Leftrightarrow && & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow && & frac{d}{dt}(e^{lambda t}P_1(t))=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{aligned}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
add a comment |
You don't want to manually number your equations and not because of the fact that the numbers would be unaligned to each other, but because maintaining manual numbering is essentially impossible.
Use the label
-ref
mechanism for this.
Your problem can be solved with alignedat
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one; a real document
% will have nothing like this
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
Leftrightarrow &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
If you happen to have a first line without the arrows, just add the suitable number of alignment points:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}
begin{alignedat}{2}
&qquad& P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow & & P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow & & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow & & frac{d}{dt}(e^{lambda t}P_1(t))&=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
On the other hand, I see no reason for aligning at the equals signs.
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{aligned}
&& & P'_1(t)=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow && & P'_1(t)+lambda P_1(t)=lambda e^{-lambda t} \
Leftrightarrow && & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow && & frac{d}{dt}(e^{lambda t}P_1(t))=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{aligned}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
add a comment |
You don't want to manually number your equations and not because of the fact that the numbers would be unaligned to each other, but because maintaining manual numbering is essentially impossible.
Use the label
-ref
mechanism for this.
Your problem can be solved with alignedat
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one; a real document
% will have nothing like this
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
Leftrightarrow &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
If you happen to have a first line without the arrows, just add the suitable number of alignment points:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}
begin{alignedat}{2}
&qquad& P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow & & P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow & & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow & & frac{d}{dt}(e^{lambda t}P_1(t))&=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
On the other hand, I see no reason for aligning at the equals signs.
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{aligned}
&& & P'_1(t)=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow && & P'_1(t)+lambda P_1(t)=lambda e^{-lambda t} \
Leftrightarrow && & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow && & frac{d}{dt}(e^{lambda t}P_1(t))=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{aligned}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
You don't want to manually number your equations and not because of the fact that the numbers would be unaligned to each other, but because maintaining manual numbering is essentially impossible.
Use the label
-ref
mechanism for this.
Your problem can be solved with alignedat
:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one; a real document
% will have nothing like this
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{alignedat}{2}
Leftrightarrow &qquad& P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow &qquad& e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)
&=lambda e^{lambda t} e^{-lambda t}=lambda \
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
If you happen to have a first line without the arrows, just add the suitable number of alignment points:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}
begin{alignedat}{2}
&qquad& P'_1(t)&=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow & & P'_1(t)+lambda P_1(t)&=lambda e^{-lambda t} \
Leftrightarrow & & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)&=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow & & frac{d}{dt}(e^{lambda t}P_1(t))&=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{alignedat}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
On the other hand, I see no reason for aligning at the equals signs.
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
numberwithin{equation}{section}
begin{document}
% let's emulate being in section 2 with five
% numbered equations before this one
setcounter{section}{2}setcounter{equation}{5}
begin{equation}label{equivalenteqs}
begin{aligned}
&& & P'_1(t)=-lambda P_1(t)+lambda P_0(t)\
Leftrightarrow && & P'_1(t)+lambda P_1(t)=lambda e^{-lambda t} \
Leftrightarrow && & e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda e^{lambda t} e^{-lambda t}=lambda \
Leftrightarrow && & frac{d}{dt}(e^{lambda t}P_1(t))=e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t)=lambda\
end{aligned}
end{equation}
As we see in equation~eqref{equivalenteqs} we can blah blah.
end{document}
edited Dec 15 at 14:31
answered Dec 14 at 8:54
egreg
707k8618793161
707k8618793161
add a comment |
add a comment |
You can also use alignat
:
Code:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t) &=lambda e^{-lambda t} && (2.6) \
Leftrightarrow &&qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t) &=lambda e^{lambda t} e^{-lambda t}=lambda
end{alignat*}
end{document}
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Each&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.
– Peter Grill
Dec 14 at 17:21
add a comment |
You can also use alignat
:
Code:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t) &=lambda e^{-lambda t} && (2.6) \
Leftrightarrow &&qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t) &=lambda e^{lambda t} e^{-lambda t}=lambda
end{alignat*}
end{document}
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Each&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.
– Peter Grill
Dec 14 at 17:21
add a comment |
You can also use alignat
:
Code:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t) &=lambda e^{-lambda t} && (2.6) \
Leftrightarrow &&qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t) &=lambda e^{lambda t} e^{-lambda t}=lambda
end{alignat*}
end{document}
You can also use alignat
:
Code:
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
begin{document}
begin{alignat*}{4}
Leftrightarrow &&qquad P'_1(t)+lambda P_1(t) &=lambda e^{-lambda t} && (2.6) \
Leftrightarrow &&qquad e^{lambda t}P'_1(t)+lambda e^{lambda t}P_1(t) &=lambda e^{lambda t} e^{-lambda t}=lambda
end{alignat*}
end{document}
edited Dec 14 at 8:52
Bernard
165k769193
165k769193
answered Dec 14 at 8:44
Peter Grill
164k25434745
164k25434745
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Each&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.
– Peter Grill
Dec 14 at 17:21
add a comment |
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Each&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.
– Peter Grill
Dec 14 at 17:21
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Same problem here: if i have another line above the first Leftrightarrow - Line it pulls the term to the very left "&&"-sign :/
– chri11
Dec 14 at 9:06
Each
&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.– Peter Grill
Dec 14 at 17:21
Each
&
provide right alignment for the text before and left alignment for the left after, but without knowing more details it is difficult to help you further. Please update your test case in the question to more accurately reflect the issue you are having.– Peter Grill
Dec 14 at 17:21
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f464802%2fsyntax-in-align-environment%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
2
Of course, you don't want to add the equation number manually, do you?
– egreg
Dec 14 at 8:45