# MathJax: Set same font size in fractions

What I'm looking for is that all numbers that are not exponentials have the same font size (the same as the paragraph they are in). Currently when testing this, I try using two fractions within a third, like so:

\frac{\frac{1}{2}}{\frac{3}{4}}


$$\frac{\frac{1}{2}}{\frac{3}{4}}+2$$

All four numbers above are smaller than this surrounding text (70.7%). I have tried setting scale and minScaleAdjust to 100 which made a slight difference, but all the text is still smaller for each fraction level. Messing around with inline, block, \displaystyle and \dfrac didn't help either.

For the above example using \large modifies everything up to 95.5% of font size, but that's something I'd have to add manually to each fraction (plus \normalsize for the rest of the expression) and it's still not 100%.. very hacky.

\large\frac{\frac{1}{2}}{\frac{3}{4}}\normalsize+2


$$\large\frac{\frac{1}{2}}{\frac{3}{4}}\normalsize+2$$

Is there a setting/solution to force all numbers having the same size? Thanks.

• try \dfrac instead of \frac... Jan 6 '15 at 0:11
• Aww, I only tried \dfrac on the main one and not the two within. Thanks a lot! The sizes are nice now, but commas are no longer treated as decimal signs. :(
– LGT
Jan 6 '15 at 1:11
• Just don't write a horror like that... Jan 6 '15 at 8:39
• As for "that's something I'd have to add manually to each fraction". Macros are useful (among other things) for situations like this. When you are not sure how to typeset something in TeX, just make a macro. Then you only need to make a change in one place, after you find out better way. Jan 6 '15 at 11:15

Just use \dfrac instead of \frac.

P.S. I hope that this is only a minimal example; if you actually plan to use $\dfrac{\dfrac ab}{\dfrac cd}$ — please don't, it takes a lot of vertical space and looks ugly (even something like $\dfrac{a/b}{c/d}$ is better).

• Ah, but I need this for a math site, asked specifically about this kind of expressions and there will be a few.
– LGT
Jan 6 '15 at 23:49
• I disapprove of \dfrac as you are forcing $\TeX$ to do something it wasn't meant to do. A better solution would be to put your fractions on a line of their own $$\frac{\frac{a}{b}}{\frac{c}{d}}$$. This is rendered like \dfrac. For a lengthier discussion, see here. Jan 7 '15 at 9:59

Actually, \cfrac is better suited for this: $$\cfrac{\cfrac12}{\cfrac34}$$

• I appreciate this as well. I tried it and it works!.. except for the commas, but perhaps we won't be using any in fractions.
– LGT
Jan 6 '15 at 5:27
• @LGT, use braces around the commas: \frac{1{,}23}{45{,}6} produces $\frac{1{,}23}{45{,}6}$. You should need this in math mode whether the number is in a fraction or not, as otherwise $\rm\TeX$ thinks the comma is a separator between numbers, which gets a little extra space. Jan 6 '15 at 12:35
• Thank you. I ended up redefining digits and numbers (works) but I'll remember this as well.
– LGT
Jan 6 '15 at 23:42