Put this in your preamble, but after all \usepackage
commands:
\everymath=\expandafter{\the\everymath\displaystyle}
This will effectively add \displaystyle
to every (inline) math made environment, making all math look like the math that's displayed.
Edits: Thanks to Charles for pointing out that this can/should be done in a way which doesn't clobber the existing \everymath
token list, in case it's already nonempty. And as Willie says the =
is optional. I like using it; it just reminds me that there is some assignment going on.
Edit 2: The OP asked for a detailed explanation. I'll try.
First, remember that \everymath
is a token list that is inserted in front of every math mode material. So if you type \everymath={\text{Here comes the math: }}
you will get that in front of every equation. \everymath={\displaystyle}
does something a little more productive by inserting \displaystyle
in front of each math mode.
The trouble arises when you or some other package has already modified \everymath
. So we need to append \displaystyle
to the \everymath
token list. In pseudo-TeX you want to say:
\everymath={\currentcontentsof{\everymath}\displaystyle}
The TeX implementation of the pseudo-macro \currentcontentsof
is \the
. So a closer approximation is this:
\everymath={\the\everymath\displaystyle}
But this is going to be trouble, When TeX reads a token list declaration it just reads the tokens without expanding. That is, the \the
will be expanded not here but at the the first encountered math mode. That will cause TeX to try to expand \everymath
, which will need an expansion of \everymath
inside it. Oops! Infinite loop.
So you need the \the
expanded before you save the token list. Hence \expandafter
:
\everymath=\expandafter{\the\everymath\displaystyle}
When TeX reads \everymath=
, it expects a token list. But instead, it gets \expandafter
, which says "hold on to the next token, expand the following token, then put the held token back in place and expand normally." So the {
token is deferred while \the
is expanded. \the
needs another token to work, so the next token \everymath
is read. This replaces the two tokens \the\everymath
with the tokens currently in \everymath
. Now that {
is put back in place, and TeX can read a normal token list declaration.
Other TeXnicians may correct that answer, but it's how I understand things.
\everymath
will also make all in-line math "big", which can make interline spacing very large to accomodate all the large expression. I think that doesn't look very good.\displaystyle
inside the "group" with the thing you want big. For example, compare the in-line expressions$\frac{1}{x + \frac1x}$
and$\displaystyle \frac{1}{x - \frac1x}$
and$\displaystyle \frac{1}{x - {\displaystyle \frac1x}}$
to see how the scope of the\displaystyle
command works.