[Tex/LaTex] Reducing font size in equation


I wanted to type an equation in LaTeX. But it is too long to fit into one line. It involves big arrays with many columns so I cannot split it. I wanted to reduce the font size so that it can fit in one line. However, \small doesn't work in the equation environment.

Best Answer

The following illustrates font size alterations in mathmode:

\usepackage{graphicx}               % Necessary to use \scalebox
normal: $ x^2 + 2xy + y^2 $\\
displaystyle: $ {\displaystyle x^2 + 2xy + y^2} $\\
scriptstyle: $ {\scriptstyle x^2 + 2xy + y^2} $\\
scriptscriptstyle: $ {\scriptscriptstyle x^2 + 2xy + y^2} $\\
textstyle: $ {\textstyle x^2 + 2xy + y^2} $

normal: $ x^2 + 2xy + y^2$}

This yields:

enter image description here

Note that:

  • \displaystyle gives the command to switch the math font size to normal size for displayed formulas.
  • \textstyle is used to go back to normal size font for inline formulas.
  • \scriptstyle is used to set the math font to a size used for subscripted and superscripted symbols.
  • \scriptscriptstyle provides the normal size for doubly subscripted and superscripted symbols.

When using the \scalebox command from the graphicx package one can specify the width (or height) and the other dimension will be scaled proportionally. In a similar manner you can specify both dimensions, but in this case it is all about aesthetics. Therefore we have the following under the \scalebox command:

  • \scalebox{h-dimension}{v-dimension}{content to be scaled}: both dimension stated.
  • \scalebox{h-dimension}{content}: both arguments (h-dim and v-dim) scaled with respect to the stated dimension.