Nested cases, alignment and numbering

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












6














Sought result except with numbering for the three different equations within the aligned subenvironment



I have tried all different sorts of solutions including align, aligned, cases and equation to have the result I get with this code except that I want numbering for the three lines in the aligned subenvironment. Do you have a solution or better way of representing this?



beginequation
left{
beginaligned
partial_t u(vecx,t) - alpha Delta u(vecx,t) &= f(vecx), &&(vecx,t) in Omega times J, \
%
u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
%
u(vecx,0) &=
begincases
rho, &vecx in T \
0, &vecx in B textbackslash T
endcases
&&vecx in B
endaligned
right.
endequation









share|improve this question


























    6














    Sought result except with numbering for the three different equations within the aligned subenvironment



    I have tried all different sorts of solutions including align, aligned, cases and equation to have the result I get with this code except that I want numbering for the three lines in the aligned subenvironment. Do you have a solution or better way of representing this?



    beginequation
    left{
    beginaligned
    partial_t u(vecx,t) - alpha Delta u(vecx,t) &= f(vecx), &&(vecx,t) in Omega times J, \
    %
    u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
    %
    u(vecx,0) &=
    begincases
    rho, &vecx in T \
    0, &vecx in B textbackslash T
    endcases
    &&vecx in B
    endaligned
    right.
    endequation









    share|improve this question
























      6












      6








      6







      Sought result except with numbering for the three different equations within the aligned subenvironment



      I have tried all different sorts of solutions including align, aligned, cases and equation to have the result I get with this code except that I want numbering for the three lines in the aligned subenvironment. Do you have a solution or better way of representing this?



      beginequation
      left{
      beginaligned
      partial_t u(vecx,t) - alpha Delta u(vecx,t) &= f(vecx), &&(vecx,t) in Omega times J, \
      %
      u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
      %
      u(vecx,0) &=
      begincases
      rho, &vecx in T \
      0, &vecx in B textbackslash T
      endcases
      &&vecx in B
      endaligned
      right.
      endequation









      share|improve this question













      Sought result except with numbering for the three different equations within the aligned subenvironment



      I have tried all different sorts of solutions including align, aligned, cases and equation to have the result I get with this code except that I want numbering for the three lines in the aligned subenvironment. Do you have a solution or better way of representing this?



      beginequation
      left{
      beginaligned
      partial_t u(vecx,t) - alpha Delta u(vecx,t) &= f(vecx), &&(vecx,t) in Omega times J, \
      %
      u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
      %
      u(vecx,0) &=
      begincases
      rho, &vecx in T \
      0, &vecx in B textbackslash T
      endcases
      &&vecx in B
      endaligned
      right.
      endequation






      numbering align cases nesting alignment






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 10 at 19:06









      Robin Hellmers

      969




      969




















          2 Answers
          2






          active

          oldest

          votes


















          6














          With the use of the empheq package:



          documentclassarticle

          usepackageempheq
          begindocument
          beginempheq[left=empheqlbrace]align
          partial_t u(vecx,t) - alpha Delta u(vecx,t)
          &= f(vecx), &&(vecx,t) in Omega times J, \
          %
          u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
          %
          u(vecx,0)
          & = begincases
          rho, &vecx in T \
          0, &vecx in B setminus T
          endcases
          &&vecx in B
          endempheq
          enddocument


          enter image description here






          share|improve this answer


















          • 1




            Don't use textbackslash. Use setminus instead.
            – Mico
            Dec 10 at 19:24










          • @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
            – Zarko
            Dec 10 at 19:46










          • @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
            – Robin Hellmers
            Dec 10 at 19:51










          • @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
            – Mico
            Dec 10 at 20:58


















          7














          I don't think that much is gained by aligning the three equations on their respective = symbols. I'd left-align the expressions, using a numcases environment.



          enter image description here



          documentclassarticle
          usepackagenewtxtext,newtxmath,mathrsfs % optional
          usepackagecases % for 'numcases' env.
          begindocument
          beginnumcases
          partial_t u(vecx,t) - alphaDelta u(vecx,t) = f(vecx),
          &$(vecx,t)inOmegatimes J$, \
          u(vecx,t) = 0,
          &$(vecx,t)inpartialOmegatimes J$, \
          u(vecx,0) =
          left{beginarray@ll@
          rho, &vecx inmathscrT \
          0, &vecx inmathscrBsetminus mathscrT
          endarrayright.
          &$vecx inmathscrB$
          endnumcases
          enddocument





          share|improve this answer






















            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
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464189%2fnested-cases-alignment-and-numbering%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









            6














            With the use of the empheq package:



            documentclassarticle

            usepackageempheq
            begindocument
            beginempheq[left=empheqlbrace]align
            partial_t u(vecx,t) - alpha Delta u(vecx,t)
            &= f(vecx), &&(vecx,t) in Omega times J, \
            %
            u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
            %
            u(vecx,0)
            & = begincases
            rho, &vecx in T \
            0, &vecx in B setminus T
            endcases
            &&vecx in B
            endempheq
            enddocument


            enter image description here






            share|improve this answer


















            • 1




              Don't use textbackslash. Use setminus instead.
              – Mico
              Dec 10 at 19:24










            • @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
              – Zarko
              Dec 10 at 19:46










            • @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
              – Robin Hellmers
              Dec 10 at 19:51










            • @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
              – Mico
              Dec 10 at 20:58















            6














            With the use of the empheq package:



            documentclassarticle

            usepackageempheq
            begindocument
            beginempheq[left=empheqlbrace]align
            partial_t u(vecx,t) - alpha Delta u(vecx,t)
            &= f(vecx), &&(vecx,t) in Omega times J, \
            %
            u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
            %
            u(vecx,0)
            & = begincases
            rho, &vecx in T \
            0, &vecx in B setminus T
            endcases
            &&vecx in B
            endempheq
            enddocument


            enter image description here






            share|improve this answer


















            • 1




              Don't use textbackslash. Use setminus instead.
              – Mico
              Dec 10 at 19:24










            • @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
              – Zarko
              Dec 10 at 19:46










            • @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
              – Robin Hellmers
              Dec 10 at 19:51










            • @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
              – Mico
              Dec 10 at 20:58













            6












            6








            6






            With the use of the empheq package:



            documentclassarticle

            usepackageempheq
            begindocument
            beginempheq[left=empheqlbrace]align
            partial_t u(vecx,t) - alpha Delta u(vecx,t)
            &= f(vecx), &&(vecx,t) in Omega times J, \
            %
            u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
            %
            u(vecx,0)
            & = begincases
            rho, &vecx in T \
            0, &vecx in B setminus T
            endcases
            &&vecx in B
            endempheq
            enddocument


            enter image description here






            share|improve this answer














            With the use of the empheq package:



            documentclassarticle

            usepackageempheq
            begindocument
            beginempheq[left=empheqlbrace]align
            partial_t u(vecx,t) - alpha Delta u(vecx,t)
            &= f(vecx), &&(vecx,t) in Omega times J, \
            %
            u(vecx,t) &= 0, &&(vecx,t) in partial Omega times J, \
            %
            u(vecx,0)
            & = begincases
            rho, &vecx in T \
            0, &vecx in B setminus T
            endcases
            &&vecx in B
            endempheq
            enddocument


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 10 at 19:57









            Werner

            436k629571645




            436k629571645










            answered Dec 10 at 19:18









            Zarko

            120k865155




            120k865155







            • 1




              Don't use textbackslash. Use setminus instead.
              – Mico
              Dec 10 at 19:24










            • @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
              – Zarko
              Dec 10 at 19:46










            • @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
              – Robin Hellmers
              Dec 10 at 19:51










            • @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
              – Mico
              Dec 10 at 20:58












            • 1




              Don't use textbackslash. Use setminus instead.
              – Mico
              Dec 10 at 19:24










            • @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
              – Zarko
              Dec 10 at 19:46










            • @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
              – Robin Hellmers
              Dec 10 at 19:51










            • @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
              – Mico
              Dec 10 at 20:58







            1




            1




            Don't use textbackslash. Use setminus instead.
            – Mico
            Dec 10 at 19:24




            Don't use textbackslash. Use setminus instead.
            – Mico
            Dec 10 at 19:24












            @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
            – Zarko
            Dec 10 at 19:46




            @Mico, ups, i didn't check used symbols :-(. corrected now. thank you very much!
            – Zarko
            Dec 10 at 19:46












            @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
            – Robin Hellmers
            Dec 10 at 19:51




            @Mico, do you have an short explanation of why to use setminus instead of textbackslash?
            – Robin Hellmers
            Dec 10 at 19:51












            @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
            – Mico
            Dec 10 at 20:58




            @RobinHellmers - textbackslash is a text-mode command. In contrast, setminus is a math-mode command. In your screenshot, note that the spacing around the backslash character is too tight, when compared to the screenshots posted by Zarko and myself.
            – Mico
            Dec 10 at 20:58











            7














            I don't think that much is gained by aligning the three equations on their respective = symbols. I'd left-align the expressions, using a numcases environment.



            enter image description here



            documentclassarticle
            usepackagenewtxtext,newtxmath,mathrsfs % optional
            usepackagecases % for 'numcases' env.
            begindocument
            beginnumcases
            partial_t u(vecx,t) - alphaDelta u(vecx,t) = f(vecx),
            &$(vecx,t)inOmegatimes J$, \
            u(vecx,t) = 0,
            &$(vecx,t)inpartialOmegatimes J$, \
            u(vecx,0) =
            left{beginarray@ll@
            rho, &vecx inmathscrT \
            0, &vecx inmathscrBsetminus mathscrT
            endarrayright.
            &$vecx inmathscrB$
            endnumcases
            enddocument





            share|improve this answer



























              7














              I don't think that much is gained by aligning the three equations on their respective = symbols. I'd left-align the expressions, using a numcases environment.



              enter image description here



              documentclassarticle
              usepackagenewtxtext,newtxmath,mathrsfs % optional
              usepackagecases % for 'numcases' env.
              begindocument
              beginnumcases
              partial_t u(vecx,t) - alphaDelta u(vecx,t) = f(vecx),
              &$(vecx,t)inOmegatimes J$, \
              u(vecx,t) = 0,
              &$(vecx,t)inpartialOmegatimes J$, \
              u(vecx,0) =
              left{beginarray@ll@
              rho, &vecx inmathscrT \
              0, &vecx inmathscrBsetminus mathscrT
              endarrayright.
              &$vecx inmathscrB$
              endnumcases
              enddocument





              share|improve this answer

























                7












                7








                7






                I don't think that much is gained by aligning the three equations on their respective = symbols. I'd left-align the expressions, using a numcases environment.



                enter image description here



                documentclassarticle
                usepackagenewtxtext,newtxmath,mathrsfs % optional
                usepackagecases % for 'numcases' env.
                begindocument
                beginnumcases
                partial_t u(vecx,t) - alphaDelta u(vecx,t) = f(vecx),
                &$(vecx,t)inOmegatimes J$, \
                u(vecx,t) = 0,
                &$(vecx,t)inpartialOmegatimes J$, \
                u(vecx,0) =
                left{beginarray@ll@
                rho, &vecx inmathscrT \
                0, &vecx inmathscrBsetminus mathscrT
                endarrayright.
                &$vecx inmathscrB$
                endnumcases
                enddocument





                share|improve this answer














                I don't think that much is gained by aligning the three equations on their respective = symbols. I'd left-align the expressions, using a numcases environment.



                enter image description here



                documentclassarticle
                usepackagenewtxtext,newtxmath,mathrsfs % optional
                usepackagecases % for 'numcases' env.
                begindocument
                beginnumcases
                partial_t u(vecx,t) - alphaDelta u(vecx,t) = f(vecx),
                &$(vecx,t)inOmegatimes J$, \
                u(vecx,t) = 0,
                &$(vecx,t)inpartialOmegatimes J$, \
                u(vecx,0) =
                left{beginarray@ll@
                rho, &vecx inmathscrT \
                0, &vecx inmathscrBsetminus mathscrT
                endarrayright.
                &$vecx inmathscrB$
                endnumcases
                enddocument






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 10 at 21:04

























                answered Dec 10 at 19:23









                Mico

                273k30369756




                273k30369756



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464189%2fnested-cases-alignment-and-numbering%23new-answer', 'question_page');

                    );

                    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






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay