I want to write a command, for example \pi
or \rightarrow
, inside a circle. I tried \circled{\pi}
but this doesn't work.
How do I do it?
Define \circled
in your preamble:
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=1](char) {#1};}}
Use math environment:
\circled{$\pi$}
Without any more information, a possible solution could be:
\tikz \node[circle,draw] {$\rightarrow$};