What does “!” aka backslash exclamation mark do?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I just came across this ! (backslash exclamation mark) in the code for a table in somebody else's tex and I was wondering what it does.



begintable[hbt]
centering
resizeboxcolumnwidth!%
setlengthextrarowheight1pt
begintabularl
toprule
textbfThing & $a$ & $b$ & $c$ & $d$ & $e$\
midrule
Stuff & !!100!! & !!$10^6$!! & !!$pi_0$!! & $sigma$ & $2^30$\
bottomrule
endtabular%

endtable


My tex editor says unrecognized command but it compiles just fine.
I've tried on overleaf and it seems to tighten the table somehow. Does anybody know more?










share|improve this question

















  • 1




    A ! is a negative space, see tex.stackexchange.com/questions/9091/… for more information.
    – BambOo
    59 mins ago






  • 1




    It doesn't compile fine!
    – egreg
    29 mins ago















up vote
1
down vote

favorite












I just came across this ! (backslash exclamation mark) in the code for a table in somebody else's tex and I was wondering what it does.



begintable[hbt]
centering
resizeboxcolumnwidth!%
setlengthextrarowheight1pt
begintabularl
toprule
textbfThing & $a$ & $b$ & $c$ & $d$ & $e$\
midrule
Stuff & !!100!! & !!$10^6$!! & !!$pi_0$!! & $sigma$ & $2^30$\
bottomrule
endtabular%

endtable


My tex editor says unrecognized command but it compiles just fine.
I've tried on overleaf and it seems to tighten the table somehow. Does anybody know more?










share|improve this question

















  • 1




    A ! is a negative space, see tex.stackexchange.com/questions/9091/… for more information.
    – BambOo
    59 mins ago






  • 1




    It doesn't compile fine!
    – egreg
    29 mins ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I just came across this ! (backslash exclamation mark) in the code for a table in somebody else's tex and I was wondering what it does.



begintable[hbt]
centering
resizeboxcolumnwidth!%
setlengthextrarowheight1pt
begintabularl
toprule
textbfThing & $a$ & $b$ & $c$ & $d$ & $e$\
midrule
Stuff & !!100!! & !!$10^6$!! & !!$pi_0$!! & $sigma$ & $2^30$\
bottomrule
endtabular%

endtable


My tex editor says unrecognized command but it compiles just fine.
I've tried on overleaf and it seems to tighten the table somehow. Does anybody know more?










share|improve this question













I just came across this ! (backslash exclamation mark) in the code for a table in somebody else's tex and I was wondering what it does.



begintable[hbt]
centering
resizeboxcolumnwidth!%
setlengthextrarowheight1pt
begintabularl
toprule
textbfThing & $a$ & $b$ & $c$ & $d$ & $e$\
midrule
Stuff & !!100!! & !!$10^6$!! & !!$pi_0$!! & $sigma$ & $2^30$\
bottomrule
endtabular%

endtable


My tex editor says unrecognized command but it compiles just fine.
I've tried on overleaf and it seems to tighten the table somehow. Does anybody know more?







tables






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Elias

1304




1304







  • 1




    A ! is a negative space, see tex.stackexchange.com/questions/9091/… for more information.
    – BambOo
    59 mins ago






  • 1




    It doesn't compile fine!
    – egreg
    29 mins ago













  • 1




    A ! is a negative space, see tex.stackexchange.com/questions/9091/… for more information.
    – BambOo
    59 mins ago






  • 1




    It doesn't compile fine!
    – egreg
    29 mins ago








1




1




A ! is a negative space, see tex.stackexchange.com/questions/9091/… for more information.
– BambOo
59 mins ago




A ! is a negative space, see tex.stackexchange.com/questions/9091/… for more information.
– BambOo
59 mins ago




1




1




It doesn't compile fine!
– egreg
29 mins ago





It doesn't compile fine!
– egreg
29 mins ago











2 Answers
2






active

oldest

votes

















up vote
5
down vote













I don't know what the commands ! are supposed to do in the code you show, other than raising many errors.



The command ! is only allowed in math mode (unless redefined, which I'd discourage). It's purpose is to insert a negative thin space, which is useful in several places. For instance



biggl(frac12112-1biggr)^!2


is an improvement over ^2, because it moves the exponent towards the parenthesis and takes care of its bending.



Another place where it is helpful is in 2/!log x, because for technical reasons / is an ordinary symbol and TeX would add a thin space between it and the “log” operator.



Here's a picture: left the output with !, right without.



enter image description here



If you want to tighten a table, reduce the size of tabcolsep. Using explicit negative spaces all over the place is not the correct way.



And never use resizebox on a table.






share|improve this answer



























    up vote
    3
    down vote













    This symbol is usually defined as



     ! negative thin space (normally 1/6 of a quad)


    It is commonly used in tables, and formulas among other ways to manipulate spaces in LaTeX



    And before you do post a question, please do run a search with similar keywords on this site. Hope this helps.






    share|improve this answer
















    • 2




      Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
      – daleif
      37 mins ago










    • @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
      – GermanShepherd
      33 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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f455375%2fwhat-does-aka-backslash-exclamation-mark-do%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote













    I don't know what the commands ! are supposed to do in the code you show, other than raising many errors.



    The command ! is only allowed in math mode (unless redefined, which I'd discourage). It's purpose is to insert a negative thin space, which is useful in several places. For instance



    biggl(frac12112-1biggr)^!2


    is an improvement over ^2, because it moves the exponent towards the parenthesis and takes care of its bending.



    Another place where it is helpful is in 2/!log x, because for technical reasons / is an ordinary symbol and TeX would add a thin space between it and the “log” operator.



    Here's a picture: left the output with !, right without.



    enter image description here



    If you want to tighten a table, reduce the size of tabcolsep. Using explicit negative spaces all over the place is not the correct way.



    And never use resizebox on a table.






    share|improve this answer
























      up vote
      5
      down vote













      I don't know what the commands ! are supposed to do in the code you show, other than raising many errors.



      The command ! is only allowed in math mode (unless redefined, which I'd discourage). It's purpose is to insert a negative thin space, which is useful in several places. For instance



      biggl(frac12112-1biggr)^!2


      is an improvement over ^2, because it moves the exponent towards the parenthesis and takes care of its bending.



      Another place where it is helpful is in 2/!log x, because for technical reasons / is an ordinary symbol and TeX would add a thin space between it and the “log” operator.



      Here's a picture: left the output with !, right without.



      enter image description here



      If you want to tighten a table, reduce the size of tabcolsep. Using explicit negative spaces all over the place is not the correct way.



      And never use resizebox on a table.






      share|improve this answer






















        up vote
        5
        down vote










        up vote
        5
        down vote









        I don't know what the commands ! are supposed to do in the code you show, other than raising many errors.



        The command ! is only allowed in math mode (unless redefined, which I'd discourage). It's purpose is to insert a negative thin space, which is useful in several places. For instance



        biggl(frac12112-1biggr)^!2


        is an improvement over ^2, because it moves the exponent towards the parenthesis and takes care of its bending.



        Another place where it is helpful is in 2/!log x, because for technical reasons / is an ordinary symbol and TeX would add a thin space between it and the “log” operator.



        Here's a picture: left the output with !, right without.



        enter image description here



        If you want to tighten a table, reduce the size of tabcolsep. Using explicit negative spaces all over the place is not the correct way.



        And never use resizebox on a table.






        share|improve this answer












        I don't know what the commands ! are supposed to do in the code you show, other than raising many errors.



        The command ! is only allowed in math mode (unless redefined, which I'd discourage). It's purpose is to insert a negative thin space, which is useful in several places. For instance



        biggl(frac12112-1biggr)^!2


        is an improvement over ^2, because it moves the exponent towards the parenthesis and takes care of its bending.



        Another place where it is helpful is in 2/!log x, because for technical reasons / is an ordinary symbol and TeX would add a thin space between it and the “log” operator.



        Here's a picture: left the output with !, right without.



        enter image description here



        If you want to tighten a table, reduce the size of tabcolsep. Using explicit negative spaces all over the place is not the correct way.



        And never use resizebox on a table.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 16 mins ago









        egreg

        689k8518353084




        689k8518353084




















            up vote
            3
            down vote













            This symbol is usually defined as



             ! negative thin space (normally 1/6 of a quad)


            It is commonly used in tables, and formulas among other ways to manipulate spaces in LaTeX



            And before you do post a question, please do run a search with similar keywords on this site. Hope this helps.






            share|improve this answer
















            • 2




              Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
              – daleif
              37 mins ago










            • @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
              – GermanShepherd
              33 mins ago














            up vote
            3
            down vote













            This symbol is usually defined as



             ! negative thin space (normally 1/6 of a quad)


            It is commonly used in tables, and formulas among other ways to manipulate spaces in LaTeX



            And before you do post a question, please do run a search with similar keywords on this site. Hope this helps.






            share|improve this answer
















            • 2




              Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
              – daleif
              37 mins ago










            • @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
              – GermanShepherd
              33 mins ago












            up vote
            3
            down vote










            up vote
            3
            down vote









            This symbol is usually defined as



             ! negative thin space (normally 1/6 of a quad)


            It is commonly used in tables, and formulas among other ways to manipulate spaces in LaTeX



            And before you do post a question, please do run a search with similar keywords on this site. Hope this helps.






            share|improve this answer












            This symbol is usually defined as



             ! negative thin space (normally 1/6 of a quad)


            It is commonly used in tables, and formulas among other ways to manipulate spaces in LaTeX



            And before you do post a question, please do run a search with similar keywords on this site. Hope this helps.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 56 mins ago









            GermanShepherd

            1279




            1279







            • 2




              Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
              – daleif
              37 mins ago










            • @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
              – GermanShepherd
              33 mins ago












            • 2




              Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
              – daleif
              37 mins ago










            • @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
              – GermanShepherd
              33 mins ago







            2




            2




            Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
            – daleif
            37 mins ago




            Commonly used in tables? Please explain. I hardly never see it used other than in a few math constructions.
            – daleif
            37 mins ago












            @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
            – GermanShepherd
            33 mins ago




            @daleif I am not sure if I can provide examples that are relevant here, since it is a matter of usage, and remember coming across it in tables.
            – GermanShepherd
            33 mins ago

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455375%2fwhat-does-aka-backslash-exclamation-mark-do%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery