1

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!

10
  • This worked for me: \framebox{$\dfrac{1}{6}$} (using framed and amsmath packages). Have you really used \framebox{\dfrac{1}{6}}? That gives errors! Please don't post such fragments only, give a full .tex document instead!
    – user31729
    Aug 21, 2016 at 15:39
  • Yeah, I copy/pasted your line and it didn't show at all. I'm using ShareLatex, if that makes any difference. I think some things don't show up there because I've had issues with shapes and \log as well. Aug 21, 2016 at 15:43
  • Sigh, ShareLaTeX ... I am pretty sure that your version must give compilation errors.
    – user31729
    Aug 21, 2016 at 15:45
  • 2
    Why not simply \boxed{\frac{1}{6}}?
    – Bernard
    Aug 21, 2016 at 15:52
  • 1
    @AnonE.Muss: Then post your document here, as I have already asked you once! Not working is no precise description!
    – user31729
    Aug 21, 2016 at 16:57

1 Answer 1

2

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.

6
  • 1
    I asked that already in my first comment right below the post ;-)
    – user31729
    Aug 21, 2016 at 18:07
  • Oops, sorry. Feel free to downvote. Or if you'd prefer, I'll remove my answer.
    – JPi
    Aug 21, 2016 at 18:17
  • 1
    I rarely downvote answers (or questions)... but we have some users here which downvote quite often... I don't say this is to be downvoted at all... keep it as you like
    – user31729
    Aug 21, 2016 at 18:21
  • 1
    Well, many (high rep) users post nearly identical comments after similar comments has been made already to the post -- the difference is: The comment of high rep users are upvoted, others aren't although they have been written earlier (and aren't not wrong) ... so much for 'reading comments more carefully' ;-)
    – user31729
    Aug 21, 2016 at 18:51
  • 1
    Of course I meant aren't wrong -- the double negation is a typo ;-) So much for writing comments carefully :D
    – user31729
    Aug 21, 2016 at 19:10

You must log in to answer this question.

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