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 have a table with images in one of the columns. My problem is that the image overlaps the horizontal line above it, making it look bad. I first tried putting a \\ after each \hline, but this causes gaps in the right most vertical line. I then tried inserting \newline in each cell containing an image, but I get an error that there is no line to end. Does anyone know how I might be able to fix this?

share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. This would be the best way of helping you, since it shows your code and others can start working with something rather than starting from scratch. Although you're not able to upload images just yet, please do so and remove the ! that is inserted. Someone with edit privileges will embed the images in your post. – Werner Jan 21 '12 at 1:26
You could try using the optional argument after the \\ to specify the spacing: \\[0.1cm] or an extra \\ after the \hline. – Peter Grill Jan 21 '12 at 1:26

You could add a trim option when including your image. Have a look at this example. The first row contains images without options, touching the lines above and below. The next row contains a correction by adding the trim option, using negative space of -5bp.

Original: & \includegraphics{tex} &
Corrected: & \includegraphics[trim=0 0 0 -5]{tex} &
    \raisebox{-\height}{\includegraphics[trim=0 -5 0 0]{tex}}\\

table with images

The trim option takes four lengths as argument, specifying the amount to remove or add to each side. trim= 1 2 3 4 would "crop" the picture by 1bp at the left, 2bp at the bottom, 3bp on the right and 4bp at the top. Here we used negative value to add some space.

The graphicx package provides further options for \includegraphicx, described in the manual.

For more complex adjustments, you could use the adjustbox package, which provides flexible alternatives and is also well documented.

share|improve this answer
Awesome, trim was just what i was looking for. Thanks! – Peter Russo Jan 21 '12 at 18:46

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.