You can use \fbox and a minipage (or a \parbox) of the desired (fixed) width; another option would be to use the varwidth environment from the varwidth package, so the resulting width is the natural width of the contents.
How to specify height and width of \fbox {} - LaTeX Stack Exchange
\end{document} where I modify the fbox value (which is 30em) manually. But that is not the correct width of box (according to the margins of the document). So I change 30em for \textwidth value, and when I compile it says that there is an Bad Box (I clarify that approximately from 31em onwards the Bad Box message appears). How can I avoid that ...
boxes - How should I use the fbox command correctly to avoid ... - TeX
5 \fbox and \parbox cannot be used this way as an environment, although \begin{fbox}Foo\end{fbox} would work, but only for the character F. It would work with NewEnviron and \BODY from the environ package, most likely. I suggest to apply the tcolorbox environment and drawing the pencil image as an overlay (sidebyside would be possible as well).
I have a lot of figures inside an fbox. Unfortunately the default black is too strong for my advisor and I need to change the default border color to something more soft. I've done my research and...
I'm trying to put a perfect cross (just like $\boxtimes$) in the following square \fbox {\texttt {A}}. Any hint? Find below my code: \documentclass [a4paper,11pt] {report} \usepackage {amssymb} \usepack...
I'm trying to highlight the diagonal elements of a matrix by using fbox but I failed. I've searched for the problem, some ppl suggest using tikz. I don't want to use it, so I decided to use fbox{}.