Undefined Control Sequence when using $R$












0














Using the following packages;



documentclass{article}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
usepackage{fancyhdr}
usepackage{amsthm}
usepackage{float}
usepackage[round]{natbib}
usepackage{lastpage}
usepackage{indentfirst}
usepackage{graphicx}
usepackage{amsmath}


It says undefined control sequence when writing



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in text{$R$} ^2 $ 
(two-dimensional Euclidean space) satisfying the equation:}


also changing this to the following doesn't work



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in R ^2 $ 


I have included



usepackage{amsmath}


like it says to do to fix the issue on most forums










share|improve this question






















  • And where is R defined? Please, make complete small document that we can tested it. Welcome to the site!
    – Zarko
    Nov 19 '16 at 23:01










  • Beside the point, but text{$R$} doesn't really make sense. You're leaving math mode with text, and then immediately going back into it with $.
    – Teepeemm
    Nov 20 '16 at 1:11
















0














Using the following packages;



documentclass{article}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
usepackage{fancyhdr}
usepackage{amsthm}
usepackage{float}
usepackage[round]{natbib}
usepackage{lastpage}
usepackage{indentfirst}
usepackage{graphicx}
usepackage{amsmath}


It says undefined control sequence when writing



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in text{$R$} ^2 $ 
(two-dimensional Euclidean space) satisfying the equation:}


also changing this to the following doesn't work



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in R ^2 $ 


I have included



usepackage{amsmath}


like it says to do to fix the issue on most forums










share|improve this question






















  • And where is R defined? Please, make complete small document that we can tested it. Welcome to the site!
    – Zarko
    Nov 19 '16 at 23:01










  • Beside the point, but text{$R$} doesn't really make sense. You're leaving math mode with text, and then immediately going back into it with $.
    – Teepeemm
    Nov 20 '16 at 1:11














0












0








0







Using the following packages;



documentclass{article}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
usepackage{fancyhdr}
usepackage{amsthm}
usepackage{float}
usepackage[round]{natbib}
usepackage{lastpage}
usepackage{indentfirst}
usepackage{graphicx}
usepackage{amsmath}


It says undefined control sequence when writing



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in text{$R$} ^2 $ 
(two-dimensional Euclidean space) satisfying the equation:}


also changing this to the following doesn't work



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in R ^2 $ 


I have included



usepackage{amsmath}


like it says to do to fix the issue on most forums










share|improve this question













Using the following packages;



documentclass{article}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
usepackage{fancyhdr}
usepackage{amsthm}
usepackage{float}
usepackage[round]{natbib}
usepackage{lastpage}
usepackage{indentfirst}
usepackage{graphicx}
usepackage{amsmath}


It says undefined control sequence when writing



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in text{$R$} ^2 $ 
(two-dimensional Euclidean space) satisfying the equation:}


also changing this to the following doesn't work



{It is called a simple arc of a curve, the set $C$ of points $M(x,y) in R ^2 $ 


I have included



usepackage{amsmath}


like it says to do to fix the issue on most forums







math-mode math-operators sharelatex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 '16 at 22:57









Sam HarperSam Harper

1281216




1281216












  • And where is R defined? Please, make complete small document that we can tested it. Welcome to the site!
    – Zarko
    Nov 19 '16 at 23:01










  • Beside the point, but text{$R$} doesn't really make sense. You're leaving math mode with text, and then immediately going back into it with $.
    – Teepeemm
    Nov 20 '16 at 1:11


















  • And where is R defined? Please, make complete small document that we can tested it. Welcome to the site!
    – Zarko
    Nov 19 '16 at 23:01










  • Beside the point, but text{$R$} doesn't really make sense. You're leaving math mode with text, and then immediately going back into it with $.
    – Teepeemm
    Nov 20 '16 at 1:11
















And where is R defined? Please, make complete small document that we can tested it. Welcome to the site!
– Zarko
Nov 19 '16 at 23:01




And where is R defined? Please, make complete small document that we can tested it. Welcome to the site!
– Zarko
Nov 19 '16 at 23:01












Beside the point, but text{$R$} doesn't really make sense. You're leaving math mode with text, and then immediately going back into it with $.
– Teepeemm
Nov 20 '16 at 1:11




Beside the point, but text{$R$} doesn't really make sense. You're leaving math mode with text, and then immediately going back into it with $.
– Teepeemm
Nov 20 '16 at 1:11










2 Answers
2






active

oldest

votes


















5














R is not a standard LaTeX command and is not defined by any of the packages you load. It's a custom command that a lot of people seem to like, but you have to define it yourself. Presumably you want something like



newcommand{R}{mathbb{R}}


Although I myself recommend against it. The reasons are subtle. There's nothing to stop you defining one letter commands like R and, as many discussions on this site have concluded, R is not inherently any more or less dangerous than realnumbers, however a lot of people land themselves in trouble because they don't realise that a lot of one letter commands are already defined by LaTeX. They then define over them and get weird errors that cause a lot more problems than they're worth. R is also pretty syntactically meaningless. Myself, if I had to do this, I would go with reals instead, I think, but this is really none of my business, it's up to you what shortcuts you wish to define, if, indeed, you wish to define them.



Anyway, you will need the amssymb package for this to work, or amsfonts, since they define mathbb{}.



documentclass{article}
usepackage{amsmath}
usepackage{amssymb}

newcommand{R}{mathbb{R}}

begin{document}

It is called a simple arc of a curve, the set $C$ of points
$M(x,y) in R^{2}$

end{document}


enter image description here



In other news, I'm not quite sure why you seem to have braces around your sentence, in general they would not be needed so I've removed them here.






share|improve this answer

















  • 1




    Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
    – Bernard
    Nov 19 '16 at 23:21





















0














To expand on the excellent accepted answer: There are many alternatives to amsfonta for this symbol.



In the modern toolchain, there is no need to load any additional packages beyond unicode-math to get a ℝ that looks like the one from the early answer. It is already set up by default.



However, you can load the double-struck alphabet from any math font, or any display font that you’d rather use, with the range= option of setmathfont. For example, to use Typoliner:



documentclass[varwidth]{standalone}
usepackage{unicode-math}

defaultfontfeatures{Scale=MatchUppercase}

setmathfont{Latin Modern Math}
setmathfont[range=bb]{Typoliner-RW-Light.ttf}

newcommandsetR{symbb{R}}

begin{document}
Let (S subset setR).
end{document}


Typoliner sample



If you need compatibility with PDFLaTeX, or you would rather use a legacy NFSS font, you might want to use the mathalfa package to select your supplemental math alphabets.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f340015%2fundefined-control-sequence-when-using-r%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









    5














    R is not a standard LaTeX command and is not defined by any of the packages you load. It's a custom command that a lot of people seem to like, but you have to define it yourself. Presumably you want something like



    newcommand{R}{mathbb{R}}


    Although I myself recommend against it. The reasons are subtle. There's nothing to stop you defining one letter commands like R and, as many discussions on this site have concluded, R is not inherently any more or less dangerous than realnumbers, however a lot of people land themselves in trouble because they don't realise that a lot of one letter commands are already defined by LaTeX. They then define over them and get weird errors that cause a lot more problems than they're worth. R is also pretty syntactically meaningless. Myself, if I had to do this, I would go with reals instead, I think, but this is really none of my business, it's up to you what shortcuts you wish to define, if, indeed, you wish to define them.



    Anyway, you will need the amssymb package for this to work, or amsfonts, since they define mathbb{}.



    documentclass{article}
    usepackage{amsmath}
    usepackage{amssymb}

    newcommand{R}{mathbb{R}}

    begin{document}

    It is called a simple arc of a curve, the set $C$ of points
    $M(x,y) in R^{2}$

    end{document}


    enter image description here



    In other news, I'm not quite sure why you seem to have braces around your sentence, in general they would not be needed so I've removed them here.






    share|improve this answer

















    • 1




      Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
      – Bernard
      Nov 19 '16 at 23:21


















    5














    R is not a standard LaTeX command and is not defined by any of the packages you load. It's a custom command that a lot of people seem to like, but you have to define it yourself. Presumably you want something like



    newcommand{R}{mathbb{R}}


    Although I myself recommend against it. The reasons are subtle. There's nothing to stop you defining one letter commands like R and, as many discussions on this site have concluded, R is not inherently any more or less dangerous than realnumbers, however a lot of people land themselves in trouble because they don't realise that a lot of one letter commands are already defined by LaTeX. They then define over them and get weird errors that cause a lot more problems than they're worth. R is also pretty syntactically meaningless. Myself, if I had to do this, I would go with reals instead, I think, but this is really none of my business, it's up to you what shortcuts you wish to define, if, indeed, you wish to define them.



    Anyway, you will need the amssymb package for this to work, or amsfonts, since they define mathbb{}.



    documentclass{article}
    usepackage{amsmath}
    usepackage{amssymb}

    newcommand{R}{mathbb{R}}

    begin{document}

    It is called a simple arc of a curve, the set $C$ of points
    $M(x,y) in R^{2}$

    end{document}


    enter image description here



    In other news, I'm not quite sure why you seem to have braces around your sentence, in general they would not be needed so I've removed them here.






    share|improve this answer

















    • 1




      Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
      – Bernard
      Nov 19 '16 at 23:21
















    5












    5








    5






    R is not a standard LaTeX command and is not defined by any of the packages you load. It's a custom command that a lot of people seem to like, but you have to define it yourself. Presumably you want something like



    newcommand{R}{mathbb{R}}


    Although I myself recommend against it. The reasons are subtle. There's nothing to stop you defining one letter commands like R and, as many discussions on this site have concluded, R is not inherently any more or less dangerous than realnumbers, however a lot of people land themselves in trouble because they don't realise that a lot of one letter commands are already defined by LaTeX. They then define over them and get weird errors that cause a lot more problems than they're worth. R is also pretty syntactically meaningless. Myself, if I had to do this, I would go with reals instead, I think, but this is really none of my business, it's up to you what shortcuts you wish to define, if, indeed, you wish to define them.



    Anyway, you will need the amssymb package for this to work, or amsfonts, since they define mathbb{}.



    documentclass{article}
    usepackage{amsmath}
    usepackage{amssymb}

    newcommand{R}{mathbb{R}}

    begin{document}

    It is called a simple arc of a curve, the set $C$ of points
    $M(x,y) in R^{2}$

    end{document}


    enter image description here



    In other news, I'm not quite sure why you seem to have braces around your sentence, in general they would not be needed so I've removed them here.






    share|improve this answer












    R is not a standard LaTeX command and is not defined by any of the packages you load. It's a custom command that a lot of people seem to like, but you have to define it yourself. Presumably you want something like



    newcommand{R}{mathbb{R}}


    Although I myself recommend against it. The reasons are subtle. There's nothing to stop you defining one letter commands like R and, as many discussions on this site have concluded, R is not inherently any more or less dangerous than realnumbers, however a lot of people land themselves in trouble because they don't realise that a lot of one letter commands are already defined by LaTeX. They then define over them and get weird errors that cause a lot more problems than they're worth. R is also pretty syntactically meaningless. Myself, if I had to do this, I would go with reals instead, I think, but this is really none of my business, it's up to you what shortcuts you wish to define, if, indeed, you wish to define them.



    Anyway, you will need the amssymb package for this to work, or amsfonts, since they define mathbb{}.



    documentclass{article}
    usepackage{amsmath}
    usepackage{amssymb}

    newcommand{R}{mathbb{R}}

    begin{document}

    It is called a simple arc of a curve, the set $C$ of points
    $M(x,y) in R^{2}$

    end{document}


    enter image description here



    In other news, I'm not quite sure why you seem to have braces around your sentence, in general they would not be needed so I've removed them here.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 19 '16 at 23:05









    Au101Au101

    7,00632252




    7,00632252








    • 1




      Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
      – Bernard
      Nov 19 '16 at 23:21
















    • 1




      Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
      – Bernard
      Nov 19 '16 at 23:21










    1




    1




    Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
    – Bernard
    Nov 19 '16 at 23:21






    Many people use double letters for this reason, like RR, CC, &c. And some purists prefer to define them as mathbf{R}, mathbf{C},…
    – Bernard
    Nov 19 '16 at 23:21













    0














    To expand on the excellent accepted answer: There are many alternatives to amsfonta for this symbol.



    In the modern toolchain, there is no need to load any additional packages beyond unicode-math to get a ℝ that looks like the one from the early answer. It is already set up by default.



    However, you can load the double-struck alphabet from any math font, or any display font that you’d rather use, with the range= option of setmathfont. For example, to use Typoliner:



    documentclass[varwidth]{standalone}
    usepackage{unicode-math}

    defaultfontfeatures{Scale=MatchUppercase}

    setmathfont{Latin Modern Math}
    setmathfont[range=bb]{Typoliner-RW-Light.ttf}

    newcommandsetR{symbb{R}}

    begin{document}
    Let (S subset setR).
    end{document}


    Typoliner sample



    If you need compatibility with PDFLaTeX, or you would rather use a legacy NFSS font, you might want to use the mathalfa package to select your supplemental math alphabets.






    share|improve this answer




























      0














      To expand on the excellent accepted answer: There are many alternatives to amsfonta for this symbol.



      In the modern toolchain, there is no need to load any additional packages beyond unicode-math to get a ℝ that looks like the one from the early answer. It is already set up by default.



      However, you can load the double-struck alphabet from any math font, or any display font that you’d rather use, with the range= option of setmathfont. For example, to use Typoliner:



      documentclass[varwidth]{standalone}
      usepackage{unicode-math}

      defaultfontfeatures{Scale=MatchUppercase}

      setmathfont{Latin Modern Math}
      setmathfont[range=bb]{Typoliner-RW-Light.ttf}

      newcommandsetR{symbb{R}}

      begin{document}
      Let (S subset setR).
      end{document}


      Typoliner sample



      If you need compatibility with PDFLaTeX, or you would rather use a legacy NFSS font, you might want to use the mathalfa package to select your supplemental math alphabets.






      share|improve this answer


























        0












        0








        0






        To expand on the excellent accepted answer: There are many alternatives to amsfonta for this symbol.



        In the modern toolchain, there is no need to load any additional packages beyond unicode-math to get a ℝ that looks like the one from the early answer. It is already set up by default.



        However, you can load the double-struck alphabet from any math font, or any display font that you’d rather use, with the range= option of setmathfont. For example, to use Typoliner:



        documentclass[varwidth]{standalone}
        usepackage{unicode-math}

        defaultfontfeatures{Scale=MatchUppercase}

        setmathfont{Latin Modern Math}
        setmathfont[range=bb]{Typoliner-RW-Light.ttf}

        newcommandsetR{symbb{R}}

        begin{document}
        Let (S subset setR).
        end{document}


        Typoliner sample



        If you need compatibility with PDFLaTeX, or you would rather use a legacy NFSS font, you might want to use the mathalfa package to select your supplemental math alphabets.






        share|improve this answer














        To expand on the excellent accepted answer: There are many alternatives to amsfonta for this symbol.



        In the modern toolchain, there is no need to load any additional packages beyond unicode-math to get a ℝ that looks like the one from the early answer. It is already set up by default.



        However, you can load the double-struck alphabet from any math font, or any display font that you’d rather use, with the range= option of setmathfont. For example, to use Typoliner:



        documentclass[varwidth]{standalone}
        usepackage{unicode-math}

        defaultfontfeatures{Scale=MatchUppercase}

        setmathfont{Latin Modern Math}
        setmathfont[range=bb]{Typoliner-RW-Light.ttf}

        newcommandsetR{symbb{R}}

        begin{document}
        Let (S subset setR).
        end{document}


        Typoliner sample



        If you need compatibility with PDFLaTeX, or you would rather use a legacy NFSS font, you might want to use the mathalfa package to select your supplemental math alphabets.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 5 hours ago

























        answered 5 hours ago









        DavislorDavislor

        4,8621024




        4,8621024






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f340015%2fundefined-control-sequence-when-using-r%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

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks