[Tex/LaTex] Keeping the fractions in \frac the same in inline math

fractions

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.

enter image description here

Looks out of place in my opinion.

Best Answer

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:

fracs

\documentclass{article}
\usepackage{amsmath,amssymb,amsfonts}
\begin{document}
    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}\]
\end{document}
Related Question