# Label illegal parameter [duplicate]

I have the following code:

\documentclass[10pt]{beamer}

\usefonttheme{serif}
\usetheme{Warsaw}

\usepackage{tikz}
\usetikzlibrary{arrows}

\title{Newton's Approximation of $\pi$}

\author{Daniel Rui}

\begin{document}

\begin{frame}

\titlepage

\end{frame}

% \section{Part 1}

% \begin{frame}

% \frametitle{Outline}

% \tableofcontents

% \end{frame}

\begin{frame}

\frametitle{Approximation}

\begin{columns}
\column{0.6\textwidth}
Newton begins with a circle centered at $\frac 12$, as shown. He draws a vertical line at $\frac 14$, and uses two different methods to find the area of the shaded region.
\column{0.4\textwidth}
\begin{center}

\begin{tikzpicture} [
circ/.style={circle, draw, solid, fill=white, inner sep=0.75pt,
label=#1,
node contents={}
},
every label/.append style = {inner sep=2pt, font=\footnotesize}
]
\fill[gray!30]  (0,0) arc (180:120:1.5cm) |- cycle;
% axis
\draw[->]   (-0.5,0) -- + (4.0,0) node[below left] {$x$};
\draw[->]   (0,-0.5) -- + (0,3.0) node[below left] {$y$};
% rest of image
\draw (0,0) node[circ=above left:$B$] arc (180:0:1.5) node[circ={}];
%
\draw[densely dashed]   (60:1.5) -- (0:1.5) node[circ=below:$\frac{1}{2}$];
\draw                   (60:1.5) node[circ=$A$] -- (0:0.75) node[circ=below:$D$];
\end{tikzpicture}
\end{center}

\end{columns}
\end{frame}

\end{document}


Using my compiler (it’s an app called TeX), it gives me the following error:

Illegal parameter number in definition of \test


On another compiler, it seems to work, but on this one, it is very consistently telling me that there is an error. Is this a compiler problem, or is there actually a problem in the

label=#1


that seems to cause a lot of trouble? I tinkered with that particular line a lot, and I believe it is the heart of the problem. Thank you for your help.

## marked as duplicate by Mico, Troy, Phelype Oleinik, Alenanno tikz-pgf StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jul 24 '18 at 18:52

• In the second frame, you need \begin{frame}[fragile] instead of \begin{frame}. – user121799 Jul 24 '18 at 17:16