I have prepared an example -- do you think that the white space is too big here?
Example: http://www.bipede.de/Downloads/floating.pdf
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[demo]{graphicx}
% privides the H option
\usepackage{float}
% produces random text for testing
\usepackage{blindtext}
\begin{document}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\end{document}
Hello again. I prepared another example. The result can be found here
http://www.bipede.de/Downloads/floating_2.pdf
\documentclass[11pt,a4paper,twoside,openany]{book}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[demo]{graphicx}
% privides the H option
\usepackage{float}
% produces random text for testing
\usepackage{blindtext}
% Parameters for floating objects in LaTeX
% An overview can be found in the book
% The Latex Companions Chapter 6.1
% A good start is
% http://robjhyndman.com/researchtips/latex-floats/
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.8}
\renewcommand{\textfraction}{0.1}
\setlength{\floatsep}{5pt plus 2pt minus 2pt}
\setlength{\textfloatsep}{5pt plus 2pt minus 2pt}
\setlength{\intextsep}{5pt plus 2pt minus 2pt}
\begin{document}
\chapter{Test}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\section{Test}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\section{Test}
\blindtext[2]
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth,height=50mm]{}
\caption{Test Test Test}
\end{figure}
\blindtext[2]
\end{document}
In the example I just used the standard placement option and did not use the H option. You can still use it if necessary. An overview can be found in the book The Latex Companions Chapter 6.1. A good start can also be found here. Also very good - but you have to read a lot - here to be found.
There is also a ! operator: \begin{figure}[!htb]
. It is stronger than [htb]
but weaker than [H]
.
In the example I changed some of the parameters:
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.8}
\renewcommand{\textfraction}{0.1}
\setlength{\floatsep}{5pt plus 2pt minus 2pt}
\setlength{\textfloatsep}{5pt plus 2pt minus 2pt}
\setlength{\intextsep}{5pt plus 2pt minus 2pt}
It is a bit of work to understand what each of these parameters mean. You can use my suggestion as a start.
In general, I would worry about the placement when you are near the end and want to 'tidy up'.
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}
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.
Best Answer
The posted fragment does not produce the image shown (the
\newline
would generate an error and there is only one paragraph after the figure)If I complete it to a document as follows
Then the spacing is as expected: