[Tex/LaTex] How to process every inline math formulas in display math mode

displaystylemath-mode

I have a question about the \displaystyle command. So every time I write a quiz or test, in order to make a fraction, limit, integral, etc. look decent, I have to do something like,

$\displaystyle\frac{2}{3}$ 

or

$\displaystyle\int_{0}^{\infty} e^{-5x}dx$. 

If I do not input this command, the text is absurdly small. Is there a package or command I can put in my template so that it just automatically assumes to do the \displaystyle command?

I run MiKTeX on a Windows computer. I have decent LaTeX knowledge, but am foggy in templates.

Best Answer

I don't really recommend this, but \everymath{\displaystyle} is a way to achieve the display style for math content, i.e. for inline math content as well.

In my opinion the usage of the various align like environments should be preferred or \[...\].

Please consider also \dfrac{2}{3} for example as a 'nicer' way of displaying fractions.

As Zarko stated in comment: Using \displaystyle all the way will increase the spacing between the lines and leaves a disrupted look of the page.

Again: Don't do it.

\documentclass{book}

\usepackage{mathtools}

\begin{document}

$E=mc^2 = \frac{mc^2}{1}$


$\frac{2}{3}$ 

or

$\int_{0}^{\infty} e^{-5x}dx$. 

or

\[ \frac{2}{3} \]

or

\[ \int_{0}^{\infty} e^{-5x}dx \]


\everymath{\displaystyle}

$\frac{2}{3}$ 

or

$\int_{0}^{\infty} e^{-5x}dx$. 

\begin{align*}
\int_{0}^{\infty} e^{-5x}\mathrm{d}x &= \dots
\end{align*}


$\dfrac{2}{3}$


\end{document}