[Tex/LaTex] LaTeX is putting a border around the figures


I'm trying to embed a few images in a figure, but LaTeX keeps putting a border around three of the sides. Is there any way for me to keep it from adding this border?

Graphics with borders

The code that I used to create this figure:

    \subfloat[Top View]{\label{fig:pat1a}\includegraphics[width=0.5\textwidth]{pat1a}}
    \subfloat[Isometric View]{\label{fig:pat1b}\includegraphics[width=0.5\textwidth]{pat1b}}
    \caption{Diagrams from Patent Application 12/475,048}

I have included the following packages in my project:

  • lineno
  • microtype
  • verbatim
  • hyperref
  • array
  • graphicx
  • subfig

If there's anything that I have to do in each specific figure to prevent this border from appearing, that's fine. However, if there's one configuration thing that I can do at the beginning of the document, that would be even better.

Best Answer

This could be because your images include the border already, before including them. If this is the case, you can trim and clip some of the edges of the included image using the trim=<lx> <ly> <ux> <uy>,clip option of \includegraphics. This trims <lx> from the left, <ly> from the bottom, <ux> from the right and <uy> from the top in big points bp. Here is a minimal example showing this effect:

enter image description here

\usepackage{graphicx}% http://ctan.org/pkg/graphicx
  \centering \includegraphics[width=0.3\linewidth]{patent.png} \qquad
  \includegraphics[width=0.3\linewidth,trim=4 4 4 4,clip]{patent.png}
  \caption{Diagram from Patent Application 12/475,048}

The image on the left is used unadjusted from a capture of your images (showing the original border included), while the image on the right has been trimmed/clipped by 4bp on all 4 sides (removing the added border).