Skip to main content
3 of 4
added 90 characters in body
StarBucK
  • 2.2k
  • 1
  • 10
  • 35

How to properly write fraction in style

I would like to write the following for the legend of a curve :

$$ Theta = \frac{\pi}{2}$$

Where the value $\frac{\pi}{2}$ is actually in a variable named $Theta$ (same name as the text on the lhs of the equality). Of course, I don't know in advance that $Theta=\frac{\pi}{2}$). Also, I need to add some style to my text (like making it bold, increasing its size etc), this is why I am using the function Style as below.

However, when I write this in mathematica :

Style["Theta=" <> ToString[Theta]]

The fraction goes under the $Theta$ like on this picture :

enter image description here

How can I do to make mathematica write properly what I want ? I am looking for a very simple solution.

StarBucK
  • 2.2k
  • 1
  • 10
  • 35