I have the following formula and I want the nominator and the denominator to appear in display style. I use \everymath{\displaystyle} so I don't understand why they are not in display mode. How can I make this happen? Also why doesn't \everymath{\displaystyle} do the trick? Thanks!

C=\frac{\iint \vec{E}\epsilon\cdot \vec{dS}}{-\int_{A}^{B}\vec{E}\cdot\vec{dl}}

enter image description here

  • When in display math mode, the fractions have \textstyle in both numerator and denominator.
    – Manuel
    Aug 3 '14 at 21:01
  • @DavidCarlisle I used \dfrac but I don't see any different result.
    – Adam
    Aug 3 '14 at 21:05
  • @Mico My fault, you're of course right :)
    – yo'
    Aug 3 '14 at 21:56

When you are calling \displaystyle, the numerator and denominator are one level lower, i.e. in \textstyle. It seems that you are expecting a definition of the form

\def\ddfrac#1#2{\displaystyle\frac{\displaystyle #1}{\displaystyle #2}}

used in place of your \frac.

\def\ddfrac#1#2{\displaystyle\frac{\displaystyle #1}{\displaystyle #2}}


C=\ddfrac{\iint \vec{E}\epsilon\cdot \vec{dS}}{-\int_{A}^{B}\vec{E}\cdot\vec{dl}}

But rather (cdots removed and replaced by thinspace):

C=\ddfrac{\iint \vec{E}\epsilon\, \vec{dS}}{-\int_{A}^{B}\vec{E}\,\vec{dl}}
  • For an earlier posting that defines a macro called \ddfrac in much the same way as you do (though using LaTeX's \newcommand instead of TeX's \def), see tex.stackexchange.com/a/173980/5001.
    – Mico
    Aug 3 '14 at 21:12
  • @Mico Really similar, however I'd prefer a slighty wider spacing invoked by the first \displaystyle. Aug 3 '14 at 21:38
  • @Mico I thougt about more general usage, e.g. in array-like context. But when the math mode is just outer, there are no differences, indeed. Aug 3 '14 at 22:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.