# Removing space after a graphic

I have the following code and inputted a graphic at some point. When I compile the code, there is a huge white space after the graphic and before the text after the graphic. How do I reduce this white space?

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[right=3cm, left=3cm,bottom=3cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\rhead{..}

\begin{document}
\begin{center}
\includegraphics{..}
\end{center}
text..

-
When you say 'after' the graphic, do you mean to the left/right or top/bottom? –  Nathanael Farley Jan 3 '13 at 17:46
I mean at the bottom of the graphic. –  CAF Jan 3 '13 at 17:49
The space is not coming from the graphics but by your use of \begin{center}...\end{center}. If you replace this with {\centering \includegraphics{...}} you should get less space around your image. –  ArTourter Jan 3 '13 at 17:49
@ArTourter I tried that but now the image is somehow right aligned and there is still a huge gap EDIT: I fixed the right alignment and it it now centered but by using \centering instead there is still this huge gap?. –  CAF Jan 3 '13 at 17:55
Yes, sorry, the white space is part of the graphic. It is fixed now. –  CAF Jan 3 '13 at 18:11

## 1 Answer

If you use \centering instead of the center environment, there is no white space. Your example would then become

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[right=3cm, left=3cm,bottom=3cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\rhead{..}

\begin{document}
{\centering
\includegraphics{..}
}

text..


Note the curly braces to enclose the \centering to make sure it does not affect the rest of the document.

-
I have tried this but there is still the white space? –  CAF Jan 3 '13 at 18:02