TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to surround a tabular with a thick frame:

        A & B \\ \hline
        C & D \

Although I set \fboxsep to 0pt and use @{}, there is still some horizontal margin between the frame and the tabular:

I want the horizontal line to reach the frame at both ends. How can I achieve that?

share|improve this question
up vote 14 down vote accepted

You are a victim of end of line space. Put % as shown in the following code:

\fcolorbox{black}{gray}{%    %% <------- here
        A & B \\ \hline
        C & D 
    \end{tabular}%   %% <------- here

enter image description here

For details on adding % at the end refer to This Q and its A.

share|improve this answer
It's copied from the OP but that \ after D looks wrong. – David Carlisle Jan 30 '14 at 11:03
@DavidCarlisle You have very good eyes. Thanks and corrected. :) – Harish Kumar Jan 30 '14 at 11:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.