I'd like to write all mathematical constants (this includes some Greek letters) in upright style – here on Stack Exchange (math mode). Is it possible to write an upright pi, for example? If so, how to do that?

It bothers me pretty much, since, in any document (also math answers, questions...), either all constants should be upright, or no constants should be upright.

For some reason, \mathrm works for Latin alphabet but not for Greek alphabet.

  • Sure that's possible :-P – πάντα ῥεῖ May 18 '19 at 18:18
  • But how to do that? – Abo Rakan May 18 '19 at 18:20
  • That information seems to be available in the mathjax documentation I'd suspect it's as simple as putting the unicode character in place. – πάντα ῥεῖ May 18 '19 at 18:23
  • 1
    It turns out that it's possible to do only using packages. Are "Symbol" and "Upgreek" packages implemented on Stack Exchange? – Abo Rakan May 18 '19 at 18:42

A similar question was previously asked in the MathJax Users Google Group and this was David Cervone's (a developer from the MathJax team) response:

The upper-case Greek letters can be obtained using \rm, eg, {\rm A B \Gamma}. The MathJax web fonts only include lower-case Greek letters in italic form, so there are no upright versions available. You can use something like \unicode[Times]{x3B1} to obtain the alpha symbol from the Times font (assuming the user has that installed), which will be an upright version.

So basically you can may use your preferred upright Unicode version of the alphabet Pi and place it within the $ delimiters (or \$, depending on the specific site you're on): $π$, $𝛑$, $𝝿$, $Π$, $𝚷$, $𝝥$ etc. You'll find a complete list here.

  • The Unicode version seems to have the same effect as $\pi$. It's still italic even when I use $π$ – Abo Rakan May 18 '19 at 19:32
  • @AboRakan That shouldn't be the case. Perhaps you don't have the proper fonts installed. Which OS are you on? – S.D. May 18 '19 at 19:44
  • My OS is Android 7.0 – Abo Rakan May 18 '19 at 19:46
  • @AboRakan As you can see in this image, $\pi$ and $π$ clearly produce different results for me. So that's not a problem I can reproduce on my end. You may enquire about which fonts you have to install on Android Enthusiasts. Or perhaps try it from a PC? – S.D. May 18 '19 at 19:48
  • I think I'll try it from a PC. Thanks! – Abo Rakan May 18 '19 at 19:55
  • On my phone only the first pi in your list renders at all - the rest come out as little boxes with crosses in them. I'd like to use upright Greek letters sometimes too, but it doesn't seem worth it unless (almost) all users will be able to read them (non-adherence to the convention of using upright Greek letters for mathematical constants is so common that no-one's going to be thrown by seeing a slanted pi, say). – Scortchi - Reinstate Monica May 19 '19 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .