3
$ \hat{Y}=\ln{\frac{Y}{Y^*}} $

When I took a log on fraction, the size of this fraction is too small to see.

I don't want the size of the fraction to decrease.

How can I fix this problem?

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Pjoon
  • 41
  • 5
    The usual \ln does not take an argument, and it has not impact on the size of the fraction. The reason that the fraction is small is because you are in "in-line math mode". You can force the fraction to be the same size as that in "display math mode" if you use \dfrac instead of \frac. – Willie Wong Jun 04 '22 at 02:36
  • 2
    Or you could just use (Y/Y^*). – John Kormylo Jun 04 '22 at 03:35
  • Welcome to TeX.SE. – Mico Jun 04 '22 at 06:38
  • 2
    Welcome :) // If you'd provide us your code, as it is normal to do in this place (copy&run), we could learn easily, whether or not you are trying to use a font size like 4pt or so ... or if your preamble suggests other problems. Thanks – MS-SPO Jun 04 '22 at 06:40
  • 1
    you are using inline math ($) that is designed to fit in a line of text without changing the line spacing. Perhaps you want display math \[\hat{Y}=\ln \frac{Y}{Y^*} \] – David Carlisle Jun 04 '22 at 09:36
  • THANKS EVERYBODY! – Pjoon Jun 05 '22 at 07:17

1 Answers1

12

Your assertion that the fraction expression produced by $\ln{\frac{Y}{Y^*}}$ is smaller than the one produced by $\frac{Y}{Y^*}$ is unsupported.

Before proceeding to a discussion of how you might generate a larger fraction expression, it's worth recapping (a) how TeX's four basic math styles -- \displaystyle, \textstyle, \scriptstyle, and \scriptscriptstyle -- are related to font sizes, and (b) how TeX decides which math style should be applied to the numerator and denominator portions of \frac{...}{...}.

  • When TeX is inside a displayed equation, the basic math style is (unsurprisingly?) \displaystyle. The easiest way to set up a displayed equation is to encase a formula in a \[ ... \] "wrapper".

  • When TeX is in inline math mode -- as is the case for an expression such as $\hat{Y}=\ln\frac{Y}{Y^*}$ -- TeX employs \textstyle as the basic math style. To initiate and terminate inline math mode, use either $ ... $ or \( ... \).

  • When TeX is in either \displaystyle or \textstyle, first level superscript and subscript terms are processed in \scripstyle mode, while second-level subscript and superscript terms are processed in \scriptscriptstyle mode.

  • About font sizes: Ordinary symbols, such as Latin and Greek letters, get the same font size irrespective of whether \displaystyle or \textstyle is in effect. ("Large operator" symbols, such as \sum, \prod, and \int, are produced at a larger size if \displaystyle is in effect.) \scriptsize produces letters that are 30% smaller than those produced if \normalsize is in effect, and \scriptscriptsize is 30% smaller than \scriptscripsize. (Allowing for some minor rounding, it can be said that \scriptscriptsize is 50% smaller than \normalsize.)

  • When TeX encounters a \frac{...}{...} expression, the math style applied to the numerator and denominator terms is one step "down" from the basic math style. E.g., in the inline equation

    $\hat{Y}=\ln \frac{Y}{Y^*}$
    

    the letter Y in \hat{Y} is processed in \textstyle and is rendered at \normalsize, whereas the letters Y in the numerator and the denominator are processed in \scriptstyle -- to be exact, the denominator is processed in "cramped script style" -- and are rendered at \scriptsize.

enter image description here

  • To render the letter Y in the numerator and denominator at the same size as \hat{Y}, it's necessary to switch to \displaystyle, either for the \frac term or for the whole inline equation. (Recall that the same font size is applied to letters in both \displaystyle or \textstyle.) To use displaystyle just for the fraction term, one can write either {\displaystyle\frac{Y}{Y^*}} or -- if the amsmath package is loaded -- \dfrac{Y}{Y^*}.

enter image description here

  • A brief moment of reflection reveals that it may well be a very bad idea to use \dfrac in inline math expressions. Indeed, it may be a much better idea to switch from \frac (or \dfrac!) notation to "inline fraction" notation, aka "slash style" fraction notation: $\hat{Y}=\ln (Y/Y^*)$.

enter image description here

Do note that that all three instances of Y are rendered at the same size -- which, I gather, was one of your typesetting objectives.


\documentclass[border=2pt]{standalone}
\usepackage{amsmath}
\begin{document}
%$ \hat{Y}=\ln\frac{Y}{Y^*} $%
%$ \hat{Y}=\ln\dfrac{Y}{Y^*} $%
$ \hat{Y}=\ln(Y/Y^*) $
\end{document}
Mico
  • 506,678