TeX notation: How to align fraction with the rest of the sentence

TeX notation: How to align fraction with the rest of the sentence

د Zarah Khan لخوا -
د ځوابونو شمیر: 3

I want to enter into the question editing form text editor something like:


I tried using the TeX notation, but by entering "The fraction is $$ \frac{1}{3}$$", what I get is :


I would like the baseline of the fraction to be Not aligned with the baseline of the rest of the statement. I want the fraction to appear like it does in the first picture, that is the vinculum (the small bar between the numerator and denominator) should be in the middle of the x-height (refer to the following image) of the rest of the sentence.



How can I do that?

د درجې بندۍ اوسط:  -
In reply to Zarah Khan

Re: TeX notation: How to align fraction with the rest of the sentence

د Mauno Korpelainen لخوا -
In the past when moodle had standard theme there was a tiny piece of css in the core.css file

.texrender {border:0px;vertical-align:middle;}

and tex filter was rendering images vertically aligned to the middle. When standard theme was dropped from moodle 2.X this css class was obviously forgotten from parent theme and custom theme css.

If you are using themes like Clean, More or Essential that have custom css box in administration menu > Theme > Settings of your theme you can add this css there or if you are using some other theme that has no custom css settings you can add texrender class to your custom theme css file (and purge all caches).

MathJax is rendering content automatically correct.