I read everywhere that \tiny, etc. does not work in mathmode. When I use it in my code, I also get a warning Command \tiny invalid in math mode. But in the output it nevertheless works. At least in some places.

I suppose on other machines this will not work, so I would like to not use these commands in math mode. But, all other commands to make small fonts in mathemode do not work as well as \tiny does. E.g. in the following MWE


enter image description here

The output I want, is the second. I have a subscript consisting of an array, and this array shall have small numbers. But \tiny is the only command which accomplishes that.

Now to my questions:

  1. How do I make small subscripts as in the second example without the use of tiny.
  2. Why does tiny work for the array-subscript, but not for the standard subscript.
  3. Why does scriptscriptstyle work for the standard subscript, but not for the array-subscript.

This question is not a duplicate to Size commands do not work in mathmode since I am also asking why tiny works, although it is written everywhere that it is not working (and furthermore, @egreg said it is no duplicate).

  • 1
    @DũngVũ \tiny is a switch and should not be misused as an environment.
    – Johannes_B
    Dec 3, 2018 at 10:19
  • @Johannes_B Oh sorry I haven't checked :| but sometimes I use scriptsize environment successfully.
    – user156344
    Dec 3, 2018 at 10:21
  • 1
    @Johannes_B actually every switch may be used as an environment by design. Dec 3, 2018 at 11:12
  • 3
    Possible duplicate of Size commands do not work in mathmode Dec 3, 2018 at 11:19
  • 2
    No, it's not a duplicate.
    – egreg
    Dec 3, 2018 at 13:08

4 Answers 4


Size commands do not work in math mode. However (some) size commands set up math so if you enter a new math expression from text while the size change is in force, you get math of a matching size. Internally array is an \halign in which each cell is surrounded by $...$ so in fact using array is like using \mbox{empty text $ matrix cell$} so the entries pick up the size change more or less by accident.


  • smallmatrix always uses \scriptstyle
    – egreg
    Dec 3, 2018 at 13:14
  • @egreg, I know, but it's in a subscript so that seems good Dec 3, 2018 at 13:45

A simple way to change the font size in math mode is to put the size-changing command inside a \mbox, for example:

\documentclass[varwidth, preview]{standalone}
\usepackage[T1]{fontenc}    % Or unicode-math
\usepackage[utf8]{inputenc} % The default since 2018.


\( x \mscriptsize{y} \mtiny{\omega} \)

x y ω

You might want only the braces if you need a long expression to wrap.

You can also use \text from amsmath to insert arbitrary text-mode commands within math mode, such as \text{\tiny\itshape x}.


You could define a tinymatrix environment modeled on smallmatrix:


% from amsmath.sty, line 960:
  \baselineskip4\ex@ \lineskip1.2\ex@ \lineskiplimit\lineskip





enter image description here


You can use another trick:

 x = \textrm{\tiny{\(t\)}}

So, here t prints small.

You must log in to answer this question.

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