let aligned blocks float left in align*












1















I'm using align* to comment some equations:



begin{align*}
&loooooooooooooooooooooooooooooooong \
&short, &comment 1 \
¬ so; short, &comment 2 \
end{align*}


It produces this output:



enter image description here



I would like to have the two comments float left, under the looooong part. Ideally, it should look somewhat like this (I hacked this output together by inserting lots of ; in front of the first comment):



enter image description here



How can I get this behaviour ?



Please note: I'm using text here, but that's just to produce a more readable example. Actually I'm using align for long and ugly equations. So the solution should work in math mode.










share|improve this question



























    1















    I'm using align* to comment some equations:



    begin{align*}
    &loooooooooooooooooooooooooooooooong \
    &short, &comment 1 \
    ¬ so; short, &comment 2 \
    end{align*}


    It produces this output:



    enter image description here



    I would like to have the two comments float left, under the looooong part. Ideally, it should look somewhat like this (I hacked this output together by inserting lots of ; in front of the first comment):



    enter image description here



    How can I get this behaviour ?



    Please note: I'm using text here, but that's just to produce a more readable example. Actually I'm using align for long and ugly equations. So the solution should work in math mode.










    share|improve this question

























      1












      1








      1








      I'm using align* to comment some equations:



      begin{align*}
      &loooooooooooooooooooooooooooooooong \
      &short, &comment 1 \
      ¬ so; short, &comment 2 \
      end{align*}


      It produces this output:



      enter image description here



      I would like to have the two comments float left, under the looooong part. Ideally, it should look somewhat like this (I hacked this output together by inserting lots of ; in front of the first comment):



      enter image description here



      How can I get this behaviour ?



      Please note: I'm using text here, but that's just to produce a more readable example. Actually I'm using align for long and ugly equations. So the solution should work in math mode.










      share|improve this question














      I'm using align* to comment some equations:



      begin{align*}
      &loooooooooooooooooooooooooooooooong \
      &short, &comment 1 \
      ¬ so; short, &comment 2 \
      end{align*}


      It produces this output:



      enter image description here



      I would like to have the two comments float left, under the looooong part. Ideally, it should look somewhat like this (I hacked this output together by inserting lots of ; in front of the first comment):



      enter image description here



      How can I get this behaviour ?



      Please note: I'm using text here, but that's just to produce a more readable example. Actually I'm using align for long and ugly equations. So the solution should work in math mode.







      math-mode horizontal-alignment align amsmath






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 23 '18 at 12:53









      lhklhk

      1065




      1065






















          2 Answers
          2






          active

          oldest

          votes


















          3














          You can use aligned inside of align* like this:



          documentclass{article}
          usepackage{amsmath}

          begin{document}

          begin{align*}
          & loooooooooooooooooooooooooooooooong \
          &begin{aligned}[t]
          & short, & comment 1 \
          & not; so; short, & comment 2 \
          end{aligned}
          end{align*}

          end{document}



          enter image description here







          share|improve this answer
























          • You beat me by a minute...

            – Mico
            Dec 23 '18 at 13:14



















          1














          Here is a possibility with alignat* and mathrlap from mathtools. What should be ‘rlapped’ has to be decided in each case:



          documentclass{article}
          usepackage[utf8]{inputenc}%
          usepackage{mathtools}

          begin{document}

          begin{alignat*}{2}
          &lmathrlap{oooooooooooooooooooooooooooooooong} \
          &short, &qquad & text{comment 1} \
          ¬ so; short, & & text{comment 2} \
          end{alignat*}

          end{document} stackrel{uparrow\k}


          enter image description here






          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%2f467100%2flet-aligned-blocks-float-left-in-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









            3














            You can use aligned inside of align* like this:



            documentclass{article}
            usepackage{amsmath}

            begin{document}

            begin{align*}
            & loooooooooooooooooooooooooooooooong \
            &begin{aligned}[t]
            & short, & comment 1 \
            & not; so; short, & comment 2 \
            end{aligned}
            end{align*}

            end{document}



            enter image description here







            share|improve this answer
























            • You beat me by a minute...

              – Mico
              Dec 23 '18 at 13:14
















            3














            You can use aligned inside of align* like this:



            documentclass{article}
            usepackage{amsmath}

            begin{document}

            begin{align*}
            & loooooooooooooooooooooooooooooooong \
            &begin{aligned}[t]
            & short, & comment 1 \
            & not; so; short, & comment 2 \
            end{aligned}
            end{align*}

            end{document}



            enter image description here







            share|improve this answer
























            • You beat me by a minute...

              – Mico
              Dec 23 '18 at 13:14














            3












            3








            3







            You can use aligned inside of align* like this:



            documentclass{article}
            usepackage{amsmath}

            begin{document}

            begin{align*}
            & loooooooooooooooooooooooooooooooong \
            &begin{aligned}[t]
            & short, & comment 1 \
            & not; so; short, & comment 2 \
            end{aligned}
            end{align*}

            end{document}



            enter image description here







            share|improve this answer













            You can use aligned inside of align* like this:



            documentclass{article}
            usepackage{amsmath}

            begin{document}

            begin{align*}
            & loooooooooooooooooooooooooooooooong \
            &begin{aligned}[t]
            & short, & comment 1 \
            & not; so; short, & comment 2 \
            end{aligned}
            end{align*}

            end{document}



            enter image description here








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 23 '18 at 13:12









            AboAmmarAboAmmar

            33.5k22883




            33.5k22883













            • You beat me by a minute...

              – Mico
              Dec 23 '18 at 13:14



















            • You beat me by a minute...

              – Mico
              Dec 23 '18 at 13:14

















            You beat me by a minute...

            – Mico
            Dec 23 '18 at 13:14





            You beat me by a minute...

            – Mico
            Dec 23 '18 at 13:14











            1














            Here is a possibility with alignat* and mathrlap from mathtools. What should be ‘rlapped’ has to be decided in each case:



            documentclass{article}
            usepackage[utf8]{inputenc}%
            usepackage{mathtools}

            begin{document}

            begin{alignat*}{2}
            &lmathrlap{oooooooooooooooooooooooooooooooong} \
            &short, &qquad & text{comment 1} \
            ¬ so; short, & & text{comment 2} \
            end{alignat*}

            end{document} stackrel{uparrow\k}


            enter image description here






            share|improve this answer




























              1














              Here is a possibility with alignat* and mathrlap from mathtools. What should be ‘rlapped’ has to be decided in each case:



              documentclass{article}
              usepackage[utf8]{inputenc}%
              usepackage{mathtools}

              begin{document}

              begin{alignat*}{2}
              &lmathrlap{oooooooooooooooooooooooooooooooong} \
              &short, &qquad & text{comment 1} \
              ¬ so; short, & & text{comment 2} \
              end{alignat*}

              end{document} stackrel{uparrow\k}


              enter image description here






              share|improve this answer


























                1












                1








                1







                Here is a possibility with alignat* and mathrlap from mathtools. What should be ‘rlapped’ has to be decided in each case:



                documentclass{article}
                usepackage[utf8]{inputenc}%
                usepackage{mathtools}

                begin{document}

                begin{alignat*}{2}
                &lmathrlap{oooooooooooooooooooooooooooooooong} \
                &short, &qquad & text{comment 1} \
                ¬ so; short, & & text{comment 2} \
                end{alignat*}

                end{document} stackrel{uparrow\k}


                enter image description here






                share|improve this answer













                Here is a possibility with alignat* and mathrlap from mathtools. What should be ‘rlapped’ has to be decided in each case:



                documentclass{article}
                usepackage[utf8]{inputenc}%
                usepackage{mathtools}

                begin{document}

                begin{alignat*}{2}
                &lmathrlap{oooooooooooooooooooooooooooooooong} \
                &short, &qquad & text{comment 1} \
                ¬ so; short, & & text{comment 2} \
                end{alignat*}

                end{document} stackrel{uparrow\k}


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 23 '18 at 13:15









                BernardBernard

                167k770195




                167k770195






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f467100%2flet-aligned-blocks-float-left-in-align%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

                    If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                    Alcedinidae

                    Can an atomic nucleus contain both particles and antiparticles? [duplicate]