My problem is to get the following onto a frame of a presentation using beamer class. I get the following error message:

Illegal parameter number in definition of \test. 1 l.257 \end{tikzpicture}

What can I do? Here is the code:


      \draw (0cm,0cm) circle[radius=\Radius];

        -{Stealth[round, length=8pt, width=8pt, bend]},
        shorten >=4pt,
        very thin,
        \draw (0.315cm, -0.38cm) arc(-40-3:-40+3:\Radius);
        \draw (-\Radius, 0) arc(180+3:180-3:\Radius);

      % draw the two points 
        (-40:\Radius) circle[] node[below right] {$x$}
        (-60:\Radius) circle[] node[below right] {$y$}

            text along path,
            text align=center,
          (#3:\Radius-#2) arc(#3:#4:\Radius-#2)
      \Item R 2pt (180:-40)
      \Item E 1pt (180:300)

      \node[draw,circle] at (-0.4,0.6)(a) {1};
      \node[draw,circle] at (0.65,0.6)(b) {2};


closed as unclear what you're asking by user36296, Zarko, Mensch, Stefan Pinnow, Heiko Oberdiek Nov 12 '16 at 17:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Normally, this occurs when you do things like this: \def\com#1{#1 + #2}. But I can't spot a mistake like this. – MaestroGlanz Nov 11 '16 at 16:18
  • 5
    Have you tried with a [fragile] frame? Otherwise please post all the necessary packages and libraries to run your code. – user36296 Nov 11 '16 at 16:28
  • 5
    or move the definition outside the frame – percusse Nov 11 '16 at 18:11
  • 1
    The [fragile] should be added to \begin{frame} if you have that somewhere in the code. – Albert Jul 11 '18 at 23:05
  • Another solution would be to use \lstinputlisting and put the code into an external file. – Albert Jul 11 '18 at 23:23

Browse other questions tagged or ask your own question.