[Tex/LaTex] Greek Symbols in box and circle

greek

When I use \fbox{T} I can write alphabet in a box. But I get error lets say if i try \fbox{\mu}, the error is

! Missing $ inserted. <inserted text>

So my aim finally is to write Greek symbols in boxes and circles. Please help. Also want to know what's the command for drawing circle around text.

Best Answer

\fbox makes the interior to be in text mode and \mu should be used in math mode. Hence as told by Karl, you should be using $\mu$ inside (not just \mu). For circled text, you can use \textcircled from textcomp package.

\documentclass{article}
\usepackage{textcomp}
\begin{document}
  \fbox{$\mu$}\textcircled{$\mu$}
\end{document}

If you want colors, there is always tikz package.

\documentclass{article}
\usepackage{tikz}
\newcommand{\mycircled}[2][none]{%
 \tikz[baseline=(a.base)]\node[draw,circle,inner sep=2pt, outer sep=0pt,fill=#1](a){\ensuremath #2\strut};
 }
\begin{document}
  \mycircled{$\mu$} \mycircled[red!30]{\alpha}
\end{document}

enter image description here

\textcircled is available without textcomp too (thanks to Karl Koeller for the remainder) but with textcomp it is well drawn and looks good.