2
\documentclass{article}
\begin{document}
$x\sqrt x\sqrt[3]x\scriptsize x\sqrt x\sqrt[3]x$
\end{document}

I would expect the first three expressions to appear in regular size, and the last three to appear in script size. However, only the cube root is re-sized:

$x\sqrt x\sqrt[3]x\scriptsize x\sqrt x\sqrt[3]x$

I guess this means that \scriptsize doesn't do what I think it does … but, while I could buy that conclusion if \scriptsize didn't do anything, why does it re-size just one of the expressions?

6
  • Command \scriptsize invalid in math mode. Use \scriptstyle. Commented May 10, 2023 at 5:41
  • @hair-splitter, re, indeed, hoisting it out of math mode gives the expected result. But why does leaving it in math mode affect the cube root, and leave the others unchanged?
    – LSpice
    Commented May 10, 2023 at 6:15
  • don't ignore warnings, latex does give a message if a size command is misused in math mode Commented May 10, 2023 at 6:16
  • @DavidCarlisle, re, thanks, compilations are so chatty that I don't even get a chance to notice warnings unless the display pauses. (I see it now, but it was lost in the noise before.) But why does leaving it in math mode (even though I shouldn't) affect the cube root, and leave the others unchanged? (I would understand either affecting them all, or ignoring them all.)
    – LSpice
    Commented May 10, 2023 at 6:21
  • 2
    size commands have no effect on a math expression already started as the fonts are already set up. they affect the font setup of any math expressions started later in that scope. so you are just seeing an artifact of the fact that root uses an hbox with a nested math to measure box sizes Commented May 10, 2023 at 6:31

1 Answer 1

4

Don't ignore warnings, latex does give a message if a size command is misused in math mode.

Size commands have no effect on a math expression already started as the fonts are already set up. they affect the font setup of any math expressions started later in that scope. so you are just seeing an artifact of the fact that root uses an hbox with a nested math to measure box sizes.

If starting now, the size commands would probably be written to give an error rather than warning if used in math mode, but after decades of use, it is hard to make existing behaviour (even weird behaviour) an error, so it is what it is.

In math you can use \scriptstyle or \scriptscriptstyle or use a nested text box to set up a different size:

\[....  \mbox{\Large $some large math$} ... \]

You must log in to answer this question.

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