How to limit amount of numbers after comma in metapost?












1















I would like to limit floating point numbers inside a label:



beginfig(1)
for i=1 upto 5:
label.bot(textext("$" & (decimal (-0.8*i)) & "$"), (-0.8*i, -0.2));
endfig;
end;


Currently it shows 5 numbers after comma. I need 2.










share|improve this question

























  • do you need rounding or simply truncated to 2 digits ?

    – user4686
    Jan 19 at 12:59











  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Jan 19 at 13:02











  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – dexteritas
    Jan 19 at 13:02











  • @jfbu truncated.

    – flowian
    Jan 19 at 13:22
















1















I would like to limit floating point numbers inside a label:



beginfig(1)
for i=1 upto 5:
label.bot(textext("$" & (decimal (-0.8*i)) & "$"), (-0.8*i, -0.2));
endfig;
end;


Currently it shows 5 numbers after comma. I need 2.










share|improve this question

























  • do you need rounding or simply truncated to 2 digits ?

    – user4686
    Jan 19 at 12:59











  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Jan 19 at 13:02











  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – dexteritas
    Jan 19 at 13:02











  • @jfbu truncated.

    – flowian
    Jan 19 at 13:22














1












1








1








I would like to limit floating point numbers inside a label:



beginfig(1)
for i=1 upto 5:
label.bot(textext("$" & (decimal (-0.8*i)) & "$"), (-0.8*i, -0.2));
endfig;
end;


Currently it shows 5 numbers after comma. I need 2.










share|improve this question
















I would like to limit floating point numbers inside a label:



beginfig(1)
for i=1 upto 5:
label.bot(textext("$" & (decimal (-0.8*i)) & "$"), (-0.8*i, -0.2));
endfig;
end;


Currently it shows 5 numbers after comma. I need 2.







metapost floating-point






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 at 13:33







flowian

















asked Jan 19 at 12:42









flowianflowian

204




204













  • do you need rounding or simply truncated to 2 digits ?

    – user4686
    Jan 19 at 12:59











  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Jan 19 at 13:02











  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – dexteritas
    Jan 19 at 13:02











  • @jfbu truncated.

    – flowian
    Jan 19 at 13:22



















  • do you need rounding or simply truncated to 2 digits ?

    – user4686
    Jan 19 at 12:59











  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

    – dexteritas
    Jan 19 at 13:02











  • A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

    – dexteritas
    Jan 19 at 13:02











  • @jfbu truncated.

    – flowian
    Jan 19 at 13:22

















do you need rounding or simply truncated to 2 digits ?

– user4686
Jan 19 at 12:59





do you need rounding or simply truncated to 2 digits ?

– user4686
Jan 19 at 12:59













Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

– dexteritas
Jan 19 at 13:02





Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with documentclass{...}, the required usepackage's, begin{document}, and end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.

– dexteritas
Jan 19 at 13:02













A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

– dexteritas
Jan 19 at 13:02





A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it).

– dexteritas
Jan 19 at 13:02













@jfbu truncated.

– flowian
Jan 19 at 13:22





@jfbu truncated.

– flowian
Jan 19 at 13:22










2 Answers
2






active

oldest

votes


















2














You can define a MetaPost macro to select the right substring:



vardef tdecimal(expr num, d) :=
save numS; string numS; numS = decimal(num);
save j; j := length numS;
for k = 0 upto length numS - 1:
if "." == substring (k,k+1) of numS: j:=k; fi
endfor
for k = j + 1 upto j + d:
if "0" <> substring (k,k+1) of numS: j:=k+1; fi
endfor
substring (0,j) of numS
enddef;


Then you can use e.g. tdecimal(1.234567, 2) to get 1.23 or tdecimal(1.234567, 3) to get 1.234.



An easier alternative would be to separately get the string representation of the integral and the decimal part, but this leads to some rounding problems in MetaPost.
Anyway, if you want to try it, the code would be



vardef twodecimal(expr num) :=
if num < 0:
"-" & decimal(floor(-num)) & "." & substring (1,3) of decimal(floor((-num-floor(-num)+1)*100))
else:
decimal(floor(num)) & "." & substring (1,3) of decimal(floor((num-floor(num)+1)*100))
fi
enddef;





share|improve this answer































    2














    Add usepackage{xintfrac} to preamble (prologue? I don't remember metapost terminology) and use



    label.bot(textext("$xintRound{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))




    Well I did your job and I opened up MetaPost manual. I don't know what is your "textext", which must be provided by some additional macros.



    input TEX;

    TEXPRE("input xintfrac.styrelax");

    beginfig(1);
    pickup pencircle scaled 1pt;
    draw (0,0);
    numeric i;
    i := 1.236;
    label.bot(TEX("$xintTrunc{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))
    endfig;

    end


    When acted upon by mpost produces a correct EPS file. I used xintTrunc as you want truncation. That could be done with no package at all (truncation is easier than rounding.)



    I searched MetaPost manual for all occurences of "decimal" and did not see how to do the truncation before hand, but that must be possible because among the references I see "decNumber ANSI C implementation of general decimal arithmetic".






    share|improve this answer


























    • gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

      – flowian
      Jan 19 at 13:25











    • also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

      – flowian
      Jan 19 at 13:30











    • second part of my answer was added after above comments by OP.

      – user4686
      Jan 19 at 16:02











    • textextis a macro shipped with Metafun, which is shipped with ConTeXt.

      – sztruks
      Jan 19 at 16:14











    • @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

      – user4686
      Jan 19 at 18:02











    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%2f470856%2fhow-to-limit-amount-of-numbers-after-comma-in-metapost%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    You can define a MetaPost macro to select the right substring:



    vardef tdecimal(expr num, d) :=
    save numS; string numS; numS = decimal(num);
    save j; j := length numS;
    for k = 0 upto length numS - 1:
    if "." == substring (k,k+1) of numS: j:=k; fi
    endfor
    for k = j + 1 upto j + d:
    if "0" <> substring (k,k+1) of numS: j:=k+1; fi
    endfor
    substring (0,j) of numS
    enddef;


    Then you can use e.g. tdecimal(1.234567, 2) to get 1.23 or tdecimal(1.234567, 3) to get 1.234.



    An easier alternative would be to separately get the string representation of the integral and the decimal part, but this leads to some rounding problems in MetaPost.
    Anyway, if you want to try it, the code would be



    vardef twodecimal(expr num) :=
    if num < 0:
    "-" & decimal(floor(-num)) & "." & substring (1,3) of decimal(floor((-num-floor(-num)+1)*100))
    else:
    decimal(floor(num)) & "." & substring (1,3) of decimal(floor((num-floor(num)+1)*100))
    fi
    enddef;





    share|improve this answer




























      2














      You can define a MetaPost macro to select the right substring:



      vardef tdecimal(expr num, d) :=
      save numS; string numS; numS = decimal(num);
      save j; j := length numS;
      for k = 0 upto length numS - 1:
      if "." == substring (k,k+1) of numS: j:=k; fi
      endfor
      for k = j + 1 upto j + d:
      if "0" <> substring (k,k+1) of numS: j:=k+1; fi
      endfor
      substring (0,j) of numS
      enddef;


      Then you can use e.g. tdecimal(1.234567, 2) to get 1.23 or tdecimal(1.234567, 3) to get 1.234.



      An easier alternative would be to separately get the string representation of the integral and the decimal part, but this leads to some rounding problems in MetaPost.
      Anyway, if you want to try it, the code would be



      vardef twodecimal(expr num) :=
      if num < 0:
      "-" & decimal(floor(-num)) & "." & substring (1,3) of decimal(floor((-num-floor(-num)+1)*100))
      else:
      decimal(floor(num)) & "." & substring (1,3) of decimal(floor((num-floor(num)+1)*100))
      fi
      enddef;





      share|improve this answer


























        2












        2








        2







        You can define a MetaPost macro to select the right substring:



        vardef tdecimal(expr num, d) :=
        save numS; string numS; numS = decimal(num);
        save j; j := length numS;
        for k = 0 upto length numS - 1:
        if "." == substring (k,k+1) of numS: j:=k; fi
        endfor
        for k = j + 1 upto j + d:
        if "0" <> substring (k,k+1) of numS: j:=k+1; fi
        endfor
        substring (0,j) of numS
        enddef;


        Then you can use e.g. tdecimal(1.234567, 2) to get 1.23 or tdecimal(1.234567, 3) to get 1.234.



        An easier alternative would be to separately get the string representation of the integral and the decimal part, but this leads to some rounding problems in MetaPost.
        Anyway, if you want to try it, the code would be



        vardef twodecimal(expr num) :=
        if num < 0:
        "-" & decimal(floor(-num)) & "." & substring (1,3) of decimal(floor((-num-floor(-num)+1)*100))
        else:
        decimal(floor(num)) & "." & substring (1,3) of decimal(floor((num-floor(num)+1)*100))
        fi
        enddef;





        share|improve this answer













        You can define a MetaPost macro to select the right substring:



        vardef tdecimal(expr num, d) :=
        save numS; string numS; numS = decimal(num);
        save j; j := length numS;
        for k = 0 upto length numS - 1:
        if "." == substring (k,k+1) of numS: j:=k; fi
        endfor
        for k = j + 1 upto j + d:
        if "0" <> substring (k,k+1) of numS: j:=k+1; fi
        endfor
        substring (0,j) of numS
        enddef;


        Then you can use e.g. tdecimal(1.234567, 2) to get 1.23 or tdecimal(1.234567, 3) to get 1.234.



        An easier alternative would be to separately get the string representation of the integral and the decimal part, but this leads to some rounding problems in MetaPost.
        Anyway, if you want to try it, the code would be



        vardef twodecimal(expr num) :=
        if num < 0:
        "-" & decimal(floor(-num)) & "." & substring (1,3) of decimal(floor((-num-floor(-num)+1)*100))
        else:
        decimal(floor(num)) & "." & substring (1,3) of decimal(floor((num-floor(num)+1)*100))
        fi
        enddef;






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 19 at 14:28









        Marcel KrügerMarcel Krüger

        11.9k11535




        11.9k11535























            2














            Add usepackage{xintfrac} to preamble (prologue? I don't remember metapost terminology) and use



            label.bot(textext("$xintRound{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))




            Well I did your job and I opened up MetaPost manual. I don't know what is your "textext", which must be provided by some additional macros.



            input TEX;

            TEXPRE("input xintfrac.styrelax");

            beginfig(1);
            pickup pencircle scaled 1pt;
            draw (0,0);
            numeric i;
            i := 1.236;
            label.bot(TEX("$xintTrunc{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))
            endfig;

            end


            When acted upon by mpost produces a correct EPS file. I used xintTrunc as you want truncation. That could be done with no package at all (truncation is easier than rounding.)



            I searched MetaPost manual for all occurences of "decimal" and did not see how to do the truncation before hand, but that must be possible because among the references I see "decNumber ANSI C implementation of general decimal arithmetic".






            share|improve this answer


























            • gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

              – flowian
              Jan 19 at 13:25











            • also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

              – flowian
              Jan 19 at 13:30











            • second part of my answer was added after above comments by OP.

              – user4686
              Jan 19 at 16:02











            • textextis a macro shipped with Metafun, which is shipped with ConTeXt.

              – sztruks
              Jan 19 at 16:14











            • @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

              – user4686
              Jan 19 at 18:02
















            2














            Add usepackage{xintfrac} to preamble (prologue? I don't remember metapost terminology) and use



            label.bot(textext("$xintRound{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))




            Well I did your job and I opened up MetaPost manual. I don't know what is your "textext", which must be provided by some additional macros.



            input TEX;

            TEXPRE("input xintfrac.styrelax");

            beginfig(1);
            pickup pencircle scaled 1pt;
            draw (0,0);
            numeric i;
            i := 1.236;
            label.bot(TEX("$xintTrunc{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))
            endfig;

            end


            When acted upon by mpost produces a correct EPS file. I used xintTrunc as you want truncation. That could be done with no package at all (truncation is easier than rounding.)



            I searched MetaPost manual for all occurences of "decimal" and did not see how to do the truncation before hand, but that must be possible because among the references I see "decNumber ANSI C implementation of general decimal arithmetic".






            share|improve this answer


























            • gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

              – flowian
              Jan 19 at 13:25











            • also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

              – flowian
              Jan 19 at 13:30











            • second part of my answer was added after above comments by OP.

              – user4686
              Jan 19 at 16:02











            • textextis a macro shipped with Metafun, which is shipped with ConTeXt.

              – sztruks
              Jan 19 at 16:14











            • @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

              – user4686
              Jan 19 at 18:02














            2












            2








            2







            Add usepackage{xintfrac} to preamble (prologue? I don't remember metapost terminology) and use



            label.bot(textext("$xintRound{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))




            Well I did your job and I opened up MetaPost manual. I don't know what is your "textext", which must be provided by some additional macros.



            input TEX;

            TEXPRE("input xintfrac.styrelax");

            beginfig(1);
            pickup pencircle scaled 1pt;
            draw (0,0);
            numeric i;
            i := 1.236;
            label.bot(TEX("$xintTrunc{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))
            endfig;

            end


            When acted upon by mpost produces a correct EPS file. I used xintTrunc as you want truncation. That could be done with no package at all (truncation is easier than rounding.)



            I searched MetaPost manual for all occurences of "decimal" and did not see how to do the truncation before hand, but that must be possible because among the references I see "decNumber ANSI C implementation of general decimal arithmetic".






            share|improve this answer















            Add usepackage{xintfrac} to preamble (prologue? I don't remember metapost terminology) and use



            label.bot(textext("$xintRound{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))




            Well I did your job and I opened up MetaPost manual. I don't know what is your "textext", which must be provided by some additional macros.



            input TEX;

            TEXPRE("input xintfrac.styrelax");

            beginfig(1);
            pickup pencircle scaled 1pt;
            draw (0,0);
            numeric i;
            i := 1.236;
            label.bot(TEX("$xintTrunc{2}{" & (decimal (-0.8*i)) & "}$"), (-0.8*i, -0.2))
            endfig;

            end


            When acted upon by mpost produces a correct EPS file. I used xintTrunc as you want truncation. That could be done with no package at all (truncation is easier than rounding.)



            I searched MetaPost manual for all occurences of "decimal" and did not see how to do the truncation before hand, but that must be possible because among the references I see "decNumber ANSI C implementation of general decimal arithmetic".







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 19 at 13:54

























            answered Jan 19 at 13:01







            user4686




















            • gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

              – flowian
              Jan 19 at 13:25











            • also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

              – flowian
              Jan 19 at 13:30











            • second part of my answer was added after above comments by OP.

              – user4686
              Jan 19 at 16:02











            • textextis a macro shipped with Metafun, which is shipped with ConTeXt.

              – sztruks
              Jan 19 at 16:14











            • @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

              – user4686
              Jan 19 at 18:02



















            • gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

              – flowian
              Jan 19 at 13:25











            • also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

              – flowian
              Jan 19 at 13:30











            • second part of my answer was added after above comments by OP.

              – user4686
              Jan 19 at 16:02











            • textextis a macro shipped with Metafun, which is shipped with ConTeXt.

              – sztruks
              Jan 19 at 16:14











            • @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

              – user4686
              Jan 19 at 18:02

















            gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

            – flowian
            Jan 19 at 13:25





            gives error Command failed: latex mpeQcIXw.tex; see mpxerr.log

            – flowian
            Jan 19 at 13:25













            also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

            – flowian
            Jan 19 at 13:30





            also: ! ! Unable to read mpx file. l.7 latexmp_picture[1]:= btex $xintround{2}{-0.8}$ etex ;

            – flowian
            Jan 19 at 13:30













            second part of my answer was added after above comments by OP.

            – user4686
            Jan 19 at 16:02





            second part of my answer was added after above comments by OP.

            – user4686
            Jan 19 at 16:02













            textextis a macro shipped with Metafun, which is shipped with ConTeXt.

            – sztruks
            Jan 19 at 16:14





            textextis a macro shipped with Metafun, which is shipped with ConTeXt.

            – sztruks
            Jan 19 at 16:14













            @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

            – user4686
            Jan 19 at 18:02





            @sztruks thanks, the OP did not add any tag to this effect, and I don't have context installed at my locale. From one comment above I see "latex" is called, then clearly one must use usepackage{xintfrac} as I said in my initial posting, and not input xintfrac.styrelax which is for pdftex, or any (whatever)etex.

            – user4686
            Jan 19 at 18:02


















            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%2f470856%2fhow-to-limit-amount-of-numbers-after-comma-in-metapost%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

            Mario Kart Wii

            What does “Dominus providebit” mean?

            File:Tiny Toon Adventures Wacky Sports JP Title.png