2

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?

2 Answers 2

9

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$}
2

Without any more information, a possible solution could be:

\tikz \node[circle,draw] {$\rightarrow$};
3
  • 2
    @FarhadRazi The usual way of saying thanks on this site is to upvote the questions that helped you, and to accept the one that helped you the most (if your problem was solved).
    – sodd
    Apr 18, 2016 at 7:04
  • @ hooy, sorry, you are right. but I don't know how to upvote, could you tell me how I do that? Apr 19, 2016 at 10:49
  • of course I used @ ignasi's suggestion and that worked. thanks Apr 19, 2016 at 10:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .