Subnumcases as a part of alignAligning plain `align` and `cases`?align nested in casesLeft brace in align environomentAlign part of formulaAlign part of piecewise functionAlign last part of equation left, tooLabeling inside align and casesUsing align inside casesAlign equations using begincasesAlign across cases
How long can fsck take on a 30 TB volume?
What's the "magic similar to the Knock spell" referenced in the Dungeon of the Mad Mage adventure?
Examples where existence is harder than evaluation
A Latin text with dependency tree
Probability of taking balls without replacement from a bag question
How to avoid making self and former employee look bad when reporting on fixing former employee's work?
How come mathematicians published in Annals of Eugenics?
When do you stop "pushing" a book?
Unicode-math and mathrm result in missing symbols
Randomly generate a sorted set with uniform distribution
Can a planet still function with a damaged moon?
Can you turn a recording upside-down?
What's the difference between "ricochet" and "bounce"?
What can cause an unfrozen indoor copper drain pipe to crack?
Is it a good idea to copy a trader when investing?
Row vectors and column vectors (Mathematica vs Matlab)
Why did Missandei say this?
Is there any evidence to support the claim that the United States was "suckered into WW1" by Zionists, made by Benjamin Freedman in his 1961 speech
Rusty Chain and back cassette – Replace or Repair?
How can I test a shell script in a "safe environment" to avoid harm to my computer?
Are on’yomi words loanwords?
"Estrontium" on poster
Are double contractions formal? Eg: "couldn't've" for "could not have"
How likely are Coriolis-effect-based quirks to develop in starship crew members?
Subnumcases as a part of align
Aligning plain `align` and `cases`?align nested in casesLeft brace in align environomentAlign part of formulaAlign part of piecewise functionAlign last part of equation left, tooLabeling inside align and casesUsing align inside casesAlign equations using begincasesAlign across cases
I am using the following code:
documentclassarticle
usepackagecases
usepackageamsmath,amsfonts
begindocument
beginalign*
undersettau in mathbbRmin tau
endalign*
beginsubnumcasestextrms.t. forall w in dom f^*, exists lambda in mathbbR^q:
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
enddocument
To produce the following:
I am happy with the result, but I don't feel like I am doing the correct thing. Both of the min term and s.t. term belong to the same optimization problem. When I define the minimization line with align* and the constraints with subnumcases, then there are problems like:
- A new page can start right after the 'min' part
- When I use label, ref, then it says Problem (3.2), but actually, the min tau line is not in Problem 3.2
- In similar but bigger problems, the alignment looks odd
Thus, I will be very happy to hear some suggestions!
equations align labels cases
add a comment |
I am using the following code:
documentclassarticle
usepackagecases
usepackageamsmath,amsfonts
begindocument
beginalign*
undersettau in mathbbRmin tau
endalign*
beginsubnumcasestextrms.t. forall w in dom f^*, exists lambda in mathbbR^q:
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
enddocument
To produce the following:
I am happy with the result, but I don't feel like I am doing the correct thing. Both of the min term and s.t. term belong to the same optimization problem. When I define the minimization line with align* and the constraints with subnumcases, then there are problems like:
- A new page can start right after the 'min' part
- When I use label, ref, then it says Problem (3.2), but actually, the min tau line is not in Problem 3.2
- In similar but bigger problems, the alignment looks odd
Thus, I will be very happy to hear some suggestions!
equations align labels cases
True, this is a part from a big project so I couldn't copy-paste the relevant packages. Now I am fixing it.
– aslv95
May 5 at 20:02
Fixed them all, now working on DeclareMathOperator. Do you have any idea about how I can combine the align* term and subcases term? Thank you
– aslv95
May 5 at 20:09
1
thanls for completing the example (although it doesn't allow anyone to comment on thelabelissue which is presumably a problem in an earlierbeginproblemleaking thelabelinformation?
– David Carlisle
May 5 at 20:14
It is very hard to illustrate the label-ref issue for me because I need to give a full page where this problem will be separated due to the issue I mention etc. I will try to also give a convenient example of this.
– aslv95
May 5 at 20:19
add a comment |
I am using the following code:
documentclassarticle
usepackagecases
usepackageamsmath,amsfonts
begindocument
beginalign*
undersettau in mathbbRmin tau
endalign*
beginsubnumcasestextrms.t. forall w in dom f^*, exists lambda in mathbbR^q:
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
enddocument
To produce the following:
I am happy with the result, but I don't feel like I am doing the correct thing. Both of the min term and s.t. term belong to the same optimization problem. When I define the minimization line with align* and the constraints with subnumcases, then there are problems like:
- A new page can start right after the 'min' part
- When I use label, ref, then it says Problem (3.2), but actually, the min tau line is not in Problem 3.2
- In similar but bigger problems, the alignment looks odd
Thus, I will be very happy to hear some suggestions!
equations align labels cases
I am using the following code:
documentclassarticle
usepackagecases
usepackageamsmath,amsfonts
begindocument
beginalign*
undersettau in mathbbRmin tau
endalign*
beginsubnumcasestextrms.t. forall w in dom f^*, exists lambda in mathbbR^q:
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
enddocument
To produce the following:
I am happy with the result, but I don't feel like I am doing the correct thing. Both of the min term and s.t. term belong to the same optimization problem. When I define the minimization line with align* and the constraints with subnumcases, then there are problems like:
- A new page can start right after the 'min' part
- When I use label, ref, then it says Problem (3.2), but actually, the min tau line is not in Problem 3.2
- In similar but bigger problems, the alignment looks odd
Thus, I will be very happy to hear some suggestions!
equations align labels cases
equations align labels cases
edited May 5 at 20:08
aslv95
asked May 5 at 19:39
aslv95aslv95
18218
18218
True, this is a part from a big project so I couldn't copy-paste the relevant packages. Now I am fixing it.
– aslv95
May 5 at 20:02
Fixed them all, now working on DeclareMathOperator. Do you have any idea about how I can combine the align* term and subcases term? Thank you
– aslv95
May 5 at 20:09
1
thanls for completing the example (although it doesn't allow anyone to comment on thelabelissue which is presumably a problem in an earlierbeginproblemleaking thelabelinformation?
– David Carlisle
May 5 at 20:14
It is very hard to illustrate the label-ref issue for me because I need to give a full page where this problem will be separated due to the issue I mention etc. I will try to also give a convenient example of this.
– aslv95
May 5 at 20:19
add a comment |
True, this is a part from a big project so I couldn't copy-paste the relevant packages. Now I am fixing it.
– aslv95
May 5 at 20:02
Fixed them all, now working on DeclareMathOperator. Do you have any idea about how I can combine the align* term and subcases term? Thank you
– aslv95
May 5 at 20:09
1
thanls for completing the example (although it doesn't allow anyone to comment on thelabelissue which is presumably a problem in an earlierbeginproblemleaking thelabelinformation?
– David Carlisle
May 5 at 20:14
It is very hard to illustrate the label-ref issue for me because I need to give a full page where this problem will be separated due to the issue I mention etc. I will try to also give a convenient example of this.
– aslv95
May 5 at 20:19
True, this is a part from a big project so I couldn't copy-paste the relevant packages. Now I am fixing it.
– aslv95
May 5 at 20:02
True, this is a part from a big project so I couldn't copy-paste the relevant packages. Now I am fixing it.
– aslv95
May 5 at 20:02
Fixed them all, now working on DeclareMathOperator. Do you have any idea about how I can combine the align* term and subcases term? Thank you
– aslv95
May 5 at 20:09
Fixed them all, now working on DeclareMathOperator. Do you have any idea about how I can combine the align* term and subcases term? Thank you
– aslv95
May 5 at 20:09
1
1
thanls for completing the example (although it doesn't allow anyone to comment on the
label issue which is presumably a problem in an earlier beginproblem leaking the label information?– David Carlisle
May 5 at 20:14
thanls for completing the example (although it doesn't allow anyone to comment on the
label issue which is presumably a problem in an earlier beginproblem leaking the label information?– David Carlisle
May 5 at 20:14
It is very hard to illustrate the label-ref issue for me because I need to give a full page where this problem will be separated due to the issue I mention etc. I will try to also give a convenient example of this.
– aslv95
May 5 at 20:19
It is very hard to illustrate the label-ref issue for me because I need to give a full page where this problem will be separated due to the issue I mention etc. I will try to also give a convenient example of this.
– aslv95
May 5 at 20:19
add a comment |
2 Answers
2
active
oldest
votes
I'd probably just use cases but if you definitely want the subnumcases layout you could use a minipage to keep things together.


documentclassarticle
usepackagemathtools,amsfonts,cases
DeclareMathOperatordomdom
begindocument
using gather
begingather*
min_tau in mathbbR tau\
shortintertexts.t.
forall w in dom f^*, exists lambda in mathbbR^q
begincases
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endcases
endgather*
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a
using [\
noindentbeginminipagetextwidth
noindent[
min_tau in mathbbR tau\
]
s.t.
beginsubnumcases
forall w in dom f^*, exists lambda in mathbbR^q
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
endminipage
enddocument
add a comment |
I propose this variant layout, using the facilities of the optidef package, dedicated to the layout of optimisation problems:
documentclassarticle
usepackagemathtools, amsfonts
usepackage[short]optidef
usepackagecleveref
DeclareMathOperatordomdom
begindocument
beginmini!
mathclaptauinmathbbRtau notag
addConstraint d^top lambda + w^top b - f^*(w) leq 0labeleqa
addConstraintforall w in dom f^*, exists lambda in mathbbR^q:smashbegincases\\\endcaseshspace*-1emD^top lambda geq A^top w labeleqb
addConstraintlambda geq mathbf0labeleqc
endmini!
We can see from crefeqa,eqb,eqc
enddocument

That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
1
I tried to usesubnumcasesas a ‘subenvironment’ once (somewhat likealigned), but wasn't able to do it (this doesn't prove it's impossible, though).
– Bernard
May 5 at 20:28
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%2f489334%2fsubnumcases-as-a-part-of-align%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
I'd probably just use cases but if you definitely want the subnumcases layout you could use a minipage to keep things together.


documentclassarticle
usepackagemathtools,amsfonts,cases
DeclareMathOperatordomdom
begindocument
using gather
begingather*
min_tau in mathbbR tau\
shortintertexts.t.
forall w in dom f^*, exists lambda in mathbbR^q
begincases
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endcases
endgather*
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a
using [\
noindentbeginminipagetextwidth
noindent[
min_tau in mathbbR tau\
]
s.t.
beginsubnumcases
forall w in dom f^*, exists lambda in mathbbR^q
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
endminipage
enddocument
add a comment |
I'd probably just use cases but if you definitely want the subnumcases layout you could use a minipage to keep things together.


documentclassarticle
usepackagemathtools,amsfonts,cases
DeclareMathOperatordomdom
begindocument
using gather
begingather*
min_tau in mathbbR tau\
shortintertexts.t.
forall w in dom f^*, exists lambda in mathbbR^q
begincases
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endcases
endgather*
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a
using [\
noindentbeginminipagetextwidth
noindent[
min_tau in mathbbR tau\
]
s.t.
beginsubnumcases
forall w in dom f^*, exists lambda in mathbbR^q
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
endminipage
enddocument
add a comment |
I'd probably just use cases but if you definitely want the subnumcases layout you could use a minipage to keep things together.


documentclassarticle
usepackagemathtools,amsfonts,cases
DeclareMathOperatordomdom
begindocument
using gather
begingather*
min_tau in mathbbR tau\
shortintertexts.t.
forall w in dom f^*, exists lambda in mathbbR^q
begincases
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endcases
endgather*
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a
using [\
noindentbeginminipagetextwidth
noindent[
min_tau in mathbbR tau\
]
s.t.
beginsubnumcases
forall w in dom f^*, exists lambda in mathbbR^q
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
endminipage
enddocument
I'd probably just use cases but if you definitely want the subnumcases layout you could use a minipage to keep things together.


documentclassarticle
usepackagemathtools,amsfonts,cases
DeclareMathOperatordomdom
begindocument
using gather
begingather*
min_tau in mathbbR tau\
shortintertexts.t.
forall w in dom f^*, exists lambda in mathbbR^q
begincases
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endcases
endgather*
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a\a\a\a\a\a\
a\a\a
using [\
noindentbeginminipagetextwidth
noindent[
min_tau in mathbbR tau\
]
s.t.
beginsubnumcases
forall w in dom f^*, exists lambda in mathbbR^q
d^top lambda + w^top b - f^*(w) leq 0 \
D^top lambda geq A^top w \
lambda geq mathbf0
endsubnumcases
endminipage
enddocument
answered May 5 at 20:41
David CarlisleDavid Carlisle
504k4211501901
504k4211501901
add a comment |
add a comment |
I propose this variant layout, using the facilities of the optidef package, dedicated to the layout of optimisation problems:
documentclassarticle
usepackagemathtools, amsfonts
usepackage[short]optidef
usepackagecleveref
DeclareMathOperatordomdom
begindocument
beginmini!
mathclaptauinmathbbRtau notag
addConstraint d^top lambda + w^top b - f^*(w) leq 0labeleqa
addConstraintforall w in dom f^*, exists lambda in mathbbR^q:smashbegincases\\\endcaseshspace*-1emD^top lambda geq A^top w labeleqb
addConstraintlambda geq mathbf0labeleqc
endmini!
We can see from crefeqa,eqb,eqc
enddocument

That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
1
I tried to usesubnumcasesas a ‘subenvironment’ once (somewhat likealigned), but wasn't able to do it (this doesn't prove it's impossible, though).
– Bernard
May 5 at 20:28
add a comment |
I propose this variant layout, using the facilities of the optidef package, dedicated to the layout of optimisation problems:
documentclassarticle
usepackagemathtools, amsfonts
usepackage[short]optidef
usepackagecleveref
DeclareMathOperatordomdom
begindocument
beginmini!
mathclaptauinmathbbRtau notag
addConstraint d^top lambda + w^top b - f^*(w) leq 0labeleqa
addConstraintforall w in dom f^*, exists lambda in mathbbR^q:smashbegincases\\\endcaseshspace*-1emD^top lambda geq A^top w labeleqb
addConstraintlambda geq mathbf0labeleqc
endmini!
We can see from crefeqa,eqb,eqc
enddocument

That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
1
I tried to usesubnumcasesas a ‘subenvironment’ once (somewhat likealigned), but wasn't able to do it (this doesn't prove it's impossible, though).
– Bernard
May 5 at 20:28
add a comment |
I propose this variant layout, using the facilities of the optidef package, dedicated to the layout of optimisation problems:
documentclassarticle
usepackagemathtools, amsfonts
usepackage[short]optidef
usepackagecleveref
DeclareMathOperatordomdom
begindocument
beginmini!
mathclaptauinmathbbRtau notag
addConstraint d^top lambda + w^top b - f^*(w) leq 0labeleqa
addConstraintforall w in dom f^*, exists lambda in mathbbR^q:smashbegincases\\\endcaseshspace*-1emD^top lambda geq A^top w labeleqb
addConstraintlambda geq mathbf0labeleqc
endmini!
We can see from crefeqa,eqb,eqc
enddocument

I propose this variant layout, using the facilities of the optidef package, dedicated to the layout of optimisation problems:
documentclassarticle
usepackagemathtools, amsfonts
usepackage[short]optidef
usepackagecleveref
DeclareMathOperatordomdom
begindocument
beginmini!
mathclaptauinmathbbRtau notag
addConstraint d^top lambda + w^top b - f^*(w) leq 0labeleqa
addConstraintforall w in dom f^*, exists lambda in mathbbR^q:smashbegincases\\\endcaseshspace*-1emD^top lambda geq A^top w labeleqb
addConstraintlambda geq mathbf0labeleqc
endmini!
We can see from crefeqa,eqb,eqc
enddocument

answered May 5 at 20:23
BernardBernard
179k779211
179k779211
That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
1
I tried to usesubnumcasesas a ‘subenvironment’ once (somewhat likealigned), but wasn't able to do it (this doesn't prove it's impossible, though).
– Bernard
May 5 at 20:28
add a comment |
That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
1
I tried to usesubnumcasesas a ‘subenvironment’ once (somewhat likealigned), but wasn't able to do it (this doesn't prove it's impossible, though).
– Bernard
May 5 at 20:28
That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
That's very nice, but also hard :) I will look for the documentation of optidef!
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
Also, do you think it is impossible to merge the align* and subnumcases parts of my code?
– aslv95
May 5 at 20:25
1
1
I tried to use
subnumcases as a ‘subenvironment’ once (somewhat like aligned), but wasn't able to do it (this doesn't prove it's impossible, though).– Bernard
May 5 at 20:28
I tried to use
subnumcases as a ‘subenvironment’ once (somewhat like aligned), but wasn't able to do it (this doesn't prove it's impossible, though).– Bernard
May 5 at 20:28
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%2f489334%2fsubnumcases-as-a-part-of-align%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
True, this is a part from a big project so I couldn't copy-paste the relevant packages. Now I am fixing it.
– aslv95
May 5 at 20:02
Fixed them all, now working on DeclareMathOperator. Do you have any idea about how I can combine the align* term and subcases term? Thank you
– aslv95
May 5 at 20:09
1
thanls for completing the example (although it doesn't allow anyone to comment on the
labelissue which is presumably a problem in an earlierbeginproblemleaking thelabelinformation?– David Carlisle
May 5 at 20:14
It is very hard to illustrate the label-ref issue for me because I need to give a full page where this problem will be separated due to the issue I mention etc. I will try to also give a convenient example of this.
– aslv95
May 5 at 20:19