1

You are supposed to be able to change the size of things via the commands

\large
\huge

etc. However, they don't seem to work in math mode. The following code

\documentclass{article}
\usepackage{amsmath}

\begin{document}
${\footnotesize Text\text{Text}}$\\
${\scriptsize Text\text{Text}}$\\
${\normalsize Text\text{Text}}$\\
${\large Text\text{Text}}$\\
${\Large Text\text{Text}}$\\
${\LARGE Text\text{Text}}$\\
${\huge Text\text{Text}}$\\
${\Huge Text\text{Text}}$\\
\end{document}

produces this:

changing font size doesn't work in math mode

While regular text is resized accordingly, things directly in math mode don't change.

Edit: I don't just want do change the size of a complete formula (which is solved by the answer from Rmano) but of singular symbols inside the formula (e.g. an integral sign inside an underset) which seems to only be possible with the \scriptscriptstyle, \scriptstyle, \displaystyle and \textstyle command. Since there are only these four, how can you change it to different sizes (especially larger ones)?

  • 6
    No, it doesn't work in mathmode. In this case you have \dispalystyle, textstyle, \scriptstyle and \scriptscriptstyle. You also can leave math mode,and , in a group, change the fontsize and reenter mathmode. – Bernard Aug 31 at 18:06
  • 3
    The commands \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, and \Huge are for text mode; they are NOT to be used in math mode. For math mode, use \scriptscriptstyle (akin to \tiny) and \scriptstyle (akin to \scriptsize). – Mico Aug 31 at 18:24
  • 3
    you should get a clear warning in the log about misuse of the comands – David Carlisle Aug 31 at 20:03
1

As stated in comments, the font-size command work only in text mode. On the other hand, math typeset in the scope of font changing command will (normally) follows suit.

Do not use \\ in normal text, and notice that \par should be in the scope of the font changing command to use the correct line skip.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
{\footnotesize $a=b;\text{Text}$\par}
{\scriptsize $a=b;\text{Text}$\par}
{\normalsize $a=b;\text{Text}$\par}
{\large $a=b;\text{Text}$\par}
{\Large $a=b;\text{Text}$\par}
{\LARGE $a=b;\text{Text}$\par}
{\huge $a=b;\text{Text}$\par}
{\Huge $a=b;\text{Text}$\par}
\end{document}

output for the snippet above

  • 1
    I would emphasis that font-size command work only in text mode ... – Zarko Sep 1 at 19:20
  • Why not use \\ in normal text? I get that it doesn't create a lineskip of the same size as set by the command but so what? In normal text the fontsize doesn't change that often anyway (if at all). Especially if you only want a line break and no new paragraph, there seems to be no reason to use \par over \\. – LukasFun Sep 9 at 15:29
  • @LukasFun , look at tex.stackexchange.com/questions/82664/… – Rmano Sep 9 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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