3

How can I reduce the space below and above a figure? I found the following answer, describing how I can reduce the vertical spacing for floats globally. How can I achieve this locally (on a single page)? I'm also satisfied with a solution without the floating environment (but including centering), as the figure is placed on a title page and is not really supposed to float. Below what I'm using now.

\documentclass[a4paper,11pt,twoside]{book}
\usepackage{graphicx} 
\usepackage{epstopdf}   
\usepackage{float}
\usepackage[nopar]{lipsum}



\begin{document}

\noindent \footnotesize{\lipsum[4]\\
\begin{figure}[H]
\centering
\includegraphics[width=3cm]{CC_logo.eps}
\end{figure}
\noindent \lipsum[4]


\end{document}
1
  • 1
    Firstly don't put the \includegraphics inside a figure environment. It's not necessary. If you want it centered, use \begin{center}...\end{center}. Minor vertical adjustments are possible by using \vspace{<len>} with a negative <len>.
    – Werner
    Jan 25, 2014 at 17:28

1 Answer 1

5

Since the image must appear on a precise location, instead of a floating object, you can use a minipage. Using \par\smallskip (or \medskip, or even \vspace{<length>}), you can adjust the vertical spacing:

\documentclass[a4paper,11pt,twoside]{book}
\usepackage[demo]{graphicx} 
\usepackage{epstopdf}   
\usepackage{float}
\usepackage[nopar]{lipsum}

\begin{document}

{\footnotesize
\noindent 
\lipsum[4]\par\smallskip
\noindent
\begin{minipage}{\linewidth}
\centering
\includegraphics[width=3cm]{CC_logo.eps}
\end{minipage}\par\smallskip
\noindent\lipsum[4]\par}

\end{document}

enter image description here

As a side note, \footnotesize does not receive arguments; it is a font switch. You can limit its scope by grouping: {\footnotesize text text...}, or {\footnotesize text text...\par} if more than one line is involved.

An alternative, mentioned by Werner in his comment, is to use a center environment and \vspace{<length>} commands to fine tune the space:

\documentclass[a4paper,11pt,twoside]{book}
\usepackage[demo]{graphicx} 
\usepackage{epstopdf}   
\usepackage{float}
\usepackage[nopar]{lipsum}

\begin{document}

{
\footnotesize
\noindent 
\lipsum[4]

\vspace{-7pt}
\begin{center}
\centering
\includegraphics[width=3cm]{CC_logo.eps}
\end{center}
\vspace{-9pt}
\lipsum[4]\par
}

\end{document}

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

2
  • In the first version the figure is not in the center but slightly shifted to the right. How can I change this?
    – Tanja
    Jan 25, 2014 at 17:56
  • @Tanja Sorry about that. I forgot a \noindent; now it is fixed. Jan 25, 2014 at 17:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .