TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a question about function arguments in the algorithmicx package. The following code works:



  \Function{f}{$\tau$ , $\delta$}
  %\Function{f}{$\overrightarrow{\tau}$, $\overrightarrow{\delta}$}
  \State etc


But if I change the arguments to:

   \Function{f}{$\overrightarrow{\tau}$ , $\overrightarrow{\delta}$}

I get an apparently unrelated error:

! Illegal parameter number in definition of \@gtempa.

Do you know any solutions or workarounds for this situation?

share|improve this question
Please edit your question so the code is a full document using any packages. I tried \usepackage{algorithmicx} but got ! Undefined control sequence. l.11 \Function – David Carlisle Aug 14 '12 at 20:11
@DavidCarlisle I edited the question with a complete example code; I hope that's OK. – Gonzalo Medina Aug 14 '12 at 20:16
thanks! that's better:-) – David Carlisle Aug 14 '12 at 20:17
I'm sorry for the incomplete example, and thank you for the edit. – Rares T Aug 15 '12 at 10:17

If in doubt, try \protect...

  \Function{f}{$\protect\overrightarrow{\tau}$, $\protect\overrightarrow{\delta}$}

enter image description here

share|improve this answer
"If in doubt, try \protect...". I will add this to my list of memorable quotes. – Boris Aug 14 '12 at 21:55
Thank you very much, works like a charm! – Rares T Aug 15 '12 at 10:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.