[Tex/LaTex] Framebox around fraction

fractionsframed

I'm trying to box the fraction 1/6, and so I write

 \framebox{\dfrac{1}{6}}

However when I do this I end up with the formatting all off and the framebox and fraction don't show up at all. Is there another way to put a box around the fraction?

Thanks in advance!

Best Answer

Did you forget the $-signs?

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\framebox{$\dfrac{1}{6}$}
\end{document}

produces

enter image description here

which isn't pretty but is a framebox with a fraction in it.