2

Is there a way to make \frac{}{} bigger? By default looks like all equations keep the same size. That means if I write x=\frac{a}{b} x has the right size, while frac is a little bit smaller. I want that x, numerator and denominator keep the same size.

enter image description here

5
  • 2
    \dfrac, from amsmath, perhaps?
    – user31729
    May 31, 2016 at 15:06
  • 2
    Are you using inline math or display math? Can you provide a compilable example that shows what you mean?
    – Thruston
    May 31, 2016 at 15:12
  • 1
    If not using amsmath, one can add \displaystyle prior to the invocation of \frac. Note that for inline math, this will likely alter the natural line spacing of the text. May 31, 2016 at 15:41
  • For inline maths, a solution is to use the \mfrac (medium-sized fraction, ca 80 % of display style) command, from nccmath and add to the preamble something like setstretch{1.1}.
    – Bernard
    May 31, 2016 at 16:05
  • I used \dfrac and I like that. Other solutions without load package and without force me to modify every equation (like using \displaystyle )?
    – Shika93
    May 31, 2016 at 16:09

1 Answer 1

4

I assume your document is in inline math mode when the fraction occurs.

  • While in inline math mode, the numerator and denominator of \frac are set in \scriptstyle by default. Script-size letters and symbols are about 30% (linearly) smaller than in text size.

  • To force TeX to typeset the numerator and denominator terms in \textstyle, either prefix the \displaystyle directive to \frac or -- if the amsmath package is loaded -- write \dfrac.

  • If you want to typeset the numerator and denominator terms in \displaystyle (which may be necessary if you have "large" math symbols such as \sum and \prod), it's best to set up a dedicated macro called, say, \ddfrac to perform the job.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \dfrac macro
\newcommand\ddfrac[2]{{\displaystyle\frac{\displaystyle #1}{\displaystyle #2}}}
\newcommand\numer{\sigma_{\mathit{tot}}}
\newcommand\denom{\omega\epsilon_0}
\begin{document}  
$\epsilon''=\frac{\numer}{\denom}$,              %\frac
$\epsilon''=\displaystyle\frac{\numer}{\denom}$, %\displaystyle\frac
$\epsilon''=\dfrac{\numer}{\denom}$,             %\dfrac
$\epsilon''=\ddfrac{\numer}{\denom}$             %\ddfrac
\end{document}
3
  • I loaded amsmath and works perfectly. What if I don't wanna load that and I don't wanna modify every equation in my document with \displaystyle?
    – Shika93
    May 31, 2016 at 16:12
  • @Shika93 - Two comments: First, you could create your own macro, called (say) \mydfrac, as \newcommand\mydfrac[2]{{\displaystyle\frac{#1}{#2}}}. Second, I can honestly not think of a good reason for not wishing to load amsmath in a LaTeX document.
    – Mico
    May 31, 2016 at 16:17
  • I thought it was useless (I had no idea what amsmath does), but now I found out that I need it for other reasons. I have zero knowledge of LaTeX; I started write the thesis a week ago. Thanks!
    – Shika93
    May 31, 2016 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .