What is wrong in the following latex math code?












1















$$
left. begin{array}{c}
frac{NR}{K}=50\
0<Rleqslant 35\
NRgeqslant 65\
N>0\
K=24\
NRgeqslant text{600 }left( an,,initial,,guess right)\
end{array} right} Rightarrow left{ begin{array}{c}
K_{min}=24\
N_{min}=40\
R_{max}=30\
end{array} right.
\
left. begin{array}{c}
R_U=frac{NR}{I}\
R_D=frac{NR}{J}\
K=I+J\
end{array} right} Rightarrow left{ begin{array}{c}
I=K-Kalpha =24-24cdot frac{1}{4}=18\
J=Kalpha =24cdot frac{1}{4}=6\
end{array} right.
$$


I have tried to debug this code for a long time. The editor keeps telling me there is an error "Undefined control sequence". Can anyone help me out find where the problem is? Thanks.










share|improve this question

























  • First of all: don't use $$.

    – JouleV
    Mar 31 at 5:40











  • Why? This is not an inline math equation.

    – Larry
    Mar 31 at 5:40











  • Read here for why.

    – JouleV
    Mar 31 at 5:41






  • 1





    You need to load amssymb, see here: tex.stackexchange.com/q/16592/121799

    – marmot
    Mar 31 at 5:47






  • 2





    @marmot amsmath is also needed.

    – JouleV
    Mar 31 at 5:51
















1















$$
left. begin{array}{c}
frac{NR}{K}=50\
0<Rleqslant 35\
NRgeqslant 65\
N>0\
K=24\
NRgeqslant text{600 }left( an,,initial,,guess right)\
end{array} right} Rightarrow left{ begin{array}{c}
K_{min}=24\
N_{min}=40\
R_{max}=30\
end{array} right.
\
left. begin{array}{c}
R_U=frac{NR}{I}\
R_D=frac{NR}{J}\
K=I+J\
end{array} right} Rightarrow left{ begin{array}{c}
I=K-Kalpha =24-24cdot frac{1}{4}=18\
J=Kalpha =24cdot frac{1}{4}=6\
end{array} right.
$$


I have tried to debug this code for a long time. The editor keeps telling me there is an error "Undefined control sequence". Can anyone help me out find where the problem is? Thanks.










share|improve this question

























  • First of all: don't use $$.

    – JouleV
    Mar 31 at 5:40











  • Why? This is not an inline math equation.

    – Larry
    Mar 31 at 5:40











  • Read here for why.

    – JouleV
    Mar 31 at 5:41






  • 1





    You need to load amssymb, see here: tex.stackexchange.com/q/16592/121799

    – marmot
    Mar 31 at 5:47






  • 2





    @marmot amsmath is also needed.

    – JouleV
    Mar 31 at 5:51














1












1








1








$$
left. begin{array}{c}
frac{NR}{K}=50\
0<Rleqslant 35\
NRgeqslant 65\
N>0\
K=24\
NRgeqslant text{600 }left( an,,initial,,guess right)\
end{array} right} Rightarrow left{ begin{array}{c}
K_{min}=24\
N_{min}=40\
R_{max}=30\
end{array} right.
\
left. begin{array}{c}
R_U=frac{NR}{I}\
R_D=frac{NR}{J}\
K=I+J\
end{array} right} Rightarrow left{ begin{array}{c}
I=K-Kalpha =24-24cdot frac{1}{4}=18\
J=Kalpha =24cdot frac{1}{4}=6\
end{array} right.
$$


I have tried to debug this code for a long time. The editor keeps telling me there is an error "Undefined control sequence". Can anyone help me out find where the problem is? Thanks.










share|improve this question
















$$
left. begin{array}{c}
frac{NR}{K}=50\
0<Rleqslant 35\
NRgeqslant 65\
N>0\
K=24\
NRgeqslant text{600 }left( an,,initial,,guess right)\
end{array} right} Rightarrow left{ begin{array}{c}
K_{min}=24\
N_{min}=40\
R_{max}=30\
end{array} right.
\
left. begin{array}{c}
R_U=frac{NR}{I}\
R_D=frac{NR}{J}\
K=I+J\
end{array} right} Rightarrow left{ begin{array}{c}
I=K-Kalpha =24-24cdot frac{1}{4}=18\
J=Kalpha =24cdot frac{1}{4}=6\
end{array} right.
$$


I have tried to debug this code for a long time. The editor keeps telling me there is an error "Undefined control sequence". Can anyone help me out find where the problem is? Thanks.







equations amsmath






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 31 at 5:39









JouleV

12k22662




12k22662










asked Mar 31 at 5:37









LarryLarry

61




61













  • First of all: don't use $$.

    – JouleV
    Mar 31 at 5:40











  • Why? This is not an inline math equation.

    – Larry
    Mar 31 at 5:40











  • Read here for why.

    – JouleV
    Mar 31 at 5:41






  • 1





    You need to load amssymb, see here: tex.stackexchange.com/q/16592/121799

    – marmot
    Mar 31 at 5:47






  • 2





    @marmot amsmath is also needed.

    – JouleV
    Mar 31 at 5:51



















  • First of all: don't use $$.

    – JouleV
    Mar 31 at 5:40











  • Why? This is not an inline math equation.

    – Larry
    Mar 31 at 5:40











  • Read here for why.

    – JouleV
    Mar 31 at 5:41






  • 1





    You need to load amssymb, see here: tex.stackexchange.com/q/16592/121799

    – marmot
    Mar 31 at 5:47






  • 2





    @marmot amsmath is also needed.

    – JouleV
    Mar 31 at 5:51

















First of all: don't use $$.

– JouleV
Mar 31 at 5:40





First of all: don't use $$.

– JouleV
Mar 31 at 5:40













Why? This is not an inline math equation.

– Larry
Mar 31 at 5:40





Why? This is not an inline math equation.

– Larry
Mar 31 at 5:40













Read here for why.

– JouleV
Mar 31 at 5:41





Read here for why.

– JouleV
Mar 31 at 5:41




1




1





You need to load amssymb, see here: tex.stackexchange.com/q/16592/121799

– marmot
Mar 31 at 5:47





You need to load amssymb, see here: tex.stackexchange.com/q/16592/121799

– marmot
Mar 31 at 5:47




2




2





@marmot amsmath is also needed.

– JouleV
Mar 31 at 5:51





@marmot amsmath is also needed.

– JouleV
Mar 31 at 5:51










1 Answer
1






active

oldest

votes


















2














In LaTeX, you have to use packages to use some predefined commands, like leqslant, geqslant or text. This is one of the main differences of LaTeX and MathJax. The first two commands require amssymb, while the last one needs amsmath. Btw, don't use $$ $$ like in MathJax.



documentclass{article}
usepackage{amssymb}
usepackage{amsmath}
begin{document}
[
left. begin{array}{c}
frac{NR}{K}=50\
0<Rleqslant 35\
NRgeqslant 65\
N>0\
K=24\
NRgeqslant text{600 }left( an,,initial,,guess right)\
end{array} right} Rightarrow left{ begin{array}{c}
K_{min}=24\
N_{min}=40\
R_{max}=30\
end{array} right.
\
left. begin{array}{c}
R_U=frac{NR}{I}\
R_D=frac{NR}{J}\
K=I+J\
end{array} right} Rightarrow left{ begin{array}{c}
I=K-Kalpha =24-24cdot frac{1}{4}=18\
J=Kalpha =24cdot frac{1}{4}=6\
end{array} right.
]
end{document}


enter image description here



However, why do you use array with left and right? The spacing is awful! Also, using either $$ or [ ] won't let you have line breaks.



documentclass{article}
usepackage{amssymb}
usepackage{amsmath}
begin{document}
begin{align*}
left.begin{aligned}
tfrac{NR}{K}=50\
0<Rleqslant 35\
NRgeqslant 65\
N>0\
K=24\
NRgeqslant600text{ (an initial guess)}
end{aligned}right}&Rightarrowbegin{cases}
R_U=frac{NR}{I}\
R_D=frac{NR}{J}\
K=I+J
end{cases}\
left.begin{aligned}
R_U=tfrac{NR}{I}\
R_D=tfrac{NR}{J}\
K=I+J
end{aligned}right}&Rightarrowbegin{cases}
I=K-Kalpha =24-24cdot frac{1}{4}=18\
J=Kalpha =24cdot frac{1}{4}=6
end{cases}
end{align*}
end{document}


enter image description here






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%2f482364%2fwhat-is-wrong-in-the-following-latex-math-code%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    In LaTeX, you have to use packages to use some predefined commands, like leqslant, geqslant or text. This is one of the main differences of LaTeX and MathJax. The first two commands require amssymb, while the last one needs amsmath. Btw, don't use $$ $$ like in MathJax.



    documentclass{article}
    usepackage{amssymb}
    usepackage{amsmath}
    begin{document}
    [
    left. begin{array}{c}
    frac{NR}{K}=50\
    0<Rleqslant 35\
    NRgeqslant 65\
    N>0\
    K=24\
    NRgeqslant text{600 }left( an,,initial,,guess right)\
    end{array} right} Rightarrow left{ begin{array}{c}
    K_{min}=24\
    N_{min}=40\
    R_{max}=30\
    end{array} right.
    \
    left. begin{array}{c}
    R_U=frac{NR}{I}\
    R_D=frac{NR}{J}\
    K=I+J\
    end{array} right} Rightarrow left{ begin{array}{c}
    I=K-Kalpha =24-24cdot frac{1}{4}=18\
    J=Kalpha =24cdot frac{1}{4}=6\
    end{array} right.
    ]
    end{document}


    enter image description here



    However, why do you use array with left and right? The spacing is awful! Also, using either $$ or [ ] won't let you have line breaks.



    documentclass{article}
    usepackage{amssymb}
    usepackage{amsmath}
    begin{document}
    begin{align*}
    left.begin{aligned}
    tfrac{NR}{K}=50\
    0<Rleqslant 35\
    NRgeqslant 65\
    N>0\
    K=24\
    NRgeqslant600text{ (an initial guess)}
    end{aligned}right}&Rightarrowbegin{cases}
    R_U=frac{NR}{I}\
    R_D=frac{NR}{J}\
    K=I+J
    end{cases}\
    left.begin{aligned}
    R_U=tfrac{NR}{I}\
    R_D=tfrac{NR}{J}\
    K=I+J
    end{aligned}right}&Rightarrowbegin{cases}
    I=K-Kalpha =24-24cdot frac{1}{4}=18\
    J=Kalpha =24cdot frac{1}{4}=6
    end{cases}
    end{align*}
    end{document}


    enter image description here






    share|improve this answer




























      2














      In LaTeX, you have to use packages to use some predefined commands, like leqslant, geqslant or text. This is one of the main differences of LaTeX and MathJax. The first two commands require amssymb, while the last one needs amsmath. Btw, don't use $$ $$ like in MathJax.



      documentclass{article}
      usepackage{amssymb}
      usepackage{amsmath}
      begin{document}
      [
      left. begin{array}{c}
      frac{NR}{K}=50\
      0<Rleqslant 35\
      NRgeqslant 65\
      N>0\
      K=24\
      NRgeqslant text{600 }left( an,,initial,,guess right)\
      end{array} right} Rightarrow left{ begin{array}{c}
      K_{min}=24\
      N_{min}=40\
      R_{max}=30\
      end{array} right.
      \
      left. begin{array}{c}
      R_U=frac{NR}{I}\
      R_D=frac{NR}{J}\
      K=I+J\
      end{array} right} Rightarrow left{ begin{array}{c}
      I=K-Kalpha =24-24cdot frac{1}{4}=18\
      J=Kalpha =24cdot frac{1}{4}=6\
      end{array} right.
      ]
      end{document}


      enter image description here



      However, why do you use array with left and right? The spacing is awful! Also, using either $$ or [ ] won't let you have line breaks.



      documentclass{article}
      usepackage{amssymb}
      usepackage{amsmath}
      begin{document}
      begin{align*}
      left.begin{aligned}
      tfrac{NR}{K}=50\
      0<Rleqslant 35\
      NRgeqslant 65\
      N>0\
      K=24\
      NRgeqslant600text{ (an initial guess)}
      end{aligned}right}&Rightarrowbegin{cases}
      R_U=frac{NR}{I}\
      R_D=frac{NR}{J}\
      K=I+J
      end{cases}\
      left.begin{aligned}
      R_U=tfrac{NR}{I}\
      R_D=tfrac{NR}{J}\
      K=I+J
      end{aligned}right}&Rightarrowbegin{cases}
      I=K-Kalpha =24-24cdot frac{1}{4}=18\
      J=Kalpha =24cdot frac{1}{4}=6
      end{cases}
      end{align*}
      end{document}


      enter image description here






      share|improve this answer


























        2












        2








        2







        In LaTeX, you have to use packages to use some predefined commands, like leqslant, geqslant or text. This is one of the main differences of LaTeX and MathJax. The first two commands require amssymb, while the last one needs amsmath. Btw, don't use $$ $$ like in MathJax.



        documentclass{article}
        usepackage{amssymb}
        usepackage{amsmath}
        begin{document}
        [
        left. begin{array}{c}
        frac{NR}{K}=50\
        0<Rleqslant 35\
        NRgeqslant 65\
        N>0\
        K=24\
        NRgeqslant text{600 }left( an,,initial,,guess right)\
        end{array} right} Rightarrow left{ begin{array}{c}
        K_{min}=24\
        N_{min}=40\
        R_{max}=30\
        end{array} right.
        \
        left. begin{array}{c}
        R_U=frac{NR}{I}\
        R_D=frac{NR}{J}\
        K=I+J\
        end{array} right} Rightarrow left{ begin{array}{c}
        I=K-Kalpha =24-24cdot frac{1}{4}=18\
        J=Kalpha =24cdot frac{1}{4}=6\
        end{array} right.
        ]
        end{document}


        enter image description here



        However, why do you use array with left and right? The spacing is awful! Also, using either $$ or [ ] won't let you have line breaks.



        documentclass{article}
        usepackage{amssymb}
        usepackage{amsmath}
        begin{document}
        begin{align*}
        left.begin{aligned}
        tfrac{NR}{K}=50\
        0<Rleqslant 35\
        NRgeqslant 65\
        N>0\
        K=24\
        NRgeqslant600text{ (an initial guess)}
        end{aligned}right}&Rightarrowbegin{cases}
        R_U=frac{NR}{I}\
        R_D=frac{NR}{J}\
        K=I+J
        end{cases}\
        left.begin{aligned}
        R_U=tfrac{NR}{I}\
        R_D=tfrac{NR}{J}\
        K=I+J
        end{aligned}right}&Rightarrowbegin{cases}
        I=K-Kalpha =24-24cdot frac{1}{4}=18\
        J=Kalpha =24cdot frac{1}{4}=6
        end{cases}
        end{align*}
        end{document}


        enter image description here






        share|improve this answer













        In LaTeX, you have to use packages to use some predefined commands, like leqslant, geqslant or text. This is one of the main differences of LaTeX and MathJax. The first two commands require amssymb, while the last one needs amsmath. Btw, don't use $$ $$ like in MathJax.



        documentclass{article}
        usepackage{amssymb}
        usepackage{amsmath}
        begin{document}
        [
        left. begin{array}{c}
        frac{NR}{K}=50\
        0<Rleqslant 35\
        NRgeqslant 65\
        N>0\
        K=24\
        NRgeqslant text{600 }left( an,,initial,,guess right)\
        end{array} right} Rightarrow left{ begin{array}{c}
        K_{min}=24\
        N_{min}=40\
        R_{max}=30\
        end{array} right.
        \
        left. begin{array}{c}
        R_U=frac{NR}{I}\
        R_D=frac{NR}{J}\
        K=I+J\
        end{array} right} Rightarrow left{ begin{array}{c}
        I=K-Kalpha =24-24cdot frac{1}{4}=18\
        J=Kalpha =24cdot frac{1}{4}=6\
        end{array} right.
        ]
        end{document}


        enter image description here



        However, why do you use array with left and right? The spacing is awful! Also, using either $$ or [ ] won't let you have line breaks.



        documentclass{article}
        usepackage{amssymb}
        usepackage{amsmath}
        begin{document}
        begin{align*}
        left.begin{aligned}
        tfrac{NR}{K}=50\
        0<Rleqslant 35\
        NRgeqslant 65\
        N>0\
        K=24\
        NRgeqslant600text{ (an initial guess)}
        end{aligned}right}&Rightarrowbegin{cases}
        R_U=frac{NR}{I}\
        R_D=frac{NR}{J}\
        K=I+J
        end{cases}\
        left.begin{aligned}
        R_U=tfrac{NR}{I}\
        R_D=tfrac{NR}{J}\
        K=I+J
        end{aligned}right}&Rightarrowbegin{cases}
        I=K-Kalpha =24-24cdot frac{1}{4}=18\
        J=Kalpha =24cdot frac{1}{4}=6
        end{cases}
        end{align*}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 31 at 5:59









        JouleVJouleV

        12k22662




        12k22662






























            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%2f482364%2fwhat-is-wrong-in-the-following-latex-math-code%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 to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?