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
    Dec 30 '18 at 23:48











  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.

    – Simeon Simeonov
    Dec 31 '18 at 1:10
















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
    Dec 30 '18 at 23:48











  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.

    – Simeon Simeonov
    Dec 31 '18 at 1:10














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 Dec 30 '18 at 23:08









Simeon SimeonovSimeon Simeonov

4847




4847













  • Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?

    – Mico
    Dec 30 '18 at 23:48











  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.

    – Simeon Simeonov
    Dec 31 '18 at 1:10



















  • Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?

    – Mico
    Dec 30 '18 at 23:48











  • You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.

    – Simeon Simeonov
    Dec 31 '18 at 1:10

















Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?

– Mico
Dec 30 '18 at 23:48





Just out of curiosity -- Why did you set the result of the division to 1815 rather 1906?

– Mico
Dec 30 '18 at 23:48













You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.

– Simeon Simeonov
Dec 31 '18 at 1:10





You are right. The number is 7,26 not 7,246... Again making mistake for fast MEW.

– Simeon Simeonov
Dec 31 '18 at 1:10










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































    3














    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





















    • 1





      The comma may have had the meaning of a decimal point, conventions vary.

      – Carsten S
      Dec 31 '18 at 10:54












    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 Dec 30 '18 at 23:24









        BernardBernard

        177k779211




        177k779211























            3














            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





















            • 1





              The comma may have had the meaning of a decimal point, conventions vary.

              – Carsten S
              Dec 31 '18 at 10:54
















            3














            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





















            • 1





              The comma may have had the meaning of a decimal point, conventions vary.

              – Carsten S
              Dec 31 '18 at 10:54














            3












            3








            3







            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 Dec 31 '18 at 1:03

























            answered Dec 31 '18 at 0:16









            MicoMico

            288k32394782




            288k32394782








            • 1





              The comma may have had the meaning of a decimal point, conventions vary.

              – Carsten S
              Dec 31 '18 at 10:54














            • 1





              The comma may have had the meaning of a decimal point, conventions vary.

              – Carsten S
              Dec 31 '18 at 10:54








            1




            1





            The comma may have had the meaning of a decimal point, conventions vary.

            – Carsten S
            Dec 31 '18 at 10:54





            The comma may have had the meaning of a decimal point, conventions vary.

            – Carsten S
            Dec 31 '18 at 10:54


















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

            Bundesstraße 106

            Le Mesnil-Réaume

            Ida-Boy-Ed-Garten