I am trying to use tikzset with an argument in a beamer document, and I am having an error I do not understand.
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{My try}
\begin{tikzpicture}
\tikzset{boite/.style={draw=#1}}
\node[boite=red] {The text} ;
\end{tikzpicture}
\end{frame}
\end{document}
The error I get with this code is
! Illegal parameter number in definition of \test.
<to be read again>
1
l.10 \end{tikzpicture}
Note that the exact same code in an article works like a charm:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzset{boite/.style={draw=#1}}
\node[boite=red] {The text} ;
\end{tikzpicture}
\end{document}
[fragile]option to the frame – percusse Jun 15 '13 at 15:36