How to have two separate right curly bracket in align or equation environment?
up vote
4
down vote
favorite
I essentially want to get my equation to look like this, but can't quite get it. I've used drcases but then the alignment is difficult. I've also tried empheq, but still having issues. Any ideas?
cases
add a comment |
up vote
4
down vote
favorite
I essentially want to get my equation to look like this, but can't quite get it. I've used drcases but then the alignment is difficult. I've also tried empheq, but still having issues. Any ideas?
cases
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I essentially want to get my equation to look like this, but can't quite get it. I've used drcases but then the alignment is difficult. I've also tried empheq, but still having issues. Any ideas?
cases
I essentially want to get my equation to look like this, but can't quite get it. I've used drcases but then the alignment is difficult. I've also tried empheq, but still having issues. Any ideas?
cases
cases
asked Nov 26 at 18:13
C.Hegg
211
211
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
5
down vote
You can use aligned
inside dcases
from the mathtools package. This is how the picture aligned.
documentclass[a4paper]{article}
usepackage{mathtools}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
frac{dG(t)}{dt} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
frac{dI(t)}{dt} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
G(t^+) &= G(t) \
I(t^+) &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
Update:
You can also align all the equation at the =
sign like this:
documentclass[a4paper]{article}
usepackage{mathtools,calc}
newlength{lhs}
settowidth{lhs}{ $frac{dG(t)}{dt}$ }
newcommand{lhsbox}[1]{makebox[lhs][r]{$displaystyle#1$}}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
lhsbox{frac{dG(t)}{dt}} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
lhsbox{frac{dI(t)}{dt}} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
lhsbox{G(t^+)} &= G(t) \
lhsbox{I(t^+)} &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
add a comment |
up vote
3
down vote
The following uses eqparbox
's eqmakebox[<tag>][<align>]{<stuff>}
to ensure all <stuff>
with the same <tag>
is set in a box of maximum width with the appropriate <align>
ment. This automates the process of aligning the equation left-hand sides:
documentclass{article}
usepackage{mathtools,eqparbox}
begin{document}
begin{equation}
begin{dcases}
left. begin{aligned}
& eqmakebox[LHS][r]{$dfrac{mathrm{d}G(t)}{mathrm{d}t}$}
= G_{in} - sigma_2 G - a left(c + frac{mI}{n + I} right) G + b \
& eqmakebox[LHS][r]{$dfrac{mathrm{d}I(t)}{mathrm{d}t}$}
= frac{sigma_1 G^2}{alpha_1^2 + G^2} - d_i I(t)
end{aligned} right } quad t neq k_tau, \
left. begin{aligned}
& eqmakebox[LHS][r]{$G(t^+)$} = G(t) \
& eqmakebox[LHS][r]{$I(t^+)$} = I(t) + sigma
end{aligned} right } quad t = k_tau
end{dcases}
end{equation}
end{document}
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
add a comment |
up vote
2
down vote
Here's a solution that employs nested array
environments.
documentclass{article}
usepackage{array,booktabs}
newcolumntype{L}{>{displaystyle}l}
begin{document}
[
renewcommandarraystretch{1.33}
setlengtharraycolsep{0pt}
left{
begin{array}{L}
left.
begin{array}{L}
a = ldfjdl;kfsja ;kfja;ksdljfa\
b = asjfl;a ;adjfl;asj ;adjfals
end{array}
right}
,quad tne kr,. \ addlinespace
left.
begin{array}{L}
c = jfdals;jkf\
d = dsalfjasl;fja
end{array}
right}
,quad t=kr,.
end{array}
right.
]
end{document}
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
You can use aligned
inside dcases
from the mathtools package. This is how the picture aligned.
documentclass[a4paper]{article}
usepackage{mathtools}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
frac{dG(t)}{dt} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
frac{dI(t)}{dt} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
G(t^+) &= G(t) \
I(t^+) &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
Update:
You can also align all the equation at the =
sign like this:
documentclass[a4paper]{article}
usepackage{mathtools,calc}
newlength{lhs}
settowidth{lhs}{ $frac{dG(t)}{dt}$ }
newcommand{lhsbox}[1]{makebox[lhs][r]{$displaystyle#1$}}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
lhsbox{frac{dG(t)}{dt}} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
lhsbox{frac{dI(t)}{dt}} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
lhsbox{G(t^+)} &= G(t) \
lhsbox{I(t^+)} &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
add a comment |
up vote
5
down vote
You can use aligned
inside dcases
from the mathtools package. This is how the picture aligned.
documentclass[a4paper]{article}
usepackage{mathtools}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
frac{dG(t)}{dt} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
frac{dI(t)}{dt} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
G(t^+) &= G(t) \
I(t^+) &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
Update:
You can also align all the equation at the =
sign like this:
documentclass[a4paper]{article}
usepackage{mathtools,calc}
newlength{lhs}
settowidth{lhs}{ $frac{dG(t)}{dt}$ }
newcommand{lhsbox}[1]{makebox[lhs][r]{$displaystyle#1$}}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
lhsbox{frac{dG(t)}{dt}} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
lhsbox{frac{dI(t)}{dt}} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
lhsbox{G(t^+)} &= G(t) \
lhsbox{I(t^+)} &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
add a comment |
up vote
5
down vote
up vote
5
down vote
You can use aligned
inside dcases
from the mathtools package. This is how the picture aligned.
documentclass[a4paper]{article}
usepackage{mathtools}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
frac{dG(t)}{dt} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
frac{dI(t)}{dt} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
G(t^+) &= G(t) \
I(t^+) &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
Update:
You can also align all the equation at the =
sign like this:
documentclass[a4paper]{article}
usepackage{mathtools,calc}
newlength{lhs}
settowidth{lhs}{ $frac{dG(t)}{dt}$ }
newcommand{lhsbox}[1]{makebox[lhs][r]{$displaystyle#1$}}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
lhsbox{frac{dG(t)}{dt}} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
lhsbox{frac{dI(t)}{dt}} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
lhsbox{G(t^+)} &= G(t) \
lhsbox{I(t^+)} &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
You can use aligned
inside dcases
from the mathtools package. This is how the picture aligned.
documentclass[a4paper]{article}
usepackage{mathtools}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
frac{dG(t)}{dt} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
frac{dI(t)}{dt} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
G(t^+) &= G(t) \
I(t^+) &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
Update:
You can also align all the equation at the =
sign like this:
documentclass[a4paper]{article}
usepackage{mathtools,calc}
newlength{lhs}
settowidth{lhs}{ $frac{dG(t)}{dt}$ }
newcommand{lhsbox}[1]{makebox[lhs][r]{$displaystyle#1$}}
begin{document}
begin{equation}
begin{dcases}left.
begin{aligned}
lhsbox{frac{dG(t)}{dt}} &= G_{in} - sigma_2G - aleft(c+frac{mI}{n+I}right)G + b \
lhsbox{frac{dI(t)}{dt}} &= frac{sigma_1G^2}{alpha_1^2+G^2} - d_iI(t)
end{aligned} right }, quad t ne k_tau, & \
left.
begin{aligned}
lhsbox{G(t^+)} &= G(t) \
lhsbox{I(t^+)} &= I(t) + sigma
end{aligned} right }, quad t = k_tau, &
end{dcases}
end{equation}
end{document}
edited Nov 26 at 19:07
answered Nov 26 at 18:38
AboAmmar
31.6k22781
31.6k22781
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
add a comment |
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
That looks really good. Is there anyway one could make the equals sign aligned instead of just flush left?
– C.Hegg
Nov 26 at 18:45
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Yes, please see my update
– AboAmmar
Nov 26 at 18:52
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
Of course, what I meant is that the equal signs are only lined up in each aligned environment separately, I know this isnt what I asked, but if one of the equations we had an extra term on the LHS, then all 4 equal signs would no longer be aligned.
– C.Hegg
Nov 26 at 19:01
add a comment |
up vote
3
down vote
The following uses eqparbox
's eqmakebox[<tag>][<align>]{<stuff>}
to ensure all <stuff>
with the same <tag>
is set in a box of maximum width with the appropriate <align>
ment. This automates the process of aligning the equation left-hand sides:
documentclass{article}
usepackage{mathtools,eqparbox}
begin{document}
begin{equation}
begin{dcases}
left. begin{aligned}
& eqmakebox[LHS][r]{$dfrac{mathrm{d}G(t)}{mathrm{d}t}$}
= G_{in} - sigma_2 G - a left(c + frac{mI}{n + I} right) G + b \
& eqmakebox[LHS][r]{$dfrac{mathrm{d}I(t)}{mathrm{d}t}$}
= frac{sigma_1 G^2}{alpha_1^2 + G^2} - d_i I(t)
end{aligned} right } quad t neq k_tau, \
left. begin{aligned}
& eqmakebox[LHS][r]{$G(t^+)$} = G(t) \
& eqmakebox[LHS][r]{$I(t^+)$} = I(t) + sigma
end{aligned} right } quad t = k_tau
end{dcases}
end{equation}
end{document}
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
add a comment |
up vote
3
down vote
The following uses eqparbox
's eqmakebox[<tag>][<align>]{<stuff>}
to ensure all <stuff>
with the same <tag>
is set in a box of maximum width with the appropriate <align>
ment. This automates the process of aligning the equation left-hand sides:
documentclass{article}
usepackage{mathtools,eqparbox}
begin{document}
begin{equation}
begin{dcases}
left. begin{aligned}
& eqmakebox[LHS][r]{$dfrac{mathrm{d}G(t)}{mathrm{d}t}$}
= G_{in} - sigma_2 G - a left(c + frac{mI}{n + I} right) G + b \
& eqmakebox[LHS][r]{$dfrac{mathrm{d}I(t)}{mathrm{d}t}$}
= frac{sigma_1 G^2}{alpha_1^2 + G^2} - d_i I(t)
end{aligned} right } quad t neq k_tau, \
left. begin{aligned}
& eqmakebox[LHS][r]{$G(t^+)$} = G(t) \
& eqmakebox[LHS][r]{$I(t^+)$} = I(t) + sigma
end{aligned} right } quad t = k_tau
end{dcases}
end{equation}
end{document}
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
add a comment |
up vote
3
down vote
up vote
3
down vote
The following uses eqparbox
's eqmakebox[<tag>][<align>]{<stuff>}
to ensure all <stuff>
with the same <tag>
is set in a box of maximum width with the appropriate <align>
ment. This automates the process of aligning the equation left-hand sides:
documentclass{article}
usepackage{mathtools,eqparbox}
begin{document}
begin{equation}
begin{dcases}
left. begin{aligned}
& eqmakebox[LHS][r]{$dfrac{mathrm{d}G(t)}{mathrm{d}t}$}
= G_{in} - sigma_2 G - a left(c + frac{mI}{n + I} right) G + b \
& eqmakebox[LHS][r]{$dfrac{mathrm{d}I(t)}{mathrm{d}t}$}
= frac{sigma_1 G^2}{alpha_1^2 + G^2} - d_i I(t)
end{aligned} right } quad t neq k_tau, \
left. begin{aligned}
& eqmakebox[LHS][r]{$G(t^+)$} = G(t) \
& eqmakebox[LHS][r]{$I(t^+)$} = I(t) + sigma
end{aligned} right } quad t = k_tau
end{dcases}
end{equation}
end{document}
The following uses eqparbox
's eqmakebox[<tag>][<align>]{<stuff>}
to ensure all <stuff>
with the same <tag>
is set in a box of maximum width with the appropriate <align>
ment. This automates the process of aligning the equation left-hand sides:
documentclass{article}
usepackage{mathtools,eqparbox}
begin{document}
begin{equation}
begin{dcases}
left. begin{aligned}
& eqmakebox[LHS][r]{$dfrac{mathrm{d}G(t)}{mathrm{d}t}$}
= G_{in} - sigma_2 G - a left(c + frac{mI}{n + I} right) G + b \
& eqmakebox[LHS][r]{$dfrac{mathrm{d}I(t)}{mathrm{d}t}$}
= frac{sigma_1 G^2}{alpha_1^2 + G^2} - d_i I(t)
end{aligned} right } quad t neq k_tau, \
left. begin{aligned}
& eqmakebox[LHS][r]{$G(t^+)$} = G(t) \
& eqmakebox[LHS][r]{$I(t^+)$} = I(t) + sigma
end{aligned} right } quad t = k_tau
end{dcases}
end{equation}
end{document}
answered Nov 26 at 18:54
Werner
433k609531635
433k609531635
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
add a comment |
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
Perfect! thank you so much!
– C.Hegg
Nov 26 at 19:07
add a comment |
up vote
2
down vote
Here's a solution that employs nested array
environments.
documentclass{article}
usepackage{array,booktabs}
newcolumntype{L}{>{displaystyle}l}
begin{document}
[
renewcommandarraystretch{1.33}
setlengtharraycolsep{0pt}
left{
begin{array}{L}
left.
begin{array}{L}
a = ldfjdl;kfsja ;kfja;ksdljfa\
b = asjfl;a ;adjfl;asj ;adjfals
end{array}
right}
,quad tne kr,. \ addlinespace
left.
begin{array}{L}
c = jfdals;jkf\
d = dsalfjasl;fja
end{array}
right}
,quad t=kr,.
end{array}
right.
]
end{document}
add a comment |
up vote
2
down vote
Here's a solution that employs nested array
environments.
documentclass{article}
usepackage{array,booktabs}
newcolumntype{L}{>{displaystyle}l}
begin{document}
[
renewcommandarraystretch{1.33}
setlengtharraycolsep{0pt}
left{
begin{array}{L}
left.
begin{array}{L}
a = ldfjdl;kfsja ;kfja;ksdljfa\
b = asjfl;a ;adjfl;asj ;adjfals
end{array}
right}
,quad tne kr,. \ addlinespace
left.
begin{array}{L}
c = jfdals;jkf\
d = dsalfjasl;fja
end{array}
right}
,quad t=kr,.
end{array}
right.
]
end{document}
add a comment |
up vote
2
down vote
up vote
2
down vote
Here's a solution that employs nested array
environments.
documentclass{article}
usepackage{array,booktabs}
newcolumntype{L}{>{displaystyle}l}
begin{document}
[
renewcommandarraystretch{1.33}
setlengtharraycolsep{0pt}
left{
begin{array}{L}
left.
begin{array}{L}
a = ldfjdl;kfsja ;kfja;ksdljfa\
b = asjfl;a ;adjfl;asj ;adjfals
end{array}
right}
,quad tne kr,. \ addlinespace
left.
begin{array}{L}
c = jfdals;jkf\
d = dsalfjasl;fja
end{array}
right}
,quad t=kr,.
end{array}
right.
]
end{document}
Here's a solution that employs nested array
environments.
documentclass{article}
usepackage{array,booktabs}
newcolumntype{L}{>{displaystyle}l}
begin{document}
[
renewcommandarraystretch{1.33}
setlengtharraycolsep{0pt}
left{
begin{array}{L}
left.
begin{array}{L}
a = ldfjdl;kfsja ;kfja;ksdljfa\
b = asjfl;a ;adjfl;asj ;adjfals
end{array}
right}
,quad tne kr,. \ addlinespace
left.
begin{array}{L}
c = jfdals;jkf\
d = dsalfjasl;fja
end{array}
right}
,quad t=kr,.
end{array}
right.
]
end{document}
answered Nov 26 at 18:47
Mico
271k30367755
271k30367755
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.
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%2f461864%2fhow-to-have-two-separate-right-curly-bracket-in-align-or-equation-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