solve
Answers
Answered by
0
Use amsmath's \tfrac or \dfracconstructs to forcibly write a fraction in text or display style. In amsmath.sty, these macros are defined via \genfrac
\newcommand{\dfrac}{\genfrac{}{}{}0} \newcommand{\tfrac}{\genfrac{}{}{}1}
with the token 0/1 setting the math style to \displaystyle/\textstyle(2 is for \scriptstyle; 3 is for \scriptscriptstyle, for what it's worth).
Here's a MWE:

\documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document} \begin{align*} \cos x &= \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} x^{2n} = 1 - \frac{1}{2}x^2 + \frac{1}{24}x^4 - \frac{1}{720}x^6 + \dotsb\\[2\baselineskip] \cos x &= \sum_{n=0}^\infty \dfrac{(-1)^n}{(2n)!} x^{2n} = 1 - \dfrac{1}{2}x^2 + \dfrac{1}{24}x^4 - \dfrac{1}{720}x^6 + \dotsb \\[2\baselineskip] \cos x &= \sum_{n=0}^\infty \tfrac{(-1)^n}{(2n)!} x^{2n} = 1 - \tfrac{1}{2}x^2 + \tfrac{1}{24}x^4 - \tfrac{1}{720}x^6 + \dotsb \end{align*} \end{document}
\newcommand{\dfrac}{\genfrac{}{}{}0} \newcommand{\tfrac}{\genfrac{}{}{}1}
with the token 0/1 setting the math style to \displaystyle/\textstyle(2 is for \scriptstyle; 3 is for \scriptscriptstyle, for what it's worth).
Here's a MWE:

\documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document} \begin{align*} \cos x &= \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} x^{2n} = 1 - \frac{1}{2}x^2 + \frac{1}{24}x^4 - \frac{1}{720}x^6 + \dotsb\\[2\baselineskip] \cos x &= \sum_{n=0}^\infty \dfrac{(-1)^n}{(2n)!} x^{2n} = 1 - \dfrac{1}{2}x^2 + \dfrac{1}{24}x^4 - \dfrac{1}{720}x^6 + \dotsb \\[2\baselineskip] \cos x &= \sum_{n=0}^\infty \tfrac{(-1)^n}{(2n)!} x^{2n} = 1 - \tfrac{1}{2}x^2 + \tfrac{1}{24}x^4 - \tfrac{1}{720}x^6 + \dotsb \end{align*} \end{document}
Similar questions