Long division spacing












2














Original thread. I want to make the long division represented with floating point, but i have strange results. The numbers are not aligned (with yellow). And some numbers are far away(red).
enter image description here



documentclass{article}
usepackage[TABcline]{tabstackengine}
TABstackMath
renewcommandstackalignment{l}
newcommandlminus{llap{$-$}}
{catcode`-=active
gdef -{lminus}}
newcommandminusactive{phantom{-}catcode`-=active}
setstacktabbedgap{3pt}
begin{document}
begin{tabular}{ll@{hspace{10ex}}c}

$
minusactive
tabbedShortunderstack[r]{
&7,&6&2&4&:4=1,815\
-&4&& &&&\
TABcline{2,3}
& &3&2&&&&\
&-&3&2&&&&\
TABcline{3,4}
& & & &6& &&\
& & &-&4& &&\
TABcline{5}
& & & & 2&0&\
& & & -& 2&0&\
TABcline{5}
& & & &0&
}
$

end{tabular}
end{document}









share|improve this question






















  • Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?
    – Mico
    3 hours ago










  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.
    – Simeon Simeonov
    2 hours ago
















2














Original thread. I want to make the long division represented with floating point, but i have strange results. The numbers are not aligned (with yellow). And some numbers are far away(red).
enter image description here



documentclass{article}
usepackage[TABcline]{tabstackengine}
TABstackMath
renewcommandstackalignment{l}
newcommandlminus{llap{$-$}}
{catcode`-=active
gdef -{lminus}}
newcommandminusactive{phantom{-}catcode`-=active}
setstacktabbedgap{3pt}
begin{document}
begin{tabular}{ll@{hspace{10ex}}c}

$
minusactive
tabbedShortunderstack[r]{
&7,&6&2&4&:4=1,815\
-&4&& &&&\
TABcline{2,3}
& &3&2&&&&\
&-&3&2&&&&\
TABcline{3,4}
& & & &6& &&\
& & &-&4& &&\
TABcline{5}
& & & & 2&0&\
& & & -& 2&0&\
TABcline{5}
& & & &0&
}
$

end{tabular}
end{document}









share|improve this question






















  • Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?
    – Mico
    3 hours ago










  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.
    – Simeon Simeonov
    2 hours ago














2












2








2







Original thread. I want to make the long division represented with floating point, but i have strange results. The numbers are not aligned (with yellow). And some numbers are far away(red).
enter image description here



documentclass{article}
usepackage[TABcline]{tabstackengine}
TABstackMath
renewcommandstackalignment{l}
newcommandlminus{llap{$-$}}
{catcode`-=active
gdef -{lminus}}
newcommandminusactive{phantom{-}catcode`-=active}
setstacktabbedgap{3pt}
begin{document}
begin{tabular}{ll@{hspace{10ex}}c}

$
minusactive
tabbedShortunderstack[r]{
&7,&6&2&4&:4=1,815\
-&4&& &&&\
TABcline{2,3}
& &3&2&&&&\
&-&3&2&&&&\
TABcline{3,4}
& & & &6& &&\
& & &-&4& &&\
TABcline{5}
& & & & 2&0&\
& & & -& 2&0&\
TABcline{5}
& & & &0&
}
$

end{tabular}
end{document}









share|improve this question













Original thread. I want to make the long division represented with floating point, but i have strange results. The numbers are not aligned (with yellow). And some numbers are far away(red).
enter image description here



documentclass{article}
usepackage[TABcline]{tabstackengine}
TABstackMath
renewcommandstackalignment{l}
newcommandlminus{llap{$-$}}
{catcode`-=active
gdef -{lminus}}
newcommandminusactive{phantom{-}catcode`-=active}
setstacktabbedgap{3pt}
begin{document}
begin{tabular}{ll@{hspace{10ex}}c}

$
minusactive
tabbedShortunderstack[r]{
&7,&6&2&4&:4=1,815\
-&4&& &&&\
TABcline{2,3}
& &3&2&&&&\
&-&3&2&&&&\
TABcline{3,4}
& & & &6& &&\
& & &-&4& &&\
TABcline{5}
& & & & 2&0&\
& & & -& 2&0&\
TABcline{5}
& & & &0&
}
$

end{tabular}
end{document}






math-mode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Simeon Simeonov

3086




3086












  • Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?
    – Mico
    3 hours ago










  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.
    – Simeon Simeonov
    2 hours ago


















  • Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?
    – Mico
    3 hours ago










  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.
    – Simeon Simeonov
    2 hours ago
















Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?
– Mico
3 hours ago




Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?
– Mico
3 hours ago












You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.
– Simeon Simeonov
2 hours ago




You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.
– Simeon Simeonov
2 hours ago










2 Answers
2






active

oldest

votes


















3














Like this?



documentclass{article}
usepackage[TABcline]{tabstackengine}
TABstackMath
renewcommandstackalignment{l}
newcommandlminus{llap{$-$}}
{catcode`-=active
gdef -{lminus}}
newcommandminusactive{phantom{-}catcode`-=active}
setstacktabbedgap{3pt}

begin{document}

begin{tabular}{ll@{hspace{10ex}}c}
$
minusactive
tabbedShortunderstack[r]{
&7rlap{,}&6&2&4&:4=1,815\
-&4&& &&&\
TABcline{2,3}
& &3&2&&&&\
&-&3&2&&&&\
TABcline{3,4}
& & & &6& &&\
& & &-&4& &&\
TABcline{5}
& & & & 2rlap{$; 0 $}&&\
& & & -& 2rlap{$; 0 $}&&\
TABcline{5}
& & & &0&
}
$
end{tabular}

end{document}


enter image description here






share|improve this answer





























    2














    If you don't need to show the thousands-separator symbol (here: ,), the layout becomes much easier, and the typographic problem can be solved using just an array environment.





    documentclass{article}
    usepackage{array} % for 'newcolumntype' macro
    newcolumntype{C}{>{{}}c<{{}}}
    usepackage{mathtools} % for 'mathllap' macro
    begin{document}
    [
    setlengtharraycolsep{0.5pt} % default: 5pt
    begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
    &7&6&2&4 &:&4&=& 1&9&0&6\
    -&4 \ cline{2-2}
    &3&6 \
    -&3&6 \ cline{2-3}
    & &0&2 \
    & &mathllap{-}&0 \ cline{4-4}
    & & &2&4\
    & &mathllap{-}&2&4\ cline{4-5}
    & & & &0rlap{.} % "rlap{.}" is optional
    \ cline{5-5} % optional
    end{array}
    qquad
    begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
    &7&2&6&0 &:&4&=& 1&8&1&5\
    -&4 \ cline{2-2}
    &3&2 \
    -&3&2 \ cline{2-3}
    & &0&6 \
    & &mathllap{-}&4 \ cline{4-4}
    & & &2&0\
    & &mathllap{-}&2&0\ cline{4-5}
    & & & &0rlap{.} % "rlap{.}" is optional
    \ cline{5-5} % optional
    end{array}
    ]
    end{document}





    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%2f467968%2flong-division-spacing%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














      Like this?



      documentclass{article}
      usepackage[TABcline]{tabstackengine}
      TABstackMath
      renewcommandstackalignment{l}
      newcommandlminus{llap{$-$}}
      {catcode`-=active
      gdef -{lminus}}
      newcommandminusactive{phantom{-}catcode`-=active}
      setstacktabbedgap{3pt}

      begin{document}

      begin{tabular}{ll@{hspace{10ex}}c}
      $
      minusactive
      tabbedShortunderstack[r]{
      &7rlap{,}&6&2&4&:4=1,815\
      -&4&& &&&\
      TABcline{2,3}
      & &3&2&&&&\
      &-&3&2&&&&\
      TABcline{3,4}
      & & & &6& &&\
      & & &-&4& &&\
      TABcline{5}
      & & & & 2rlap{$; 0 $}&&\
      & & & -& 2rlap{$; 0 $}&&\
      TABcline{5}
      & & & &0&
      }
      $
      end{tabular}

      end{document}


      enter image description here






      share|improve this answer


























        3














        Like this?



        documentclass{article}
        usepackage[TABcline]{tabstackengine}
        TABstackMath
        renewcommandstackalignment{l}
        newcommandlminus{llap{$-$}}
        {catcode`-=active
        gdef -{lminus}}
        newcommandminusactive{phantom{-}catcode`-=active}
        setstacktabbedgap{3pt}

        begin{document}

        begin{tabular}{ll@{hspace{10ex}}c}
        $
        minusactive
        tabbedShortunderstack[r]{
        &7rlap{,}&6&2&4&:4=1,815\
        -&4&& &&&\
        TABcline{2,3}
        & &3&2&&&&\
        &-&3&2&&&&\
        TABcline{3,4}
        & & & &6& &&\
        & & &-&4& &&\
        TABcline{5}
        & & & & 2rlap{$; 0 $}&&\
        & & & -& 2rlap{$; 0 $}&&\
        TABcline{5}
        & & & &0&
        }
        $
        end{tabular}

        end{document}


        enter image description here






        share|improve this answer
























          3












          3








          3






          Like this?



          documentclass{article}
          usepackage[TABcline]{tabstackengine}
          TABstackMath
          renewcommandstackalignment{l}
          newcommandlminus{llap{$-$}}
          {catcode`-=active
          gdef -{lminus}}
          newcommandminusactive{phantom{-}catcode`-=active}
          setstacktabbedgap{3pt}

          begin{document}

          begin{tabular}{ll@{hspace{10ex}}c}
          $
          minusactive
          tabbedShortunderstack[r]{
          &7rlap{,}&6&2&4&:4=1,815\
          -&4&& &&&\
          TABcline{2,3}
          & &3&2&&&&\
          &-&3&2&&&&\
          TABcline{3,4}
          & & & &6& &&\
          & & &-&4& &&\
          TABcline{5}
          & & & & 2rlap{$; 0 $}&&\
          & & & -& 2rlap{$; 0 $}&&\
          TABcline{5}
          & & & &0&
          }
          $
          end{tabular}

          end{document}


          enter image description here






          share|improve this answer












          Like this?



          documentclass{article}
          usepackage[TABcline]{tabstackengine}
          TABstackMath
          renewcommandstackalignment{l}
          newcommandlminus{llap{$-$}}
          {catcode`-=active
          gdef -{lminus}}
          newcommandminusactive{phantom{-}catcode`-=active}
          setstacktabbedgap{3pt}

          begin{document}

          begin{tabular}{ll@{hspace{10ex}}c}
          $
          minusactive
          tabbedShortunderstack[r]{
          &7rlap{,}&6&2&4&:4=1,815\
          -&4&& &&&\
          TABcline{2,3}
          & &3&2&&&&\
          &-&3&2&&&&\
          TABcline{3,4}
          & & & &6& &&\
          & & &-&4& &&\
          TABcline{5}
          & & & & 2rlap{$; 0 $}&&\
          & & & -& 2rlap{$; 0 $}&&\
          TABcline{5}
          & & & &0&
          }
          $
          end{tabular}

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 3 hours ago









          Bernard

          166k769193




          166k769193























              2














              If you don't need to show the thousands-separator symbol (here: ,), the layout becomes much easier, and the typographic problem can be solved using just an array environment.





              documentclass{article}
              usepackage{array} % for 'newcolumntype' macro
              newcolumntype{C}{>{{}}c<{{}}}
              usepackage{mathtools} % for 'mathllap' macro
              begin{document}
              [
              setlengtharraycolsep{0.5pt} % default: 5pt
              begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
              &7&6&2&4 &:&4&=& 1&9&0&6\
              -&4 \ cline{2-2}
              &3&6 \
              -&3&6 \ cline{2-3}
              & &0&2 \
              & &mathllap{-}&0 \ cline{4-4}
              & & &2&4\
              & &mathllap{-}&2&4\ cline{4-5}
              & & & &0rlap{.} % "rlap{.}" is optional
              \ cline{5-5} % optional
              end{array}
              qquad
              begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
              &7&2&6&0 &:&4&=& 1&8&1&5\
              -&4 \ cline{2-2}
              &3&2 \
              -&3&2 \ cline{2-3}
              & &0&6 \
              & &mathllap{-}&4 \ cline{4-4}
              & & &2&0\
              & &mathllap{-}&2&0\ cline{4-5}
              & & & &0rlap{.} % "rlap{.}" is optional
              \ cline{5-5} % optional
              end{array}
              ]
              end{document}





              share|improve this answer




























                2














                If you don't need to show the thousands-separator symbol (here: ,), the layout becomes much easier, and the typographic problem can be solved using just an array environment.





                documentclass{article}
                usepackage{array} % for 'newcolumntype' macro
                newcolumntype{C}{>{{}}c<{{}}}
                usepackage{mathtools} % for 'mathllap' macro
                begin{document}
                [
                setlengtharraycolsep{0.5pt} % default: 5pt
                begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
                &7&6&2&4 &:&4&=& 1&9&0&6\
                -&4 \ cline{2-2}
                &3&6 \
                -&3&6 \ cline{2-3}
                & &0&2 \
                & &mathllap{-}&0 \ cline{4-4}
                & & &2&4\
                & &mathllap{-}&2&4\ cline{4-5}
                & & & &0rlap{.} % "rlap{.}" is optional
                \ cline{5-5} % optional
                end{array}
                qquad
                begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
                &7&2&6&0 &:&4&=& 1&8&1&5\
                -&4 \ cline{2-2}
                &3&2 \
                -&3&2 \ cline{2-3}
                & &0&6 \
                & &mathllap{-}&4 \ cline{4-4}
                & & &2&0\
                & &mathllap{-}&2&0\ cline{4-5}
                & & & &0rlap{.} % "rlap{.}" is optional
                \ cline{5-5} % optional
                end{array}
                ]
                end{document}





                share|improve this answer


























                  2












                  2








                  2






                  If you don't need to show the thousands-separator symbol (here: ,), the layout becomes much easier, and the typographic problem can be solved using just an array environment.





                  documentclass{article}
                  usepackage{array} % for 'newcolumntype' macro
                  newcolumntype{C}{>{{}}c<{{}}}
                  usepackage{mathtools} % for 'mathllap' macro
                  begin{document}
                  [
                  setlengtharraycolsep{0.5pt} % default: 5pt
                  begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
                  &7&6&2&4 &:&4&=& 1&9&0&6\
                  -&4 \ cline{2-2}
                  &3&6 \
                  -&3&6 \ cline{2-3}
                  & &0&2 \
                  & &mathllap{-}&0 \ cline{4-4}
                  & & &2&4\
                  & &mathllap{-}&2&4\ cline{4-5}
                  & & & &0rlap{.} % "rlap{.}" is optional
                  \ cline{5-5} % optional
                  end{array}
                  qquad
                  begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
                  &7&2&6&0 &:&4&=& 1&8&1&5\
                  -&4 \ cline{2-2}
                  &3&2 \
                  -&3&2 \ cline{2-3}
                  & &0&6 \
                  & &mathllap{-}&4 \ cline{4-4}
                  & & &2&0\
                  & &mathllap{-}&2&0\ cline{4-5}
                  & & & &0rlap{.} % "rlap{.}" is optional
                  \ cline{5-5} % optional
                  end{array}
                  ]
                  end{document}





                  share|improve this answer














                  If you don't need to show the thousands-separator symbol (here: ,), the layout becomes much easier, and the typographic problem can be solved using just an array environment.





                  documentclass{article}
                  usepackage{array} % for 'newcolumntype' macro
                  newcolumntype{C}{>{{}}c<{{}}}
                  usepackage{mathtools} % for 'mathllap' macro
                  begin{document}
                  [
                  setlengtharraycolsep{0.5pt} % default: 5pt
                  begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
                  &7&6&2&4 &:&4&=& 1&9&0&6\
                  -&4 \ cline{2-2}
                  &3&6 \
                  -&3&6 \ cline{2-3}
                  & &0&2 \
                  & &mathllap{-}&0 \ cline{4-4}
                  & & &2&4\
                  & &mathllap{-}&2&4\ cline{4-5}
                  & & & &0rlap{.} % "rlap{.}" is optional
                  \ cline{5-5} % optional
                  end{array}
                  qquad
                  begin{array}[t]{@{} C @{} *{4}{c} CcC *{4}{c} @{}}
                  &7&2&6&0 &:&4&=& 1&8&1&5\
                  -&4 \ cline{2-2}
                  &3&2 \
                  -&3&2 \ cline{2-3}
                  & &0&6 \
                  & &mathllap{-}&4 \ cline{4-4}
                  & & &2&0\
                  & &mathllap{-}&2&0\ cline{4-5}
                  & & & &0rlap{.} % "rlap{.}" is optional
                  \ cline{5-5} % optional
                  end{array}
                  ]
                  end{document}






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 2 hours ago

























                  answered 3 hours ago









                  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%2f467968%2flong-division-spacing%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

                      Trompette piccolo

                      Slow SSRS Report in dynamic grouping and multiple parameters

                      Simon Yates (cyclisme)