Is it possible to flushright the right-hand side with systeme without hphantom?











up vote
3
down vote

favorite












I typeset some systems of equations, and I really like the format of input (as well as the output) the systeme package provides.



Now, I wonder if there is a way to flushright also the right-hand side of the equation, without using hphantom? In the example below, I get the result as I want in the second system, but not the first. But I do it with a hphantom.



 documentclass{minimal}
usepackage{systeme}
begin{document}
[
systeme{x+y=2,x-y=-2}
]
[
systeme{x+y=hphantom{-}2,x-y=-2}
]
end{document}


giving



The output of the example



Update



Just in case someone wonders why on earth one would like to have the right-hand side flushright, here is an image that might explain it better. Without the right-hand side being flushright, the arrows look bad not ending at the same horizontal location.



showcase



Also, I can mention that I have read the documentation of the systeme package, and I did not find anything like this (but my french is rusty). I also browsed the source of the package, but that was too complicated for me...










share|improve this question




























    up vote
    3
    down vote

    favorite












    I typeset some systems of equations, and I really like the format of input (as well as the output) the systeme package provides.



    Now, I wonder if there is a way to flushright also the right-hand side of the equation, without using hphantom? In the example below, I get the result as I want in the second system, but not the first. But I do it with a hphantom.



     documentclass{minimal}
    usepackage{systeme}
    begin{document}
    [
    systeme{x+y=2,x-y=-2}
    ]
    [
    systeme{x+y=hphantom{-}2,x-y=-2}
    ]
    end{document}


    giving



    The output of the example



    Update



    Just in case someone wonders why on earth one would like to have the right-hand side flushright, here is an image that might explain it better. Without the right-hand side being flushright, the arrows look bad not ending at the same horizontal location.



    showcase



    Also, I can mention that I have read the documentation of the systeme package, and I did not find anything like this (but my french is rusty). I also browsed the source of the package, but that was too complicated for me...










    share|improve this question


























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I typeset some systems of equations, and I really like the format of input (as well as the output) the systeme package provides.



      Now, I wonder if there is a way to flushright also the right-hand side of the equation, without using hphantom? In the example below, I get the result as I want in the second system, but not the first. But I do it with a hphantom.



       documentclass{minimal}
      usepackage{systeme}
      begin{document}
      [
      systeme{x+y=2,x-y=-2}
      ]
      [
      systeme{x+y=hphantom{-}2,x-y=-2}
      ]
      end{document}


      giving



      The output of the example



      Update



      Just in case someone wonders why on earth one would like to have the right-hand side flushright, here is an image that might explain it better. Without the right-hand side being flushright, the arrows look bad not ending at the same horizontal location.



      showcase



      Also, I can mention that I have read the documentation of the systeme package, and I did not find anything like this (but my french is rusty). I also browsed the source of the package, but that was too complicated for me...










      share|improve this question















      I typeset some systems of equations, and I really like the format of input (as well as the output) the systeme package provides.



      Now, I wonder if there is a way to flushright also the right-hand side of the equation, without using hphantom? In the example below, I get the result as I want in the second system, but not the first. But I do it with a hphantom.



       documentclass{minimal}
      usepackage{systeme}
      begin{document}
      [
      systeme{x+y=2,x-y=-2}
      ]
      [
      systeme{x+y=hphantom{-}2,x-y=-2}
      ]
      end{document}


      giving



      The output of the example



      Update



      Just in case someone wonders why on earth one would like to have the right-hand side flushright, here is an image that might explain it better. Without the right-hand side being flushright, the arrows look bad not ending at the same horizontal location.



      showcase



      Also, I can mention that I have read the documentation of the systeme package, and I did not find anything like this (but my french is rusty). I also browsed the source of the package, but that was too complicated for me...







      horizontal-alignment systeme






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 26 '15 at 19:27

























      asked May 26 '15 at 19:01









      mickep

      1,138815




      1,138815






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          It's a choice of the package to have the last column aligned left and, as far as I can see, there's no provision for changing it by setting an option.



          You can change it by redefining the command SYS@makesyspreamble@i that's responsible for setting the alignment in columns; the simplest way is to use regexpatch:



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}% left alignment
          {hfil$##$null}% right alignment
          {}{}
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          enter image description here



          Should you need to switch between left and right alignment, here's how to do it.



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}
          {spanSYSX@afterequalalignmentnull}
          {}{}
          newcommand{SYSX@afterequalalignmentleft}{$##$hfil}% default
          newcommand{SYSX@afterequalalignmentright}{hfil$##$}% default
          newcommand{rightalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentright
          }
          newcommand{leftalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentleft
          }
          leftalignafterequal % default
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]
          [
          rightalignafterequal
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          The rightalignafterequal declaration obeys the usual scoping rules, so you can issue it in the preamble if you want all systems to have right alignment.



          enter image description here






          share|improve this answer























          • Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
            – mickep
            May 26 '15 at 20:20










          • Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
            – mickep
            May 27 '15 at 7:18


















          up vote
          0
          down vote













          How to make these arrows in the systeme?






          share|improve this answer








          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
            – Zarko
            7 mins ago











          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',
          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%2f247070%2fis-it-possible-to-flushright-the-right-hand-side-with-systeme-without-hphantom%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








          up vote
          4
          down vote



          accepted










          It's a choice of the package to have the last column aligned left and, as far as I can see, there's no provision for changing it by setting an option.



          You can change it by redefining the command SYS@makesyspreamble@i that's responsible for setting the alignment in columns; the simplest way is to use regexpatch:



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}% left alignment
          {hfil$##$null}% right alignment
          {}{}
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          enter image description here



          Should you need to switch between left and right alignment, here's how to do it.



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}
          {spanSYSX@afterequalalignmentnull}
          {}{}
          newcommand{SYSX@afterequalalignmentleft}{$##$hfil}% default
          newcommand{SYSX@afterequalalignmentright}{hfil$##$}% default
          newcommand{rightalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentright
          }
          newcommand{leftalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentleft
          }
          leftalignafterequal % default
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]
          [
          rightalignafterequal
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          The rightalignafterequal declaration obeys the usual scoping rules, so you can issue it in the preamble if you want all systems to have right alignment.



          enter image description here






          share|improve this answer























          • Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
            – mickep
            May 26 '15 at 20:20










          • Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
            – mickep
            May 27 '15 at 7:18















          up vote
          4
          down vote



          accepted










          It's a choice of the package to have the last column aligned left and, as far as I can see, there's no provision for changing it by setting an option.



          You can change it by redefining the command SYS@makesyspreamble@i that's responsible for setting the alignment in columns; the simplest way is to use regexpatch:



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}% left alignment
          {hfil$##$null}% right alignment
          {}{}
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          enter image description here



          Should you need to switch between left and right alignment, here's how to do it.



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}
          {spanSYSX@afterequalalignmentnull}
          {}{}
          newcommand{SYSX@afterequalalignmentleft}{$##$hfil}% default
          newcommand{SYSX@afterequalalignmentright}{hfil$##$}% default
          newcommand{rightalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentright
          }
          newcommand{leftalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentleft
          }
          leftalignafterequal % default
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]
          [
          rightalignafterequal
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          The rightalignafterequal declaration obeys the usual scoping rules, so you can issue it in the preamble if you want all systems to have right alignment.



          enter image description here






          share|improve this answer























          • Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
            – mickep
            May 26 '15 at 20:20










          • Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
            – mickep
            May 27 '15 at 7:18













          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          It's a choice of the package to have the last column aligned left and, as far as I can see, there's no provision for changing it by setting an option.



          You can change it by redefining the command SYS@makesyspreamble@i that's responsible for setting the alignment in columns; the simplest way is to use regexpatch:



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}% left alignment
          {hfil$##$null}% right alignment
          {}{}
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          enter image description here



          Should you need to switch between left and right alignment, here's how to do it.



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}
          {spanSYSX@afterequalalignmentnull}
          {}{}
          newcommand{SYSX@afterequalalignmentleft}{$##$hfil}% default
          newcommand{SYSX@afterequalalignmentright}{hfil$##$}% default
          newcommand{rightalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentright
          }
          newcommand{leftalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentleft
          }
          leftalignafterequal % default
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]
          [
          rightalignafterequal
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          The rightalignafterequal declaration obeys the usual scoping rules, so you can issue it in the preamble if you want all systems to have right alignment.



          enter image description here






          share|improve this answer














          It's a choice of the package to have the last column aligned left and, as far as I can see, there's no provision for changing it by setting an option.



          You can change it by redefining the command SYS@makesyspreamble@i that's responsible for setting the alignment in columns; the simplest way is to use regexpatch:



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}% left alignment
          {hfil$##$null}% right alignment
          {}{}
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          enter image description here



          Should you need to switch between left and right alignment, here's how to do it.



          documentclass{article}

          usepackage{systeme}
          usepackage{regexpatch}

          makeatletter
          xpatchcmd{SYS@makesyspreamble@i}
          {$##$hfilnull}
          {spanSYSX@afterequalalignmentnull}
          {}{}
          newcommand{SYSX@afterequalalignmentleft}{$##$hfil}% default
          newcommand{SYSX@afterequalalignmentright}{hfil$##$}% default
          newcommand{rightalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentright
          }
          newcommand{leftalignafterequal}{%
          letSYSX@afterequalalignmentSYSX@afterequalalignmentleft
          }
          leftalignafterequal % default
          makeatother

          begin{document}

          [
          systeme{x+y=2,x-y=-2}
          ]
          [
          rightalignafterequal
          systeme{x+y=2,x-y=-2}
          ]

          end{document}


          The rightalignafterequal declaration obeys the usual scoping rules, so you can issue it in the preamble if you want all systems to have right alignment.



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 26 '15 at 20:22

























          answered May 26 '15 at 20:12









          egreg

          703k8618733148




          703k8618733148












          • Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
            – mickep
            May 26 '15 at 20:20










          • Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
            – mickep
            May 27 '15 at 7:18


















          • Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
            – mickep
            May 26 '15 at 20:20










          • Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
            – mickep
            May 27 '15 at 7:18
















          Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
          – mickep
          May 26 '15 at 20:20




          Wonderful! This does exactly what I want (I will wait a while before accepting the answer, since I've been told to do so).
          – mickep
          May 26 '15 at 20:20












          Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
          – mickep
          May 27 '15 at 7:18




          Thanks for that update as well! I don't think I will need it, but maybe someone else who stumbles upon this question will. I will mark your answer as accepted, since it really solved my problem. Thanks again!
          – mickep
          May 27 '15 at 7:18










          up vote
          0
          down vote













          How to make these arrows in the systeme?






          share|improve this answer








          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
            – Zarko
            7 mins ago















          up vote
          0
          down vote













          How to make these arrows in the systeme?






          share|improve this answer








          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
            – Zarko
            7 mins ago













          up vote
          0
          down vote










          up vote
          0
          down vote









          How to make these arrows in the systeme?






          share|improve this answer








          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          How to make these arrows in the systeme?







          share|improve this answer








          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer






          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered 25 mins ago









          Eitor Bernardes de Paiva

          1




          1




          New contributor




          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          Eitor Bernardes de Paiva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.












          • this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
            – Zarko
            7 mins ago


















          • this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
            – Zarko
            7 mins ago
















          this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
          – Zarko
          7 mins ago




          this is not an answer. if you have new question, ask it as question, not as answer. for arrows see, if tikzmark can help you.
          – Zarko
          7 mins ago


















          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%2f247070%2fis-it-possible-to-flushright-the-right-hand-side-with-systeme-without-hphantom%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

          Lallio

          Futebolista

          Jornalista