Math equation display issues











up vote
1
down vote

favorite












I write this math equation in mathtype first, and then convert it into latex code:



begin{block}{Membership functions Trapezoidal - Low}
[forall u in R,{rm{ }}{mu _L}(u) = left{ {begin{array}{*{20}{c}}{1{rm{ if }}0 le u le 0,2}\{frac{{0,3 - u}}{{0,1}}{rm{ if }}0,2 < u < 0,3}\{0{rm{ if u}} ge 0,3}end{array}} right.]
end{block}


However, as you can see, the display is not the same. So how can I fix this issues? Thanks



enter image description here



enter image description here










share|improve this question







New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • welcome to tex.sx. the main problem i see is that there are no spaces around the "if" in the output. input spaces are essentially ignored in (la)tex, so have either to be entered explicitly, or entered in a "text" mode. (the latex code provided by the converter is not really very good, but you haven't said what converter was used, so i'll let it go at that.) probably the easiest way to salvage this is to add a "slash space" ( ) before and after each "if", within the scope of the braced {rm if }.
    – barbara beeton
    Nov 27 at 3:11










  • The rm command has been deprecated for well over 20 years.
    – egreg
    Nov 27 at 7:54















up vote
1
down vote

favorite












I write this math equation in mathtype first, and then convert it into latex code:



begin{block}{Membership functions Trapezoidal - Low}
[forall u in R,{rm{ }}{mu _L}(u) = left{ {begin{array}{*{20}{c}}{1{rm{ if }}0 le u le 0,2}\{frac{{0,3 - u}}{{0,1}}{rm{ if }}0,2 < u < 0,3}\{0{rm{ if u}} ge 0,3}end{array}} right.]
end{block}


However, as you can see, the display is not the same. So how can I fix this issues? Thanks



enter image description here



enter image description here










share|improve this question







New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • welcome to tex.sx. the main problem i see is that there are no spaces around the "if" in the output. input spaces are essentially ignored in (la)tex, so have either to be entered explicitly, or entered in a "text" mode. (the latex code provided by the converter is not really very good, but you haven't said what converter was used, so i'll let it go at that.) probably the easiest way to salvage this is to add a "slash space" ( ) before and after each "if", within the scope of the braced {rm if }.
    – barbara beeton
    Nov 27 at 3:11










  • The rm command has been deprecated for well over 20 years.
    – egreg
    Nov 27 at 7:54













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I write this math equation in mathtype first, and then convert it into latex code:



begin{block}{Membership functions Trapezoidal - Low}
[forall u in R,{rm{ }}{mu _L}(u) = left{ {begin{array}{*{20}{c}}{1{rm{ if }}0 le u le 0,2}\{frac{{0,3 - u}}{{0,1}}{rm{ if }}0,2 < u < 0,3}\{0{rm{ if u}} ge 0,3}end{array}} right.]
end{block}


However, as you can see, the display is not the same. So how can I fix this issues? Thanks



enter image description here



enter image description here










share|improve this question







New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I write this math equation in mathtype first, and then convert it into latex code:



begin{block}{Membership functions Trapezoidal - Low}
[forall u in R,{rm{ }}{mu _L}(u) = left{ {begin{array}{*{20}{c}}{1{rm{ if }}0 le u le 0,2}\{frac{{0,3 - u}}{{0,1}}{rm{ if }}0,2 < u < 0,3}\{0{rm{ if u}} ge 0,3}end{array}} right.]
end{block}


However, as you can see, the display is not the same. So how can I fix this issues? Thanks



enter image description here



enter image description here







math-mode






share|improve this question







New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 27 at 1:39









Dai Tran

82




82




New contributor




Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Dai Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • welcome to tex.sx. the main problem i see is that there are no spaces around the "if" in the output. input spaces are essentially ignored in (la)tex, so have either to be entered explicitly, or entered in a "text" mode. (the latex code provided by the converter is not really very good, but you haven't said what converter was used, so i'll let it go at that.) probably the easiest way to salvage this is to add a "slash space" ( ) before and after each "if", within the scope of the braced {rm if }.
    – barbara beeton
    Nov 27 at 3:11










  • The rm command has been deprecated for well over 20 years.
    – egreg
    Nov 27 at 7:54


















  • welcome to tex.sx. the main problem i see is that there are no spaces around the "if" in the output. input spaces are essentially ignored in (la)tex, so have either to be entered explicitly, or entered in a "text" mode. (the latex code provided by the converter is not really very good, but you haven't said what converter was used, so i'll let it go at that.) probably the easiest way to salvage this is to add a "slash space" ( ) before and after each "if", within the scope of the braced {rm if }.
    – barbara beeton
    Nov 27 at 3:11










  • The rm command has been deprecated for well over 20 years.
    – egreg
    Nov 27 at 7:54
















welcome to tex.sx. the main problem i see is that there are no spaces around the "if" in the output. input spaces are essentially ignored in (la)tex, so have either to be entered explicitly, or entered in a "text" mode. (the latex code provided by the converter is not really very good, but you haven't said what converter was used, so i'll let it go at that.) probably the easiest way to salvage this is to add a "slash space" ( ) before and after each "if", within the scope of the braced {rm if }.
– barbara beeton
Nov 27 at 3:11




welcome to tex.sx. the main problem i see is that there are no spaces around the "if" in the output. input spaces are essentially ignored in (la)tex, so have either to be entered explicitly, or entered in a "text" mode. (the latex code provided by the converter is not really very good, but you haven't said what converter was used, so i'll let it go at that.) probably the easiest way to salvage this is to add a "slash space" ( ) before and after each "if", within the scope of the braced {rm if }.
– barbara beeton
Nov 27 at 3:11












The rm command has been deprecated for well over 20 years.
– egreg
Nov 27 at 7:54




The rm command has been deprecated for well over 20 years.
– egreg
Nov 27 at 7:54










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










Don't use MathType to write equations: the code it generates is awful and, in some cases, plainly wrong.



For instance, the command rm has been deprecated for well over twenty years.



Here's a suggestion with a two-column array: the first column is center aligned and in displaystyle; the second column is left aligned and in text mode.



documentclass{beamer}
usepackage{mathtools,array}

usetheme{Warsaw}

begin{document}

begin{frame}
frametitle{A test}

begin{block}{Membership functions Trapezoidal - Low}
[
forall u in R,quad
mu_L(u) =
begin{cases}
begin{array}{@{} >{displaystyle}c >{$}l<{$} @{}}
1 & if $0 le u le 0{,}2$ \[1ex]
frac{0{,}3 - u}{0,1} & if $0{,}2 < u < 0{,}3$ \[2ex]
0 & if $u ge 0{,}3$
end{array}
end{cases}
]
end{block}

end{frame}

end{document}


Note how to avoid the unwanted space after the comma in numbers.



enter image description here






share|improve this answer




























    up vote
    0
    down vote













    You can change the array function to have three entries. For example the following code:



    begin{equation}
    forall u in R,{rm{ }}{mu _L}(u) = left{ begin{array}{lll}1&;;{rm{ if }}&;;0 le u le 0,2\ frac{0,3 - u}{0,1}&;;{rm{ if }}&;;0,2 < u < 0,3\0&;;rm{ if } &;;uge 0,3end{array} right.
    end{equation}


    enter image description here






    share|improve this answer










    New contributor




    Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.


















    • Thank you. Change array function is really useful.
      – Dai Tran
      Nov 27 at 5:20











    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: 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
    });


    }
    });






    Dai Tran is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461921%2fmath-equation-display-issues%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








    up vote
    1
    down vote



    accepted










    Don't use MathType to write equations: the code it generates is awful and, in some cases, plainly wrong.



    For instance, the command rm has been deprecated for well over twenty years.



    Here's a suggestion with a two-column array: the first column is center aligned and in displaystyle; the second column is left aligned and in text mode.



    documentclass{beamer}
    usepackage{mathtools,array}

    usetheme{Warsaw}

    begin{document}

    begin{frame}
    frametitle{A test}

    begin{block}{Membership functions Trapezoidal - Low}
    [
    forall u in R,quad
    mu_L(u) =
    begin{cases}
    begin{array}{@{} >{displaystyle}c >{$}l<{$} @{}}
    1 & if $0 le u le 0{,}2$ \[1ex]
    frac{0{,}3 - u}{0,1} & if $0{,}2 < u < 0{,}3$ \[2ex]
    0 & if $u ge 0{,}3$
    end{array}
    end{cases}
    ]
    end{block}

    end{frame}

    end{document}


    Note how to avoid the unwanted space after the comma in numbers.



    enter image description here






    share|improve this answer

























      up vote
      1
      down vote



      accepted










      Don't use MathType to write equations: the code it generates is awful and, in some cases, plainly wrong.



      For instance, the command rm has been deprecated for well over twenty years.



      Here's a suggestion with a two-column array: the first column is center aligned and in displaystyle; the second column is left aligned and in text mode.



      documentclass{beamer}
      usepackage{mathtools,array}

      usetheme{Warsaw}

      begin{document}

      begin{frame}
      frametitle{A test}

      begin{block}{Membership functions Trapezoidal - Low}
      [
      forall u in R,quad
      mu_L(u) =
      begin{cases}
      begin{array}{@{} >{displaystyle}c >{$}l<{$} @{}}
      1 & if $0 le u le 0{,}2$ \[1ex]
      frac{0{,}3 - u}{0,1} & if $0{,}2 < u < 0{,}3$ \[2ex]
      0 & if $u ge 0{,}3$
      end{array}
      end{cases}
      ]
      end{block}

      end{frame}

      end{document}


      Note how to avoid the unwanted space after the comma in numbers.



      enter image description here






      share|improve this answer























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        Don't use MathType to write equations: the code it generates is awful and, in some cases, plainly wrong.



        For instance, the command rm has been deprecated for well over twenty years.



        Here's a suggestion with a two-column array: the first column is center aligned and in displaystyle; the second column is left aligned and in text mode.



        documentclass{beamer}
        usepackage{mathtools,array}

        usetheme{Warsaw}

        begin{document}

        begin{frame}
        frametitle{A test}

        begin{block}{Membership functions Trapezoidal - Low}
        [
        forall u in R,quad
        mu_L(u) =
        begin{cases}
        begin{array}{@{} >{displaystyle}c >{$}l<{$} @{}}
        1 & if $0 le u le 0{,}2$ \[1ex]
        frac{0{,}3 - u}{0,1} & if $0{,}2 < u < 0{,}3$ \[2ex]
        0 & if $u ge 0{,}3$
        end{array}
        end{cases}
        ]
        end{block}

        end{frame}

        end{document}


        Note how to avoid the unwanted space after the comma in numbers.



        enter image description here






        share|improve this answer












        Don't use MathType to write equations: the code it generates is awful and, in some cases, plainly wrong.



        For instance, the command rm has been deprecated for well over twenty years.



        Here's a suggestion with a two-column array: the first column is center aligned and in displaystyle; the second column is left aligned and in text mode.



        documentclass{beamer}
        usepackage{mathtools,array}

        usetheme{Warsaw}

        begin{document}

        begin{frame}
        frametitle{A test}

        begin{block}{Membership functions Trapezoidal - Low}
        [
        forall u in R,quad
        mu_L(u) =
        begin{cases}
        begin{array}{@{} >{displaystyle}c >{$}l<{$} @{}}
        1 & if $0 le u le 0{,}2$ \[1ex]
        frac{0{,}3 - u}{0,1} & if $0{,}2 < u < 0{,}3$ \[2ex]
        0 & if $u ge 0{,}3$
        end{array}
        end{cases}
        ]
        end{block}

        end{frame}

        end{document}


        Note how to avoid the unwanted space after the comma in numbers.



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 27 at 8:36









        egreg

        702k8618703144




        702k8618703144






















            up vote
            0
            down vote













            You can change the array function to have three entries. For example the following code:



            begin{equation}
            forall u in R,{rm{ }}{mu _L}(u) = left{ begin{array}{lll}1&;;{rm{ if }}&;;0 le u le 0,2\ frac{0,3 - u}{0,1}&;;{rm{ if }}&;;0,2 < u < 0,3\0&;;rm{ if } &;;uge 0,3end{array} right.
            end{equation}


            enter image description here






            share|improve this answer










            New contributor




            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.


















            • Thank you. Change array function is really useful.
              – Dai Tran
              Nov 27 at 5:20















            up vote
            0
            down vote













            You can change the array function to have three entries. For example the following code:



            begin{equation}
            forall u in R,{rm{ }}{mu _L}(u) = left{ begin{array}{lll}1&;;{rm{ if }}&;;0 le u le 0,2\ frac{0,3 - u}{0,1}&;;{rm{ if }}&;;0,2 < u < 0,3\0&;;rm{ if } &;;uge 0,3end{array} right.
            end{equation}


            enter image description here






            share|improve this answer










            New contributor




            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.


















            • Thank you. Change array function is really useful.
              – Dai Tran
              Nov 27 at 5:20













            up vote
            0
            down vote










            up vote
            0
            down vote









            You can change the array function to have three entries. For example the following code:



            begin{equation}
            forall u in R,{rm{ }}{mu _L}(u) = left{ begin{array}{lll}1&;;{rm{ if }}&;;0 le u le 0,2\ frac{0,3 - u}{0,1}&;;{rm{ if }}&;;0,2 < u < 0,3\0&;;rm{ if } &;;uge 0,3end{array} right.
            end{equation}


            enter image description here






            share|improve this answer










            New contributor




            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            You can change the array function to have three entries. For example the following code:



            begin{equation}
            forall u in R,{rm{ }}{mu _L}(u) = left{ begin{array}{lll}1&;;{rm{ if }}&;;0 le u le 0,2\ frac{0,3 - u}{0,1}&;;{rm{ if }}&;;0,2 < u < 0,3\0&;;rm{ if } &;;uge 0,3end{array} right.
            end{equation}


            enter image description here







            share|improve this answer










            New contributor




            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            share|improve this answer



            share|improve this answer








            edited Nov 27 at 5:31









            Stefan Pinnow

            19.2k83175




            19.2k83175






            New contributor




            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.









            answered Nov 27 at 5:10









            Onur Tavaslıoğlu

            12




            12




            New contributor




            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





            New contributor





            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






            Onur Tavaslıoğlu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.












            • Thank you. Change array function is really useful.
              – Dai Tran
              Nov 27 at 5:20


















            • Thank you. Change array function is really useful.
              – Dai Tran
              Nov 27 at 5:20
















            Thank you. Change array function is really useful.
            – Dai Tran
            Nov 27 at 5:20




            Thank you. Change array function is really useful.
            – Dai Tran
            Nov 27 at 5:20










            Dai Tran is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Dai Tran is a new contributor. Be nice, and check out our Code of Conduct.













            Dai Tran is a new contributor. Be nice, and check out our Code of Conduct.












            Dai Tran is a new contributor. Be nice, and check out our Code of Conduct.
















            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%2f461921%2fmath-equation-display-issues%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 send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?