Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 189

How to properly write fraction in style

$
0
0

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 in this picture :

enter image description here

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


Viewing all articles
Browse latest Browse all 189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>