in Latex, Learning

Changing Font Size for Specific Part of an Equation in Latex

If you need to change the font size of a specific part of an equation, e.g., a subscript of a variable or parameter, scalerel is the only package you need. It is very simple to use it: the command looks like \scaleto{text}{size} where text is the text which is supposed to be resized, and size is the font size you want. Let’s try it out.

Without resizing:

   C_{sc}=\dfrac{4\,max(\left|E_{sc}\right|)}{v_{sc,max}^{2} - v_{sc,min}^{2}}

(1)    \begin{equation*}     C_{sc}=\dfrac{4\,max(\left|E_{sc}\right|)}{v_{sc,max}^{2} - v_{sc,min}^{2}} \end{equation*}

Resized subscripts:

   C_{\scaleto{sc}{2.5pt}}=\dfrac{4\,max(\left|E_{\scaleto{sc}{2.5pt}}\right|)}{v_{\scaleto{sc,max}{4pt}}^{2} - v_{\scaleto{sc,min}{5pt}}^{2}}

(2)    \begin{equation*}    C_{\scaleto{sc}{2.5pt}}=\dfrac{4\,max(\left|E_{\scaleto{sc}{2.5pt}}\right|)}{v_{\scaleto{sc,max}{4pt}}^{2} - v_{\scaleto{sc,min}{5pt}}^{2}} \end{equation*}

You should play with different sizes to get what you want. Overall, it is a powerful, easy-to-use, and useful package.

Share if you liked: