I cannibalised some code from the thread Simple speech bubbles, arrows or balloon like shapes in beamer. It works really well, but crashes whenever non-alphanumeric characters are used in the node. Here's the code
\newcommand{\callouts}[3]{\tikz[remember picture,baseline]{\node[anchor=base,inner sep=0,outer sep=0]%
(#3){\colorbox{#1!20}{#3}};\node[overlay,rectangle callout,%
callout relative pointer={(0cm,0.5cm)},fill=#1!20] at ($(#3.south)+(-0cm,-0.7cm)$){#2};}%
}%
And this is what it creates;

However, when I try to highlight and label a string with a non-alphanumeric character, e.g. comma or a mathematical symbol, the command crashes. I've tried using math mode and the \text{} command, but neither of these work. Any pointers appreciated.

I'm still having difficulties with using certain maths symbols, e.g. the \neg operator. I've tried putting this in brackets, using \text, and using math mode.
– Nick Riches Oct 12 '12 at 14:07\neg; no need for extra braces now. – Gonzalo Medina Oct 12 '12 at 15:19