What is it about using \makebox
that makes it disregard text body borders / margins, where other boxes respect the margins / text width and friends?
-
Allowing images outside of margin
Letting graphics overflow over page edge -
Drawing lines across paper
Horizontal line spanning the entire document in LaTeX -
Aligning things in margin with paragraph start How can I top align AND left align a box flush with the top of a paragraph?
I ask this because it seems like a magic box that you can just throw anything into and do whatever (same with \parbox
, I suppose). In TikZ, you have to use the overlay
option. Is it due to something implicit like that?
Best Answer
There is nothing special about
\makebox
. If you gothen if
...
is wider than 1in you will get an overfull box, but it is possible to make the text visually wider without being wider to tex, eg\parbox{1cm}{XXXXXXXXXXX\hspace{-10cm}X}
is not overfull, despite the fact that the X will extend past the 1cm boundary of the box.
\makebox
is just a box with (if you use the length option) a specified width but glue added either side that can stretch or shrink an arbitrary amount so that the contents are always exactly the width of the box, even if they appear to extend past it.