Displaying super- and subscript

I'm currently working on an UWP app which also deals with math. Therefore i parse formulae and display them as inlines in a RichTextBlock. As you can imagine, I also want to display sub- and superscription - but I haven't yet found a way to do so. I know, there is something called BaselineAlignment in WPF, but it seems that this is not supported in UWP. I'm currently also about to figure out how to best display fraction lines and roots. I've thought about building my own control for this purpose, but if somebody knows a better approach it would be nice to know. I'm gladful for any answer.


ANSWERS:


To apply subscript and superscript to text in RichTextBlock, we can take advantage of Typography.Variants attached property. For example:

<RichTextBlock FontSize="36">
    <Paragraph FontFamily="Palatino Linotype">
        2<Run Typography.Variants="Superscript">3</Run>
        14<Run Typography.Variants="Superscript">th</Run>
    </Paragraph>

    <Paragraph FontFamily="Palatino Linotype">
        H<Run Typography.Variants="Subscript">2</Run>O
        Footnote<Run Typography.Variants="Subscript">4</Run>
    </Paragraph>
</RichTextBlock>

And the output would like:
enter image description here


You could use a WebBrowser control, and just locally include one of many javascript libraries for rendering LaTex.



 MORE:


 ? WPF Default DynamicRessource values
 ? C# WPF Resizing elemens by Code
 ? Animating size change with Storyboard
 ? Set Image source from Image path : Xamarin PCL (Cross Platform)
 ? Why is the Xamarin.Forms toolbox view empty?
 ? How does this binding change my original collection?
 ? Dynamic XAML load and external images and fonts
 ? ScrollViewer not scrolling
 ? Dynamic Scoped Resources in WPF/XAML?
 ? Binding ComboBoxes to enums... in Silverlight!