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 4 hours ago









      lhk

      1065




      1065






















          2 Answers
          2






          active

          oldest

          votes


















          2














          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
            4 hours ago



















          0














          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









            2














            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
              4 hours ago
















            2














            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
              4 hours ago














            2












            2








            2






            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 4 hours ago









            AboAmmar

            32.6k22882




            32.6k22882












            • You beat me by a minute...
              – Mico
              4 hours ago


















            • You beat me by a minute...
              – Mico
              4 hours ago
















            You beat me by a minute...
            – Mico
            4 hours ago




            You beat me by a minute...
            – Mico
            4 hours ago











            0














            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


























              0














              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
























                0












                0








                0






                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 4 hours ago









                Bernard

                165k769193




                165k769193






























                    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%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

                    404 Error Contact Form 7 ajax form submitting

                    How to know if a Active Directory user can login interactively

                    TypeError: fit_transform() missing 1 required positional argument: 'X'