Set superscript and subscript in formatted text in wpf
You use Typography.Variants:
<TextBlock>
<Run>Normal Text</Run>
<Run Typography.Variants="Superscript">Superscript Text</Run>
<Run Typography.Variants="Subscript">Subscript Text</Run>
</TextBlock>
You can use something like <TextBlock>5x<Run BaselineAlignment="Superscript">4</Run> + 4</TextBlock>
.
However, as far as I know, you will have to reduce the font-size yourself.
It's interesting to note that for some characters (m2, m3, etc) a superscript is not needed, but the unicode character can be used. For example:
<Run Text=" m³" />
This would show m3.