# How increase math font size using DeclareMathSizes while using relsize package

Consider the following MWE:

\documentclass[10pt]{report}
\usepackage{relsize}

\DeclareMathSizes{10}{28}{26}{25}   % For size 10 text

\begin{document}\relscale{1.7}
$$S = \frac{A}{B^2}$$
\end{document}


I try to increase math font size while using relsize package. When I do not use relsize package, \DeclareMathSizes is work. But when I use \relscale package, \DeclareMathSizes does not apply?!

I would be thankful if anyone can describe how to use increase all my equation math font size, while using relsize.

\documentclass[10pt]{report}
\usepackage{relsize}

\DeclareMathSizes{10}{28}{26}{25}   % For size 10 text

\begin{document}

aaa
$$S = \frac{A}{B^2}$$

\relscale{1.7}
bbb
$$S = \frac{A}{B^2}$$
\end{document}


Produces

as you have declared large math fonts for 10pt text font but nothing for the non standard 17pt font size that you select via relscale

You could define the large fonts for 17pt instead, although as you are using the default cm fonts, 17pt is substituted to 17.28pt so you need to declare math fonts for that size:

\documentclass[10pt]{report}
\usepackage{relsize}

\DeclareMathSizes{17.28}{28}{26}{25}   % For size 17.28 text

\begin{document}

aaa
$$S = \frac{A}{B^2}$$

\relscale{1.7}
bbb
$$S = \frac{A}{B^2}$$
\end{document}


producing

Note that you can get identical output without using the relsize package by using the standard \LARGE command:

\documentclass[10pt]{report}

\DeclareMathSizes{17.28}{28}{26}{25}   % For size 17.28 text

\begin{document}

aaa
$$S = \frac{A}{B^2}$$

\LARGE
bbb
$$S = \frac{A}{B^2}$$
\end{document}