[Tex/LaTex] font size in math mode

fontsizemath-mode

$\sum\limits_{\substack{locations \\ L_j}}$

The word locations is quite long – longer than the summation symbol Sigma.

I would like to control the size of only the word locations, but I am having trouble

  1. $\sum\limits_{\substack{ locations \\ L_j}}$ has no effect on the size of locations.

  2. \fontsize{0.5cm}{1pt}\selectfont $\sum\limits_{\substack{locations \\ L_j}}$ makes the summation symbol sigma smaller but not *locations

  3. inserting \tiny, \scriptsize etc has no discernable affect. Nor does \text{\tiny locations}, etc.

Best Answer

Using \text{\tiny{locations}} does make it a bit smaller. To make it really small, you could try \scalebox.

\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\begin{document} 
$\sum\limits_{\substack{\scalebox{0.5}{locations} \\ L_j}}$

$\sum\limits_{\substack{\text{\tiny{locations}} \\ L_j}}$

$\sum\limits_{\substack{\text{locations} \\ L_j}}$
\end{document}

locations 2

Another option would be to use \mathclap from the mathtools package to horizontally smash locations. This allows the summand to appear on top of locations (so you don't get a big space after the sum.

\documentclass[10pt,a4paper]{article}
\usepackage{mathtools}
\begin{document}
$\sum\limits_{\substack{\mathclap{\text{locations}} \\ L_j}}$ A
\end{document}

locations 1

However, I think the best option would be to define some notation to avoid this construction.

Let $\Lambda$ represent the set of all locations...