# Increasing math mode font size in tikz picture

Consider the following simple tikz picture

\begin{tikzpicture}
\tikz \draw (1,0) node{$\pi$} circle (1);
\end{tikzpicture}


I want to scale (increase the size) of the pi, but not of the circle itself.

I already tried to use a scalebox, but the resulting text wasn't placed inside the circle. I also tried

\begin{tikzpicture}
\tikz \draw (1,0) node{\large $\pi$} circle (1);
\end{tikzpicture}


and

\begin{tikzpicture}
\tikz \draw (1,0) node[font=\large]{$\pi$} circle (1);
\end{tikzpicture}


but both result in the error "TeX capacity exceeded, sorry [input stack size=5000]."

Can you tell me if there is a way to properly increase the font size for math mode inside tikz pictures?

You can use scale

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (1,0) node[scale=6]{$\pi$} circle (1);
\end{tikzpicture}
\end{document}


or use font=\fontsize{60}{60}\selectfont with lmodern loaded.

\documentclass[tikz]{standalone}
\usepackage{lmodern}
\begin{document}
\begin{tikzpicture}
\draw (1,0) node[font=\fontsize{60}{60}\selectfont]{$\pi$} circle (1);
\end{tikzpicture}
\end{document}


BTW \tikz \draw should be \draw inside tikzpicture environment.

• thank you for both, the answer to my font size problem and the answer to the problem with the input stack size error (which was to remove the \tikz)! Dec 7, 2014 at 11:32