# Equations, change the font size

How do I change the font size of something like this: I want to increase the font but it always seems to remain the same.

 \documentclass[30pt]{article}
\DeclareMathSizes{20}{20}{20}{20}
\begin{document}

$x = \frac{1}{x + \frac{1}{x + \frac{1}{x}}}$

\end{document}

-

## migrated from stackoverflow.comDec 14 '11 at 20:46

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Dec 14 '11 at 20:54
@jfbu: This comment will be deleted shortly. Thanks. :-) –  please stop stalking Nov 25 '13 at 18:44
@cmhughes: your link points to 404. I will delete this comment shortly (if I don't forget it). –  please stop stalking Nov 25 '13 at 18:44

The first parameter of \DeclareMathSizes specifies the font size to which these settings are applied to. So, for a 12pt document, if the first parameter is not 12, then this command will have no effect. So for the code as below, the output is:

but with the line \DeclareMathSizes{12}{24}{24}{24} un-commented you get:

Also see How to make math font huge.

\documentclass[12pt,border=5pt]{standalone}
% \DeclareMathSizes{12}{24}{24}{24}% Uncomment to see the effect
\begin{document}
$x = \frac{1}{x + \frac{1}{x + \frac{1}{x}}}$
\end{document}

-

no need to redefine the math sizes: use \dfrac from amsmath

\documentclass{article}
\usepackage{amsmath}
\begin{document}

$x = \dfrac{1}{x + \dfrac{1}{x + \dfrac{1}{x}}}$
\Huge
$x = \dfrac{1}{x + \dfrac{1}{x + \dfrac{1}{x}}}$

\end{document}


-
Much better approach then the accepted answer… –  Werner Nov 23 '13 at 20:20