# Keeping the fractions in \frac the same in inline math

Is there a way to change the way \frac behaves in inline math such as $*code*$? It keeps changing it to \dfrac which I don't want. It works for $$*code*$$ but I want it centered and auto line skip and I don't want to do it manually. I don't want to manually change the text size, instead a general case that changes it for good.

Looks out of place in my opinion.

• \tfrac (from amsmath) or \textstyle\frac should do the trick. Commented Feb 10, 2017 at 3:53
• Thanks, much simpler than I thought. Now I feel unintelligent. Commented Feb 10, 2017 at 3:57

I want to extend the version in the comments. Of course you can use \tfrac, but if you want to keep \frac you can switch between math styles with \displaystyle and \textstyle as shown below:
\documentclass{article}
This is text in LaTeX with some math $$P\left( -\frac{25}{19},\frac{40}{19} \right) = \frac{-25+80}{19}$$ inline.
The same in displaystyle: $\left( -\frac{25}{19},\frac{40}{19}\right) = \frac{-25+80}{19}$
Now we imitate displaystyle in text: $$\displaystyle P\left( -\frac{25}{19},\frac{40}{19} \right) = \frac{-25+80}{19}$$ And of course some textstyle in displaystyle: $\textstyle\left( -\frac{25}{19},\frac{40}{19}\right) = \frac{-25+80}{19}$

• unfortunately, \displaystyle fractions in text make the baselines very uneven, and the resulting page tends to look like it has a skin disease. best to delay the style decision until you've looked at the output. Commented Feb 10, 2017 at 9:58