What's the difference between mathrm and operatorname?Difference between mathrm, operatorname and text?Define additional math operators to be typeset in romanWhich command should I use for textual subscripts in math mode?Further questions about mathrm and operatorname: spacing after colonHow to properly typeset E_mathrmk in beamerCorrectly left align a set of equationsHow to insert long subscripts involving characters?Error using equation*Incompatibility of lmodern and fourier?What's the difference between align and align*?Difference between textrm and mathrmWhat is the difference of mathop, operatorname and DeclareMathOperator?Difference between mathrm, operatorname and text?What is the difference between dfrac and frac?What's the difference between split and aligned?What's the difference between DeclareMathOperator and mathop?What is the difference between ifmmode and textormath?What's the difference between mspace and hspace in math mode?Further questions about mathrm and operatorname: spacing after colon

prove that the matrix A is diagonalizable

What does it mean to describe someone as a butt steak?

Why do I get two different answers for this counting problem?

Is delete *p an alternative to delete [] p?

Is there a hemisphere-neutral way of specifying a season?

Today is the Center

Will google still index a page if I use a $_SESSION variable?

How badly should I try to prevent a user from XSSing themselves?

Emailing HOD to enhance faculty application

Infinite Abelian subgroup of infinite non Abelian group example

How to prevent "they're falling in love" trope

If a Gelatinous Cube takes up the entire space of a Pit Trap, what happens when a creature falls into the trap but succeeds on the saving throw?

How do I write bicross product symbols in latex?

What mechanic is there to disable a threat instead of killing it?

Facing a paradox: Earnshaw's theorem in one dimension

Brothers & sisters

How to draw the figure with four pentagons?

90's TV series where a boy goes to another dimension through portal near power lines

Why is consensus so controversial in Britain?

Why is the 'in' operator throwing an error with a string literal instead of logging false?

Is it possible to download Internet Explorer on my Mac running OS X El Capitan?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

Why can't we play rap on piano?

Anagram holiday



What's the difference between mathrm and operatorname?


Difference between mathrm, operatorname and text?Define additional math operators to be typeset in romanWhich command should I use for textual subscripts in math mode?Further questions about mathrm and operatorname: spacing after colonHow to properly typeset E_mathrmk in beamerCorrectly left align a set of equationsHow to insert long subscripts involving characters?Error using equation*Incompatibility of lmodern and fourier?What's the difference between align and align*?Difference between textrm and mathrmWhat is the difference of mathop, operatorname and DeclareMathOperator?Difference between mathrm, operatorname and text?What is the difference between dfrac and frac?What's the difference between split and aligned?What's the difference between DeclareMathOperator and mathop?What is the difference between ifmmode and textormath?What's the difference between mspace and hspace in math mode?Further questions about mathrm and operatorname: spacing after colon













167















I apparently can't see the difference in a compilation (pdflatex) between mathrm and operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what occasions?










share|improve this question




























    167















    I apparently can't see the difference in a compilation (pdflatex) between mathrm and operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what occasions?










    share|improve this question


























      167












      167








      167


      51






      I apparently can't see the difference in a compilation (pdflatex) between mathrm and operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what occasions?










      share|improve this question
















      I apparently can't see the difference in a compilation (pdflatex) between mathrm and operatorname. So, as in the title the question is: is there a difference? Which one is preferable in what occasions?







      math-mode amsmath math-operators






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 25 '12 at 13:28









      doncherry

      35.3k23137209




      35.3k23137209










      asked Mar 18 '12 at 9:42









      AndyAndy

      945278




      945278




















          3 Answers
          3






          active

          oldest

          votes


















          194














          There are many differences. The main one is in the fact that mathrmxyz behaves like an ordinary letter, while operatornamexyz behaves like function names such as sin. Here's an illustration



          $sin x + sin(x+y) + asin z$

          $mathrmsin x + mathrmsin(x+y) + amathrmsinz$


          enter image description here



          where it's clear that the second line is wrongly typeset. Even if your "operator" requires parentheses after it, it should be operatorname, as the third summand shows, where a thin space separates the coefficient from the operator.



          Another subtle difference is in how some characters are interpreted in mathrm and in operatorname. Suppose you have an operator to be called "pre-norm", with a hyphen. Here's the example



          $operatornamepre-norm(mathbfv)$

          $mathrmpre-norm(mathbfv)$


          enter image description here



          and now it's clear what is to be used. Indeed operatorname (and the same holds for macros defined with DeclareMathOperator) treats in a special way punctuation symbols; mathrm, instead, treats them as math symbols.






          share|improve this answer


















          • 1





            Can you please tell the full form of the rm in mathrm? Thank you!

            – Gaurang Tandon
            Feb 14 '18 at 5:12






          • 2





            @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

            – egreg
            Feb 14 '18 at 8:59


















          34














          mathrm:



          It is like math mode (no spaces), but in upright mode. The font size isn't changed.



          operatorname:



          The argument is written in upright mode but with some additional
          space before and behind.



          The following example shows the differences:



          documentclass[]article
          usepackageamsmath
          begindocument
          [xoperatornamefooy]
          [xmathrmfooy]
          enddocument


          enter image description here






          share|improve this answer






























            9














            In other LaTeX environments mathrmxyz is useful. In MathJax v 2.0



            $ i \, mathrmsinh ; $


            gave the equivalent output as $ i sinh x $. MathJax did not recognize operatorname.






            share|improve this answer




















            • 9





              operatorname is now supported with the ASMmath.js TeX extension.

              – ChrisR
              Dec 4 '13 at 16:10











            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%2f48459%2fwhats-the-difference-between-mathrm-and-operatorname%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            194














            There are many differences. The main one is in the fact that mathrmxyz behaves like an ordinary letter, while operatornamexyz behaves like function names such as sin. Here's an illustration



            $sin x + sin(x+y) + asin z$

            $mathrmsin x + mathrmsin(x+y) + amathrmsinz$


            enter image description here



            where it's clear that the second line is wrongly typeset. Even if your "operator" requires parentheses after it, it should be operatorname, as the third summand shows, where a thin space separates the coefficient from the operator.



            Another subtle difference is in how some characters are interpreted in mathrm and in operatorname. Suppose you have an operator to be called "pre-norm", with a hyphen. Here's the example



            $operatornamepre-norm(mathbfv)$

            $mathrmpre-norm(mathbfv)$


            enter image description here



            and now it's clear what is to be used. Indeed operatorname (and the same holds for macros defined with DeclareMathOperator) treats in a special way punctuation symbols; mathrm, instead, treats them as math symbols.






            share|improve this answer


















            • 1





              Can you please tell the full form of the rm in mathrm? Thank you!

              – Gaurang Tandon
              Feb 14 '18 at 5:12






            • 2





              @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

              – egreg
              Feb 14 '18 at 8:59















            194














            There are many differences. The main one is in the fact that mathrmxyz behaves like an ordinary letter, while operatornamexyz behaves like function names such as sin. Here's an illustration



            $sin x + sin(x+y) + asin z$

            $mathrmsin x + mathrmsin(x+y) + amathrmsinz$


            enter image description here



            where it's clear that the second line is wrongly typeset. Even if your "operator" requires parentheses after it, it should be operatorname, as the third summand shows, where a thin space separates the coefficient from the operator.



            Another subtle difference is in how some characters are interpreted in mathrm and in operatorname. Suppose you have an operator to be called "pre-norm", with a hyphen. Here's the example



            $operatornamepre-norm(mathbfv)$

            $mathrmpre-norm(mathbfv)$


            enter image description here



            and now it's clear what is to be used. Indeed operatorname (and the same holds for macros defined with DeclareMathOperator) treats in a special way punctuation symbols; mathrm, instead, treats them as math symbols.






            share|improve this answer


















            • 1





              Can you please tell the full form of the rm in mathrm? Thank you!

              – Gaurang Tandon
              Feb 14 '18 at 5:12






            • 2





              @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

              – egreg
              Feb 14 '18 at 8:59













            194












            194








            194







            There are many differences. The main one is in the fact that mathrmxyz behaves like an ordinary letter, while operatornamexyz behaves like function names such as sin. Here's an illustration



            $sin x + sin(x+y) + asin z$

            $mathrmsin x + mathrmsin(x+y) + amathrmsinz$


            enter image description here



            where it's clear that the second line is wrongly typeset. Even if your "operator" requires parentheses after it, it should be operatorname, as the third summand shows, where a thin space separates the coefficient from the operator.



            Another subtle difference is in how some characters are interpreted in mathrm and in operatorname. Suppose you have an operator to be called "pre-norm", with a hyphen. Here's the example



            $operatornamepre-norm(mathbfv)$

            $mathrmpre-norm(mathbfv)$


            enter image description here



            and now it's clear what is to be used. Indeed operatorname (and the same holds for macros defined with DeclareMathOperator) treats in a special way punctuation symbols; mathrm, instead, treats them as math symbols.






            share|improve this answer













            There are many differences. The main one is in the fact that mathrmxyz behaves like an ordinary letter, while operatornamexyz behaves like function names such as sin. Here's an illustration



            $sin x + sin(x+y) + asin z$

            $mathrmsin x + mathrmsin(x+y) + amathrmsinz$


            enter image description here



            where it's clear that the second line is wrongly typeset. Even if your "operator" requires parentheses after it, it should be operatorname, as the third summand shows, where a thin space separates the coefficient from the operator.



            Another subtle difference is in how some characters are interpreted in mathrm and in operatorname. Suppose you have an operator to be called "pre-norm", with a hyphen. Here's the example



            $operatornamepre-norm(mathbfv)$

            $mathrmpre-norm(mathbfv)$


            enter image description here



            and now it's clear what is to be used. Indeed operatorname (and the same holds for macros defined with DeclareMathOperator) treats in a special way punctuation symbols; mathrm, instead, treats them as math symbols.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 18 '12 at 10:05









            egregegreg

            731k8919303252




            731k8919303252







            • 1





              Can you please tell the full form of the rm in mathrm? Thank you!

              – Gaurang Tandon
              Feb 14 '18 at 5:12






            • 2





              @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

              – egreg
              Feb 14 '18 at 8:59












            • 1





              Can you please tell the full form of the rm in mathrm? Thank you!

              – Gaurang Tandon
              Feb 14 '18 at 5:12






            • 2





              @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

              – egreg
              Feb 14 '18 at 8:59







            1




            1





            Can you please tell the full form of the rm in mathrm? Thank you!

            – Gaurang Tandon
            Feb 14 '18 at 5:12





            Can you please tell the full form of the rm in mathrm? Thank you!

            – Gaurang Tandon
            Feb 14 '18 at 5:12




            2




            2





            @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

            – egreg
            Feb 14 '18 at 8:59





            @GaurangTandon rm stands for “roman”, that conventionally denotes the upright type used in the document.

            – egreg
            Feb 14 '18 at 8:59











            34














            mathrm:



            It is like math mode (no spaces), but in upright mode. The font size isn't changed.



            operatorname:



            The argument is written in upright mode but with some additional
            space before and behind.



            The following example shows the differences:



            documentclass[]article
            usepackageamsmath
            begindocument
            [xoperatornamefooy]
            [xmathrmfooy]
            enddocument


            enter image description here






            share|improve this answer



























              34














              mathrm:



              It is like math mode (no spaces), but in upright mode. The font size isn't changed.



              operatorname:



              The argument is written in upright mode but with some additional
              space before and behind.



              The following example shows the differences:



              documentclass[]article
              usepackageamsmath
              begindocument
              [xoperatornamefooy]
              [xmathrmfooy]
              enddocument


              enter image description here






              share|improve this answer

























                34












                34








                34







                mathrm:



                It is like math mode (no spaces), but in upright mode. The font size isn't changed.



                operatorname:



                The argument is written in upright mode but with some additional
                space before and behind.



                The following example shows the differences:



                documentclass[]article
                usepackageamsmath
                begindocument
                [xoperatornamefooy]
                [xmathrmfooy]
                enddocument


                enter image description here






                share|improve this answer













                mathrm:



                It is like math mode (no spaces), but in upright mode. The font size isn't changed.



                operatorname:



                The argument is written in upright mode but with some additional
                space before and behind.



                The following example shows the differences:



                documentclass[]article
                usepackageamsmath
                begindocument
                [xoperatornamefooy]
                [xmathrmfooy]
                enddocument


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 18 '12 at 9:48









                Marco DanielMarco Daniel

                78.5k13223388




                78.5k13223388





















                    9














                    In other LaTeX environments mathrmxyz is useful. In MathJax v 2.0



                    $ i \, mathrmsinh ; $


                    gave the equivalent output as $ i sinh x $. MathJax did not recognize operatorname.






                    share|improve this answer




















                    • 9





                      operatorname is now supported with the ASMmath.js TeX extension.

                      – ChrisR
                      Dec 4 '13 at 16:10















                    9














                    In other LaTeX environments mathrmxyz is useful. In MathJax v 2.0



                    $ i \, mathrmsinh ; $


                    gave the equivalent output as $ i sinh x $. MathJax did not recognize operatorname.






                    share|improve this answer




















                    • 9





                      operatorname is now supported with the ASMmath.js TeX extension.

                      – ChrisR
                      Dec 4 '13 at 16:10













                    9












                    9








                    9







                    In other LaTeX environments mathrmxyz is useful. In MathJax v 2.0



                    $ i \, mathrmsinh ; $


                    gave the equivalent output as $ i sinh x $. MathJax did not recognize operatorname.






                    share|improve this answer















                    In other LaTeX environments mathrmxyz is useful. In MathJax v 2.0



                    $ i \, mathrmsinh ; $


                    gave the equivalent output as $ i sinh x $. MathJax did not recognize operatorname.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Aug 26 '12 at 16:17









                    bodo

                    4,66211856




                    4,66211856










                    answered Aug 26 '12 at 16:02









                    cheltonchelton

                    9911




                    9911







                    • 9





                      operatorname is now supported with the ASMmath.js TeX extension.

                      – ChrisR
                      Dec 4 '13 at 16:10












                    • 9





                      operatorname is now supported with the ASMmath.js TeX extension.

                      – ChrisR
                      Dec 4 '13 at 16:10







                    9




                    9





                    operatorname is now supported with the ASMmath.js TeX extension.

                    – ChrisR
                    Dec 4 '13 at 16:10





                    operatorname is now supported with the ASMmath.js TeX extension.

                    – ChrisR
                    Dec 4 '13 at 16:10

















                    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%2f48459%2fwhats-the-difference-between-mathrm-and-operatorname%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

                    How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

                    Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

                    Haugesund Nexus externi | Tabula navigationisHaugesund pagina interretialisAmplifica