How to align these two expressions, one has one more number?aligning a multiline formula with the bullet of itemizeSame height for list of comma-separated vectorsFirst paragraph in environment without indent or spaceNew command adding extra spaceHow to vertically align two or more random places of a document?A parbox inside a textblockExtra space between entries in references when putting them on one line using natbib's numbers optionAlignment of terms within align environment

What Australian Megafauna Would be Suitable for Domestication, if Any?

Moisture leaking out of chip in floor tile

Where to search for PhD level jobs in OR?

Is there a way to auto-resolve a fight and account for resource consumption?

Antonym for “boilerplate” or “cookie-cutter”

Wood glue versus epoxy for doweling stripped screw holes

What's the short and accented note at the very end of a song called?

Create a box using the tcolorbox package or any other? (image)

Countering an uncounterable spell, triggers, and state-based actions

Why are one-word titles so dominant in books, film, and games?

Why is double encryption that's equivalent to single encryption no better than single encryption?

What does exhaust smell on oil and transmission dipstick mean?

Is there a name for the phenomenon of false positives counterintuitively outstripping true positives

Rational Number RNG

Why do Climate activists attack public transport?

My professor has no direction

Dragons have an armor that is similar to that of sungazer lizards. Why would the dragons have the spikes as well?

My cat gets angry and scared at me if I stand

instead of pressurizing an entire spacesuit with oxygen could oxygen just pressurize the head and the rest of the body be pressurized with water?

Why is Robin Hood French in Shrek?

Covering an 8x8 grid with X pentominoes

How to answer to the "We do not want to create any precedent" argument in salary negotiation?

Would a nuclear weapon be morbidly efficient against an Antedeluvian?

Is Bcrypt a hashing algorithm or is my study material wrong?



How to align these two expressions, one has one more number?


aligning a multiline formula with the bullet of itemizeSame height for list of comma-separated vectorsFirst paragraph in environment without indent or spaceNew command adding extra spaceHow to vertically align two or more random places of a document?A parbox inside a textblockExtra space between entries in references when putting them on one line using natbib's numbers optionAlignment of terms within align environment






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









5

















I am trying to align (-(a-1)^2-1)x+(-(a-1)^2-1) and (-(a-1)^2-1)x+1 using phantom command. Since (-(a-1)^2-1)x+1 is missing the (-(a-1)^2-1) part, I added phantom(-(a-1)^2-1), but there is an extra space that I am not sure from were it comes:



MWE output



I guess it comes from adding the "1", but I do not know how to compensate this extra space.



MWE:



documentclassarticle

begindocument

[beginarrayc
(-(a-1)^2-1)x+(-(a-1)^2-1)\
(-(a-1)^2-1)x+phantom(-(a-1)^2-1)1
endarray]

enddocument


I want this output:



Output that I want



How to achieve it?










share|improve this question


































    5

















    I am trying to align (-(a-1)^2-1)x+(-(a-1)^2-1) and (-(a-1)^2-1)x+1 using phantom command. Since (-(a-1)^2-1)x+1 is missing the (-(a-1)^2-1) part, I added phantom(-(a-1)^2-1), but there is an extra space that I am not sure from were it comes:



    MWE output



    I guess it comes from adding the "1", but I do not know how to compensate this extra space.



    MWE:



    documentclassarticle

    begindocument

    [beginarrayc
    (-(a-1)^2-1)x+(-(a-1)^2-1)\
    (-(a-1)^2-1)x+phantom(-(a-1)^2-1)1
    endarray]

    enddocument


    I want this output:



    Output that I want



    How to achieve it?










    share|improve this question






























      5












      5








      5








      I am trying to align (-(a-1)^2-1)x+(-(a-1)^2-1) and (-(a-1)^2-1)x+1 using phantom command. Since (-(a-1)^2-1)x+1 is missing the (-(a-1)^2-1) part, I added phantom(-(a-1)^2-1), but there is an extra space that I am not sure from were it comes:



      MWE output



      I guess it comes from adding the "1", but I do not know how to compensate this extra space.



      MWE:



      documentclassarticle

      begindocument

      [beginarrayc
      (-(a-1)^2-1)x+(-(a-1)^2-1)\
      (-(a-1)^2-1)x+phantom(-(a-1)^2-1)1
      endarray]

      enddocument


      I want this output:



      Output that I want



      How to achieve it?










      share|improve this question

















      I am trying to align (-(a-1)^2-1)x+(-(a-1)^2-1) and (-(a-1)^2-1)x+1 using phantom command. Since (-(a-1)^2-1)x+1 is missing the (-(a-1)^2-1) part, I added phantom(-(a-1)^2-1), but there is an extra space that I am not sure from were it comes:



      MWE output



      I guess it comes from adding the "1", but I do not know how to compensate this extra space.



      MWE:



      documentclassarticle

      begindocument

      [beginarrayc
      (-(a-1)^2-1)x+(-(a-1)^2-1)\
      (-(a-1)^2-1)x+phantom(-(a-1)^2-1)1
      endarray]

      enddocument


      I want this output:



      Output that I want



      How to achieve it?







      spacing vertical-alignment phantom






      share|improve this question
















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 13 at 1:01







      manooooh

















      asked Oct 13 at 0:58









      manoooohmanooooh

      1,3691 gold badge5 silver badges20 bronze badges




      1,3691 gold badge5 silver badges20 bronze badges























          2 Answers
          2






          active

          oldest

          votes


















          5


















          You have to remove the 1 from the phantom, since it shows up explicitly outside the phantom. I replace it with placeholder.



          documentclassarticle

          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-)1
          endarray]

          enddocument


          enter image description here



          In response to a comment from the OP, I leave this also, to show what can be done when the phantom and residual term do not share common digits.



          documentclassarticle
          usepackagemathtools
          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-1)mathllap5-4+2^2
          endarray]

          enddocument


          enter image description here






          share|improve this answer




























          • Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

            – manooooh
            Oct 13 at 1:04







          • 1





            In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

            – Steven B. Segletes
            Oct 13 at 1:06



















          2


















          Add more alignment points:



          documentclassarticle
          usepackageamsmath
          usepackagearray

          begindocument

          [
          beginarray@ l @>c<@ r @
          (-(a-1)^2-1)x &+& (-(a-1)^2-1)\
          (-(a-1)^2-1)x &+& 1
          endarray
          ]

          enddocument


          enter image description here






          share|improve this answer


























          • Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

            – manooooh
            Oct 13 at 12:13













          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/4.0/"u003ecc by-sa 4.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%2f512035%2fhow-to-align-these-two-expressions-one-has-one-more-number%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









          5


















          You have to remove the 1 from the phantom, since it shows up explicitly outside the phantom. I replace it with placeholder.



          documentclassarticle

          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-)1
          endarray]

          enddocument


          enter image description here



          In response to a comment from the OP, I leave this also, to show what can be done when the phantom and residual term do not share common digits.



          documentclassarticle
          usepackagemathtools
          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-1)mathllap5-4+2^2
          endarray]

          enddocument


          enter image description here






          share|improve this answer




























          • Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

            – manooooh
            Oct 13 at 1:04







          • 1





            In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

            – Steven B. Segletes
            Oct 13 at 1:06
















          5


















          You have to remove the 1 from the phantom, since it shows up explicitly outside the phantom. I replace it with placeholder.



          documentclassarticle

          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-)1
          endarray]

          enddocument


          enter image description here



          In response to a comment from the OP, I leave this also, to show what can be done when the phantom and residual term do not share common digits.



          documentclassarticle
          usepackagemathtools
          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-1)mathllap5-4+2^2
          endarray]

          enddocument


          enter image description here






          share|improve this answer




























          • Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

            – manooooh
            Oct 13 at 1:04







          • 1





            In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

            – Steven B. Segletes
            Oct 13 at 1:06














          5














          5










          5









          You have to remove the 1 from the phantom, since it shows up explicitly outside the phantom. I replace it with placeholder.



          documentclassarticle

          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-)1
          endarray]

          enddocument


          enter image description here



          In response to a comment from the OP, I leave this also, to show what can be done when the phantom and residual term do not share common digits.



          documentclassarticle
          usepackagemathtools
          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-1)mathllap5-4+2^2
          endarray]

          enddocument


          enter image description here






          share|improve this answer
















          You have to remove the 1 from the phantom, since it shows up explicitly outside the phantom. I replace it with placeholder.



          documentclassarticle

          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-)1
          endarray]

          enddocument


          enter image description here



          In response to a comment from the OP, I leave this also, to show what can be done when the phantom and residual term do not share common digits.



          documentclassarticle
          usepackagemathtools
          begindocument

          [beginarrayc
          (-(a-1)^2-1)x+(-(a-1)^2-1)\
          (-(a-1)^2-1)x+phantom(-(a-1)^2-1)mathllap5-4+2^2
          endarray]

          enddocument


          enter image description here







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Oct 13 at 1:09

























          answered Oct 13 at 1:01









          Steven B. SegletesSteven B. Segletes

          172k9 gold badges218 silver badges447 bronze badges




          172k9 gold badges218 silver badges447 bronze badges















          • Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

            – manooooh
            Oct 13 at 1:04







          • 1





            In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

            – Steven B. Segletes
            Oct 13 at 1:06


















          • Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

            – manooooh
            Oct 13 at 1:04







          • 1





            In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

            – Steven B. Segletes
            Oct 13 at 1:06

















          Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

          – manooooh
          Oct 13 at 1:04






          Thank you, it worked! A side question: what if the second line has e.g. 5-4+2^2 instead of 1? There will be no more comparisons.

          – manooooh
          Oct 13 at 1:04





          1




          1





          In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

          – Steven B. Segletes
          Oct 13 at 1:06






          In that case, I would leave the original (complete) phantom and then use the mathtools package to place a mathllap5-4+2^2. Please see edit.

          – Steven B. Segletes
          Oct 13 at 1:06














          2


















          Add more alignment points:



          documentclassarticle
          usepackageamsmath
          usepackagearray

          begindocument

          [
          beginarray@ l @>c<@ r @
          (-(a-1)^2-1)x &+& (-(a-1)^2-1)\
          (-(a-1)^2-1)x &+& 1
          endarray
          ]

          enddocument


          enter image description here






          share|improve this answer


























          • Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

            – manooooh
            Oct 13 at 12:13
















          2


















          Add more alignment points:



          documentclassarticle
          usepackageamsmath
          usepackagearray

          begindocument

          [
          beginarray@ l @>c<@ r @
          (-(a-1)^2-1)x &+& (-(a-1)^2-1)\
          (-(a-1)^2-1)x &+& 1
          endarray
          ]

          enddocument


          enter image description here






          share|improve this answer


























          • Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

            – manooooh
            Oct 13 at 12:13














          2














          2










          2









          Add more alignment points:



          documentclassarticle
          usepackageamsmath
          usepackagearray

          begindocument

          [
          beginarray@ l @>c<@ r @
          (-(a-1)^2-1)x &+& (-(a-1)^2-1)\
          (-(a-1)^2-1)x &+& 1
          endarray
          ]

          enddocument


          enter image description here






          share|improve this answer














          Add more alignment points:



          documentclassarticle
          usepackageamsmath
          usepackagearray

          begindocument

          [
          beginarray@ l @>c<@ r @
          (-(a-1)^2-1)x &+& (-(a-1)^2-1)\
          (-(a-1)^2-1)x &+& 1
          endarray
          ]

          enddocument


          enter image description here







          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered Oct 13 at 9:30









          egregegreg

          776k92 gold badges2020 silver badges3382 bronze badges




          776k92 gold badges2020 silver badges3382 bronze badges















          • Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

            – manooooh
            Oct 13 at 12:13


















          • Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

            – manooooh
            Oct 13 at 12:13

















          Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

          – manooooh
          Oct 13 at 12:13






          Thank you! You have manipulated array arguments when I only need it for this question, but it is a good approach. I will have to study your array parameters more carefully to understand it.

          – manooooh
          Oct 13 at 12:13



















          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%2f512035%2fhow-to-align-these-two-expressions-one-has-one-more-number%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

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її