2

In the following MWE I'd like the second framebox to look the same as the first one (see the image below).

\documentclass[10pt]{article}

\begin{document}

\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{.1pt}
\framebox[\width]{A frame.}\par
\framebox[\width]{
\begin{minipage}{4em}
A frame.
\end{minipage}}

\end{document}

enter image description here

Any clue ?

Thanks in advance.

  • 1
    you added the space here h]{ Either don't add that space (line break) or put a % there to hide it. – David Carlisle Jan 8 '16 at 10:53
  • It is unrelated to minipage try editing your \framebox[\width]{A frame.} to have a space or newline before the A – David Carlisle Jan 8 '16 at 10:54
  • @matbator BTW, the space in the end (the don't care one) stems from the fact that you allocated a 4em-wide minipage, but your text doesn't span 4em. – Henri Menke Jan 8 '16 at 11:11
  • Hi Henri, Thanks for the clarification. I knew for the 4em but do you know what should have been set to fit the frame ? – matbator Jan 8 '16 at 11:15

Browse other questions tagged or ask your own question.