Framebox around fraction
1,653
Did you forget the $-signs?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\framebox{$\dfrac{1}{6}$}
\end{document}
produces
which isn't pretty but is a framebox with a fraction in it.
Related videos on Youtube
Author by
Anon E. Muss
Updated on August 22, 2020Comments
-
Anon E. Muss about 3 years
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!
-
Admin about 7 yearsThis worked for me:
\framebox{$\dfrac{1}{6}$}
(usingframed
andamsmath
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! -
Anon E. Muss about 7 yearsYeah, 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. -
Admin about 7 yearsSigh,
ShareLaTeX
... I am pretty sure that your version must give compilation errors. -
Anon E. Muss about 7 yearsWould you recommend another online LaTeX editor? I need to keep it all online because I'm constantly flipping computers. However if there's a light software I might be able to download it
-
Admin about 7 yearsNo, I don't recommend such editors at all...
-
Bernard about 7 yearsWhy not simply
\boxed{\frac{1}{6}}
? -
Anon E. Muss about 7 yearsThat also doesn't work.
-
barbara beeton about 7 yearshave you used
\usepackage{amsmath}
? that is needed for many math elements including\log
and\dfrac
. -
Anon E. Muss about 7 yearsYeah, I'm using it now. Still not working.
-
Admin about 7 years@AnonE.Muss: Then post your document here, as I have already asked you once!
Not working
is no precise description!
-
-
Admin about 7 yearsI asked that already in my first comment right below the post ;-)
-
JPi about 7 yearsOops, sorry. Feel free to downvote. Or if you'd prefer, I'll remove my answer.
-
Admin about 7 yearsI 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
-
JPi about 7 yearsI guess I should read the comments more carefully....
-
Admin about 7 yearsWell, 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' ;-)
-
Admin about 7 yearsOf course I meant
aren't wrong
-- the double negation is a typo ;-) So much for writing comments carefully :D