Home > other >  Formatting fraction fir display
Formatting fraction fir display

Time:07-23

I'm formatting fraction with MathJax and are having problem displaying it properly.

$disp = '<h1>$${{10 \over 9 }} of 99 $$</h1><br>';
echo $disp;

enter image description here For some reason, i cannot get a space before and after the word 'of'. Any pointers is greatly appreciated. Thanx in advance.

CodePudding user response:

Usually, \ keep the space between letters.

$disp = '<h1>$${{10 \over 9 }}\ of\ 99 $$</h1><br>';

Reference - space

  • Related