Straight letters in TeX?

How do I get straight letters while assigning variables? For a variable P, I currently use \text{P} to straighten it but syntactically speaking, it doesn't seem like the right way to do this.

• Welcome to TeX.SE! Do you mean this: tex.stackexchange.com/questions/3415/…? Apr 2 '21 at 8:58
• If you're not stuck to Computer (or Latin) Modern, the fourier package, based on Adobe Utopia, has an upright option which uses the French style: uppercase letters are upright, as well as lowercase and uppercase greek letters. Apr 2 '21 at 15:28

I believe \mathrm may be what you're looking for:

\documentclass{article}
\begin{document}
$\mathrm{ ABC}$
\end{document}

• Please, don't use minimal for examples: it's not meant for that. Apr 2 '21 at 9:11
• Thanks for the tip. Why isn't it?
– chsk
Apr 2 '21 at 9:12
• Apr 2 '21 at 9:27
• @egreg why hasn't that class never been renamed? If it is only for testing, how many people in the wild rely on it? Apr 2 '21 at 9:36
• Apr 2 '21 at 13:10