All letters upright in align mode
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}
math-mode equations align
|
show 1 more comment
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}
math-mode equations align
1
the normal way would be to writemathrm{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 usemathrm{TR}
andmathrm{TDD}
(nottext
) but you could do this, replacingmathtt
bymathrm
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 remaningmathrm
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, butalign
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
|
show 1 more comment
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}
math-mode equations align
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}
math-mode equations align
math-mode equations align
asked Feb 8 at 14:07
sound wavesound wave
1495
1495
1
the normal way would be to writemathrm{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 usemathrm{TR}
andmathrm{TDD}
(nottext
) but you could do this, replacingmathtt
bymathrm
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 remaningmathrm
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, butalign
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
|
show 1 more comment
1
the normal way would be to writemathrm{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 usemathrm{TR}
andmathrm{TDD}
(nottext
) but you could do this, replacingmathtt
bymathrm
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 remaningmathrm
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, butalign
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
|
show 1 more comment
2 Answers
2
active
oldest
votes
You can not have &
inside {}
it is not really mathrm
that is causing the error.
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}
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 asnewcommandvar{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 commandeverydisplay{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
add a comment |
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}
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
.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
You can not have &
inside {}
it is not really mathrm
that is causing the error.
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}
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 asnewcommandvar{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 commandeverydisplay{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
add a comment |
You can not have &
inside {}
it is not really mathrm
that is causing the error.
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}
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 asnewcommandvar{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 commandeverydisplay{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
add a comment |
You can not have &
inside {}
it is not really mathrm
that is causing the error.
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}
You can not have &
inside {}
it is not really mathrm
that is causing the error.
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}
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 asnewcommandvar{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 commandeverydisplay{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
add a comment |
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 asnewcommandvar{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 commandeverydisplay{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
add a comment |
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}
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
.
add a comment |
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}
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
.
add a comment |
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}
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
.
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}
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
.
edited Feb 8 at 22:18
answered Feb 8 at 21:53
DavislorDavislor
6,3811328
6,3811328
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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}
andmathrm{TDD}
(nottext
) but you could do this, replacingmathtt
bymathrm
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