All letters upright in align mode












1















I'm using the document class article and I would like to know if there is an easy way to write aligned equations with all letters automatically uprighted.



Since my equations contain lot of letters, I should use text each time.



Looking for it I found All letters upright in math mode (equivalent to rm) which suggests to use the mathrm command. Unfortunately it does not seem to work when it contains the & symbol (which is needed in order to align the equations).



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{physics}

begin{document}

begin{align*}
mathrm{TDD &= frac{18}{9} = 2'}\
mathrm{TF &= TI-TDD = 25-2 = 23'}\
text{TR} &= frac{18-5}{9} = 2'\
text{TT} &= text{TI}+text{TRT}+text{TD}+text{TRS} = 25+2+5+1 = 33'
end{align*}

end{document}


enter image description here










share|improve this question


















  • 1





    the normal way would be to write mathrm{TDD} although it is possible to change the default (probably an answer on site already I'll look...

    – David Carlisle
    Feb 8 at 14:11






  • 1





    I would use mathrm{TR} and mathrm{TDD} (not text) but you could do this, replacing mathtt by mathrm tex.stackexchange.com/a/63000/1090

    – David Carlisle
    Feb 8 at 14:15













  • Thank you! We are in the right direction, there is still a little problem in the visualization since two different fonts are used (one before the & sign, another one after it). Look here i.imgur.com/hqF3sLJ.png

    – sound wave
    Feb 8 at 14:23








  • 1





    No you forced a default of mathtt !! as I said you need that answer but using mathrm instead, also you need to remove all uses of text and of course fix the brackets in any remaning mathrm just to be around each identifier not spanning &) If you get an error such as ! Missing } inserted. do not even look at the pdf output, it is just a possible debugging aid, tex makes no attempt at making sensible typeset output after an error.

    – David Carlisle
    Feb 8 at 14:28








  • 1





    that sounds like an unrelated error, hard to guess what you did wrong, but align should never be in math mode so I don't see how you could get that error or have formulas before the alignment? The code in my answer generates no error.

    – David Carlisle
    Feb 8 at 14:41
















1















I'm using the document class article and I would like to know if there is an easy way to write aligned equations with all letters automatically uprighted.



Since my equations contain lot of letters, I should use text each time.



Looking for it I found All letters upright in math mode (equivalent to rm) which suggests to use the mathrm command. Unfortunately it does not seem to work when it contains the & symbol (which is needed in order to align the equations).



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{physics}

begin{document}

begin{align*}
mathrm{TDD &= frac{18}{9} = 2'}\
mathrm{TF &= TI-TDD = 25-2 = 23'}\
text{TR} &= frac{18-5}{9} = 2'\
text{TT} &= text{TI}+text{TRT}+text{TD}+text{TRS} = 25+2+5+1 = 33'
end{align*}

end{document}


enter image description here










share|improve this question


















  • 1





    the normal way would be to write mathrm{TDD} although it is possible to change the default (probably an answer on site already I'll look...

    – David Carlisle
    Feb 8 at 14:11






  • 1





    I would use mathrm{TR} and mathrm{TDD} (not text) but you could do this, replacing mathtt by mathrm tex.stackexchange.com/a/63000/1090

    – David Carlisle
    Feb 8 at 14:15













  • Thank you! We are in the right direction, there is still a little problem in the visualization since two different fonts are used (one before the & sign, another one after it). Look here i.imgur.com/hqF3sLJ.png

    – sound wave
    Feb 8 at 14:23








  • 1





    No you forced a default of mathtt !! as I said you need that answer but using mathrm instead, also you need to remove all uses of text and of course fix the brackets in any remaning mathrm just to be around each identifier not spanning &) If you get an error such as ! Missing } inserted. do not even look at the pdf output, it is just a possible debugging aid, tex makes no attempt at making sensible typeset output after an error.

    – David Carlisle
    Feb 8 at 14:28








  • 1





    that sounds like an unrelated error, hard to guess what you did wrong, but align should never be in math mode so I don't see how you could get that error or have formulas before the alignment? The code in my answer generates no error.

    – David Carlisle
    Feb 8 at 14:41














1












1








1








I'm using the document class article and I would like to know if there is an easy way to write aligned equations with all letters automatically uprighted.



Since my equations contain lot of letters, I should use text each time.



Looking for it I found All letters upright in math mode (equivalent to rm) which suggests to use the mathrm command. Unfortunately it does not seem to work when it contains the & symbol (which is needed in order to align the equations).



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{physics}

begin{document}

begin{align*}
mathrm{TDD &= frac{18}{9} = 2'}\
mathrm{TF &= TI-TDD = 25-2 = 23'}\
text{TR} &= frac{18-5}{9} = 2'\
text{TT} &= text{TI}+text{TRT}+text{TD}+text{TRS} = 25+2+5+1 = 33'
end{align*}

end{document}


enter image description here










share|improve this question














I'm using the document class article and I would like to know if there is an easy way to write aligned equations with all letters automatically uprighted.



Since my equations contain lot of letters, I should use text each time.



Looking for it I found All letters upright in math mode (equivalent to rm) which suggests to use the mathrm command. Unfortunately it does not seem to work when it contains the & symbol (which is needed in order to align the equations).



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{physics}

begin{document}

begin{align*}
mathrm{TDD &= frac{18}{9} = 2'}\
mathrm{TF &= TI-TDD = 25-2 = 23'}\
text{TR} &= frac{18-5}{9} = 2'\
text{TT} &= text{TI}+text{TRT}+text{TD}+text{TRS} = 25+2+5+1 = 33'
end{align*}

end{document}


enter image description here







math-mode equations align






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 8 at 14:07









sound wavesound wave

1495




1495








  • 1





    the normal way would be to write mathrm{TDD} although it is possible to change the default (probably an answer on site already I'll look...

    – David Carlisle
    Feb 8 at 14:11






  • 1





    I would use mathrm{TR} and mathrm{TDD} (not text) but you could do this, replacing mathtt by mathrm tex.stackexchange.com/a/63000/1090

    – David Carlisle
    Feb 8 at 14:15













  • Thank you! We are in the right direction, there is still a little problem in the visualization since two different fonts are used (one before the & sign, another one after it). Look here i.imgur.com/hqF3sLJ.png

    – sound wave
    Feb 8 at 14:23








  • 1





    No you forced a default of mathtt !! as I said you need that answer but using mathrm instead, also you need to remove all uses of text and of course fix the brackets in any remaning mathrm just to be around each identifier not spanning &) If you get an error such as ! Missing } inserted. do not even look at the pdf output, it is just a possible debugging aid, tex makes no attempt at making sensible typeset output after an error.

    – David Carlisle
    Feb 8 at 14:28








  • 1





    that sounds like an unrelated error, hard to guess what you did wrong, but align should never be in math mode so I don't see how you could get that error or have formulas before the alignment? The code in my answer generates no error.

    – David Carlisle
    Feb 8 at 14:41














  • 1





    the normal way would be to write mathrm{TDD} although it is possible to change the default (probably an answer on site already I'll look...

    – David Carlisle
    Feb 8 at 14:11






  • 1





    I would use mathrm{TR} and mathrm{TDD} (not text) but you could do this, replacing mathtt by mathrm tex.stackexchange.com/a/63000/1090

    – David Carlisle
    Feb 8 at 14:15













  • Thank you! We are in the right direction, there is still a little problem in the visualization since two different fonts are used (one before the & sign, another one after it). Look here i.imgur.com/hqF3sLJ.png

    – sound wave
    Feb 8 at 14:23








  • 1





    No you forced a default of mathtt !! as I said you need that answer but using mathrm instead, also you need to remove all uses of text and of course fix the brackets in any remaning mathrm just to be around each identifier not spanning &) If you get an error such as ! Missing } inserted. do not even look at the pdf output, it is just a possible debugging aid, tex makes no attempt at making sensible typeset output after an error.

    – David Carlisle
    Feb 8 at 14:28








  • 1





    that sounds like an unrelated error, hard to guess what you did wrong, but align should never be in math mode so I don't see how you could get that error or have formulas before the alignment? The code in my answer generates no error.

    – David Carlisle
    Feb 8 at 14:41








1




1





the normal way would be to write mathrm{TDD} although it is possible to change the default (probably an answer on site already I'll look...

– David Carlisle
Feb 8 at 14:11





the normal way would be to write mathrm{TDD} although it is possible to change the default (probably an answer on site already I'll look...

– David Carlisle
Feb 8 at 14:11




1




1





I would use mathrm{TR} and mathrm{TDD} (not text) but you could do this, replacing mathtt by mathrm tex.stackexchange.com/a/63000/1090

– David Carlisle
Feb 8 at 14:15







I would use mathrm{TR} and mathrm{TDD} (not text) but you could do this, replacing mathtt by mathrm tex.stackexchange.com/a/63000/1090

– David Carlisle
Feb 8 at 14:15















Thank you! We are in the right direction, there is still a little problem in the visualization since two different fonts are used (one before the & sign, another one after it). Look here i.imgur.com/hqF3sLJ.png

– sound wave
Feb 8 at 14:23







Thank you! We are in the right direction, there is still a little problem in the visualization since two different fonts are used (one before the & sign, another one after it). Look here i.imgur.com/hqF3sLJ.png

– sound wave
Feb 8 at 14:23






1




1





No you forced a default of mathtt !! as I said you need that answer but using mathrm instead, also you need to remove all uses of text and of course fix the brackets in any remaning mathrm just to be around each identifier not spanning &) If you get an error such as ! Missing } inserted. do not even look at the pdf output, it is just a possible debugging aid, tex makes no attempt at making sensible typeset output after an error.

– David Carlisle
Feb 8 at 14:28







No you forced a default of mathtt !! as I said you need that answer but using mathrm instead, also you need to remove all uses of text and of course fix the brackets in any remaning mathrm just to be around each identifier not spanning &) If you get an error such as ! Missing } inserted. do not even look at the pdf output, it is just a possible debugging aid, tex makes no attempt at making sensible typeset output after an error.

– David Carlisle
Feb 8 at 14:28






1




1





that sounds like an unrelated error, hard to guess what you did wrong, but align should never be in math mode so I don't see how you could get that error or have formulas before the alignment? The code in my answer generates no error.

– David Carlisle
Feb 8 at 14:41





that sounds like an unrelated error, hard to guess what you did wrong, but align should never be in math mode so I don't see how you could get that error or have formulas before the alignment? The code in my answer generates no error.

– David Carlisle
Feb 8 at 14:41










2 Answers
2






active

oldest

votes


















3














You can not have & inside {} it is not really mathrm that is causing the error.



enter image description here



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{physics}

begin{document}

Normal way
begin{align*}
mathrm{TDD} &= frac{18}{9} = 2'\
mathrm{TF} &= mathrm{TI}-mathrm{TDD} = 25-2 = 23'\
mathrm{TR} &= frac{18-5}{9} = 2'\
mathrm{TT} &= mathrm{TI}+mathrm{TRT}+mathrm{TD}+mathrm{TRS} = 25+2+5+1 = 33'
end{align*}

I wouldn't do this
everymath{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}}
begin{align*}
TDD &= frac{18}{9} = 2'\
TF &= TI-TDD = 25-2 = 23'\
TR &= frac{18-5}{9} = 2'\
TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
end{align*}


end{document}





share|improve this answer
























  • Thank you very much, this solve all my problems! Why wouldn't you do that?

    – sound wave
    Feb 8 at 14:46











  • @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

    – David Carlisle
    Feb 8 at 14:55











  • You are right, but since this document I am working on it is only for personal use, it is good.

    – sound wave
    Feb 8 at 15:05











  • Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

    – sound wave
    Feb 8 at 15:07













  • @soundwave ah, yes, it would do that:-)

    – David Carlisle
    Feb 8 at 15:21



















1














A literal answer to your question is the [math-style=upright] package option of unicode-math, which you can switch on and off with the commands



unimathsetup{math-style=upright}

unimathsetup{math-style=ISO}


For example:



documentclass[varwidth=10cm, preview]{standalone}
usepackage{physics}
usepackage[math-style=upright]{unicode-math}

begin{document}

begin{align*}
TDD &= frac{18}{9} = 2' \
TF &= TI-TDD = 25-2 = 23' \
TR &= frac{18-5}{9} = 2' \
TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
end{align*}

end{document}


Physics equation sample



That said, I wouldn’t recommend you use this technique. (Although I do recommend that you use unicode-math if you’re allowed to!) The mathrm solution is still supported and will work fine.



I personally find it handy to declare something like newcommandTDD{ensuremath{mathop{mathrm{TDD}}}} and then write TDD in the equations. If you might for some reason want to write x TDD or TDD TI instead of x cdot TDD and TDD cdot TI, the mathop makes x TDD TI behave like log log x (that is, typeset like an operator name).



documentclass[varwidth=10cm, preview]{standalone}
usepackage[T1]{fontenc}
usepackage{physics}

newcommandupvar[1]{ensuremath{mathop{mathrm{#1}}}}
newcommandTD{upvar{TD}}
newcommandTDD{upvar{TDD}}
newcommandTF{upvar{TF}}
newcommandTI{upvar{TI}}
newcommandTR{upvar{TR}}
newcommandTRS{upvar{TRS}}
newcommandTRT{upvar{TRT}}
newcommandTT{upvar{TT}}

begin{document}

begin{align*}
TDD &= frac{18}{9} = 2' \
TF &= TI-TDD = 25-2 = 23' \
TR &= frac{18-5}{9} = 2' \
TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
end{align*}

end{document}


This is just like typing log or sin. An existing shorthand for this is operatorname{TDD} from amsmath.






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%2f473929%2fall-letters-upright-in-align-mode%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









    3














    You can not have & inside {} it is not really mathrm that is causing the error.



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{physics}

    begin{document}

    Normal way
    begin{align*}
    mathrm{TDD} &= frac{18}{9} = 2'\
    mathrm{TF} &= mathrm{TI}-mathrm{TDD} = 25-2 = 23'\
    mathrm{TR} &= frac{18-5}{9} = 2'\
    mathrm{TT} &= mathrm{TI}+mathrm{TRT}+mathrm{TD}+mathrm{TRS} = 25+2+5+1 = 33'
    end{align*}

    I wouldn't do this
    everymath{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}}
    begin{align*}
    TDD &= frac{18}{9} = 2'\
    TF &= TI-TDD = 25-2 = 23'\
    TR &= frac{18-5}{9} = 2'\
    TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
    end{align*}


    end{document}





    share|improve this answer
























    • Thank you very much, this solve all my problems! Why wouldn't you do that?

      – sound wave
      Feb 8 at 14:46











    • @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

      – David Carlisle
      Feb 8 at 14:55











    • You are right, but since this document I am working on it is only for personal use, it is good.

      – sound wave
      Feb 8 at 15:05











    • Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

      – sound wave
      Feb 8 at 15:07













    • @soundwave ah, yes, it would do that:-)

      – David Carlisle
      Feb 8 at 15:21
















    3














    You can not have & inside {} it is not really mathrm that is causing the error.



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{physics}

    begin{document}

    Normal way
    begin{align*}
    mathrm{TDD} &= frac{18}{9} = 2'\
    mathrm{TF} &= mathrm{TI}-mathrm{TDD} = 25-2 = 23'\
    mathrm{TR} &= frac{18-5}{9} = 2'\
    mathrm{TT} &= mathrm{TI}+mathrm{TRT}+mathrm{TD}+mathrm{TRS} = 25+2+5+1 = 33'
    end{align*}

    I wouldn't do this
    everymath{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}}
    begin{align*}
    TDD &= frac{18}{9} = 2'\
    TF &= TI-TDD = 25-2 = 23'\
    TR &= frac{18-5}{9} = 2'\
    TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
    end{align*}


    end{document}





    share|improve this answer
























    • Thank you very much, this solve all my problems! Why wouldn't you do that?

      – sound wave
      Feb 8 at 14:46











    • @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

      – David Carlisle
      Feb 8 at 14:55











    • You are right, but since this document I am working on it is only for personal use, it is good.

      – sound wave
      Feb 8 at 15:05











    • Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

      – sound wave
      Feb 8 at 15:07













    • @soundwave ah, yes, it would do that:-)

      – David Carlisle
      Feb 8 at 15:21














    3












    3








    3







    You can not have & inside {} it is not really mathrm that is causing the error.



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{physics}

    begin{document}

    Normal way
    begin{align*}
    mathrm{TDD} &= frac{18}{9} = 2'\
    mathrm{TF} &= mathrm{TI}-mathrm{TDD} = 25-2 = 23'\
    mathrm{TR} &= frac{18-5}{9} = 2'\
    mathrm{TT} &= mathrm{TI}+mathrm{TRT}+mathrm{TD}+mathrm{TRS} = 25+2+5+1 = 33'
    end{align*}

    I wouldn't do this
    everymath{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}}
    begin{align*}
    TDD &= frac{18}{9} = 2'\
    TF &= TI-TDD = 25-2 = 23'\
    TR &= frac{18-5}{9} = 2'\
    TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
    end{align*}


    end{document}





    share|improve this answer













    You can not have & inside {} it is not really mathrm that is causing the error.



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{physics}

    begin{document}

    Normal way
    begin{align*}
    mathrm{TDD} &= frac{18}{9} = 2'\
    mathrm{TF} &= mathrm{TI}-mathrm{TDD} = 25-2 = 23'\
    mathrm{TR} &= frac{18-5}{9} = 2'\
    mathrm{TT} &= mathrm{TI}+mathrm{TRT}+mathrm{TD}+mathrm{TRS} = 25+2+5+1 = 33'
    end{align*}

    I wouldn't do this
    everymath{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}}
    begin{align*}
    TDD &= frac{18}{9} = 2'\
    TF &= TI-TDD = 25-2 = 23'\
    TR &= frac{18-5}{9} = 2'\
    TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
    end{align*}


    end{document}






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 8 at 14:38









    David CarlisleDavid Carlisle

    490k4111341883




    490k4111341883













    • Thank you very much, this solve all my problems! Why wouldn't you do that?

      – sound wave
      Feb 8 at 14:46











    • @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

      – David Carlisle
      Feb 8 at 14:55











    • You are right, but since this document I am working on it is only for personal use, it is good.

      – sound wave
      Feb 8 at 15:05











    • Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

      – sound wave
      Feb 8 at 15:07













    • @soundwave ah, yes, it would do that:-)

      – David Carlisle
      Feb 8 at 15:21



















    • Thank you very much, this solve all my problems! Why wouldn't you do that?

      – sound wave
      Feb 8 at 14:46











    • @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

      – David Carlisle
      Feb 8 at 14:55











    • You are right, but since this document I am working on it is only for personal use, it is good.

      – sound wave
      Feb 8 at 15:05











    • Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

      – sound wave
      Feb 8 at 15:07













    • @soundwave ah, yes, it would do that:-)

      – David Carlisle
      Feb 8 at 15:21

















    Thank you very much, this solve all my problems! Why wouldn't you do that?

    – sound wave
    Feb 8 at 14:46





    Thank you very much, this solve all my problems! Why wouldn't you do that?

    – sound wave
    Feb 8 at 14:46













    @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

    – David Carlisle
    Feb 8 at 14:55





    @soundwave because the fist form is much clearer especially if you alias mathrm to something semantically relevant in your context such as newcommandvar{mathrm} ... var{TR} ..... and poking changes into the latex setup to change the defaults will work in your document but mean you can not share those fragments in a mathjax website or some journal document class where changing the default styling would not be allowed or would break other code

    – David Carlisle
    Feb 8 at 14:55













    You are right, but since this document I am working on it is only for personal use, it is good.

    – sound wave
    Feb 8 at 15:05





    You are right, but since this document I am working on it is only for personal use, it is good.

    – sound wave
    Feb 8 at 15:05













    Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

    – sound wave
    Feb 8 at 15:07







    Anyway, the error I wrote before, is due to the command everydisplay{mathrm{xdeftmp{famthefamrelax}aftergrouptmp}} which do the same work as the other one, but in the framework [...].

    – sound wave
    Feb 8 at 15:07















    @soundwave ah, yes, it would do that:-)

    – David Carlisle
    Feb 8 at 15:21





    @soundwave ah, yes, it would do that:-)

    – David Carlisle
    Feb 8 at 15:21











    1














    A literal answer to your question is the [math-style=upright] package option of unicode-math, which you can switch on and off with the commands



    unimathsetup{math-style=upright}

    unimathsetup{math-style=ISO}


    For example:



    documentclass[varwidth=10cm, preview]{standalone}
    usepackage{physics}
    usepackage[math-style=upright]{unicode-math}

    begin{document}

    begin{align*}
    TDD &= frac{18}{9} = 2' \
    TF &= TI-TDD = 25-2 = 23' \
    TR &= frac{18-5}{9} = 2' \
    TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
    end{align*}

    end{document}


    Physics equation sample



    That said, I wouldn’t recommend you use this technique. (Although I do recommend that you use unicode-math if you’re allowed to!) The mathrm solution is still supported and will work fine.



    I personally find it handy to declare something like newcommandTDD{ensuremath{mathop{mathrm{TDD}}}} and then write TDD in the equations. If you might for some reason want to write x TDD or TDD TI instead of x cdot TDD and TDD cdot TI, the mathop makes x TDD TI behave like log log x (that is, typeset like an operator name).



    documentclass[varwidth=10cm, preview]{standalone}
    usepackage[T1]{fontenc}
    usepackage{physics}

    newcommandupvar[1]{ensuremath{mathop{mathrm{#1}}}}
    newcommandTD{upvar{TD}}
    newcommandTDD{upvar{TDD}}
    newcommandTF{upvar{TF}}
    newcommandTI{upvar{TI}}
    newcommandTR{upvar{TR}}
    newcommandTRS{upvar{TRS}}
    newcommandTRT{upvar{TRT}}
    newcommandTT{upvar{TT}}

    begin{document}

    begin{align*}
    TDD &= frac{18}{9} = 2' \
    TF &= TI-TDD = 25-2 = 23' \
    TR &= frac{18-5}{9} = 2' \
    TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
    end{align*}

    end{document}


    This is just like typing log or sin. An existing shorthand for this is operatorname{TDD} from amsmath.






    share|improve this answer






























      1














      A literal answer to your question is the [math-style=upright] package option of unicode-math, which you can switch on and off with the commands



      unimathsetup{math-style=upright}

      unimathsetup{math-style=ISO}


      For example:



      documentclass[varwidth=10cm, preview]{standalone}
      usepackage{physics}
      usepackage[math-style=upright]{unicode-math}

      begin{document}

      begin{align*}
      TDD &= frac{18}{9} = 2' \
      TF &= TI-TDD = 25-2 = 23' \
      TR &= frac{18-5}{9} = 2' \
      TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
      end{align*}

      end{document}


      Physics equation sample



      That said, I wouldn’t recommend you use this technique. (Although I do recommend that you use unicode-math if you’re allowed to!) The mathrm solution is still supported and will work fine.



      I personally find it handy to declare something like newcommandTDD{ensuremath{mathop{mathrm{TDD}}}} and then write TDD in the equations. If you might for some reason want to write x TDD or TDD TI instead of x cdot TDD and TDD cdot TI, the mathop makes x TDD TI behave like log log x (that is, typeset like an operator name).



      documentclass[varwidth=10cm, preview]{standalone}
      usepackage[T1]{fontenc}
      usepackage{physics}

      newcommandupvar[1]{ensuremath{mathop{mathrm{#1}}}}
      newcommandTD{upvar{TD}}
      newcommandTDD{upvar{TDD}}
      newcommandTF{upvar{TF}}
      newcommandTI{upvar{TI}}
      newcommandTR{upvar{TR}}
      newcommandTRS{upvar{TRS}}
      newcommandTRT{upvar{TRT}}
      newcommandTT{upvar{TT}}

      begin{document}

      begin{align*}
      TDD &= frac{18}{9} = 2' \
      TF &= TI-TDD = 25-2 = 23' \
      TR &= frac{18-5}{9} = 2' \
      TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
      end{align*}

      end{document}


      This is just like typing log or sin. An existing shorthand for this is operatorname{TDD} from amsmath.






      share|improve this answer




























        1












        1








        1







        A literal answer to your question is the [math-style=upright] package option of unicode-math, which you can switch on and off with the commands



        unimathsetup{math-style=upright}

        unimathsetup{math-style=ISO}


        For example:



        documentclass[varwidth=10cm, preview]{standalone}
        usepackage{physics}
        usepackage[math-style=upright]{unicode-math}

        begin{document}

        begin{align*}
        TDD &= frac{18}{9} = 2' \
        TF &= TI-TDD = 25-2 = 23' \
        TR &= frac{18-5}{9} = 2' \
        TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
        end{align*}

        end{document}


        Physics equation sample



        That said, I wouldn’t recommend you use this technique. (Although I do recommend that you use unicode-math if you’re allowed to!) The mathrm solution is still supported and will work fine.



        I personally find it handy to declare something like newcommandTDD{ensuremath{mathop{mathrm{TDD}}}} and then write TDD in the equations. If you might for some reason want to write x TDD or TDD TI instead of x cdot TDD and TDD cdot TI, the mathop makes x TDD TI behave like log log x (that is, typeset like an operator name).



        documentclass[varwidth=10cm, preview]{standalone}
        usepackage[T1]{fontenc}
        usepackage{physics}

        newcommandupvar[1]{ensuremath{mathop{mathrm{#1}}}}
        newcommandTD{upvar{TD}}
        newcommandTDD{upvar{TDD}}
        newcommandTF{upvar{TF}}
        newcommandTI{upvar{TI}}
        newcommandTR{upvar{TR}}
        newcommandTRS{upvar{TRS}}
        newcommandTRT{upvar{TRT}}
        newcommandTT{upvar{TT}}

        begin{document}

        begin{align*}
        TDD &= frac{18}{9} = 2' \
        TF &= TI-TDD = 25-2 = 23' \
        TR &= frac{18-5}{9} = 2' \
        TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
        end{align*}

        end{document}


        This is just like typing log or sin. An existing shorthand for this is operatorname{TDD} from amsmath.






        share|improve this answer















        A literal answer to your question is the [math-style=upright] package option of unicode-math, which you can switch on and off with the commands



        unimathsetup{math-style=upright}

        unimathsetup{math-style=ISO}


        For example:



        documentclass[varwidth=10cm, preview]{standalone}
        usepackage{physics}
        usepackage[math-style=upright]{unicode-math}

        begin{document}

        begin{align*}
        TDD &= frac{18}{9} = 2' \
        TF &= TI-TDD = 25-2 = 23' \
        TR &= frac{18-5}{9} = 2' \
        TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
        end{align*}

        end{document}


        Physics equation sample



        That said, I wouldn’t recommend you use this technique. (Although I do recommend that you use unicode-math if you’re allowed to!) The mathrm solution is still supported and will work fine.



        I personally find it handy to declare something like newcommandTDD{ensuremath{mathop{mathrm{TDD}}}} and then write TDD in the equations. If you might for some reason want to write x TDD or TDD TI instead of x cdot TDD and TDD cdot TI, the mathop makes x TDD TI behave like log log x (that is, typeset like an operator name).



        documentclass[varwidth=10cm, preview]{standalone}
        usepackage[T1]{fontenc}
        usepackage{physics}

        newcommandupvar[1]{ensuremath{mathop{mathrm{#1}}}}
        newcommandTD{upvar{TD}}
        newcommandTDD{upvar{TDD}}
        newcommandTF{upvar{TF}}
        newcommandTI{upvar{TI}}
        newcommandTR{upvar{TR}}
        newcommandTRS{upvar{TRS}}
        newcommandTRT{upvar{TRT}}
        newcommandTT{upvar{TT}}

        begin{document}

        begin{align*}
        TDD &= frac{18}{9} = 2' \
        TF &= TI-TDD = 25-2 = 23' \
        TR &= frac{18-5}{9} = 2' \
        TT &= TI+TRT+TD+TRS = 25+2+5+1 = 33'
        end{align*}

        end{document}


        This is just like typing log or sin. An existing shorthand for this is operatorname{TDD} from amsmath.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 8 at 22:18

























        answered Feb 8 at 21:53









        DavislorDavislor

        6,3811328




        6,3811328






























            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%2f473929%2fall-letters-upright-in-align-mode%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

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?