1

enter image description here

I usually position my tables and figures with [H] and after tables and figures the text suddenly has an empty space as shown in the above picture. I am not totally sure but this also happend since I enabled the option a4paper in the documentclass report. How can I go back to not having this blank after each figure or table that is position with [H]?

    \documentclass[a4paper,11pt]{report}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\usepackage[textwidth=16cm]{geometry}
\usepackage{calc}  
\usepackage{float}
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\bibliographystyle{apalike}
\newcommand\mycite[2][]{%
  \citeauthor{#2}\ (\citeyear{#2})\ifx#1\undefined\else, #1\fi}
  \newcommand\myfootcite[2][]{\footnote{\mycite[#1]{#2}}}
  \def\prevcite{} % initialize \prevcite
%% macro for in-text citation
\newcommand\tcite[2][]{%  
  \def\newcite{#2} 
  \ifx\prevcite\newcite 
    Ibid.%
  \else%
    \gdef\prevcite{#2}% update \prevcite
    \citeauthor{#2}\ (\citeyear{#2})%
  \fi
  \ifx#1\undefined\else, #1\fi}
%% macro for in-footnote citation
\newcommand\fcite[2][]{\footnote{\tcite[#1]{#2}}}

\usepackage{rotating}


\makeatletter
\newcommand*{\ibid}{Ibid.}
  \let\@predcite\@empty
  \let\@currcite\@empty
\def\citef{\kernel@ifnextchar[\citef@{\citef@[]}}
\def\citef@[#1]{\kernel@ifnextchar[{\citef@@[{#1}]}{\citef@@[][{#1}]}}
\def\citef@@[#1][#2]#3{%
  \def\@currcite{#3}%
  \unskip
    \ifx\@currcite\@predcite
      \footnote{#1 \ifx\tempa\@empty\unskip\fi%
      \ibid\ifx\tempb\@empty\else\NAT@cmt #2\fi}%
    \else%
      \footnote{\citealp[#1][#2]{#3}}%
    \fi
  \gdef\@predcite{#3}%
}
\makeatother

\usepackage{tabulary}
\usepackage[maxfloats=30,morefloats=12]{morefloats}
\usepackage{booktabs}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % a handy shortcut macro
\usepackage[usestackEOL]{stackengine}
\usepackage{float,lscape}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{tabularx}
\makeatletter
\def\hlinewd#1{%
  \noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
   \reserved@a\@xhline}
\makeatother
\usepackage[font=footnotesize,bf]{caption}
\usepackage{url}
\urlstyle{same}
\usepackage{multirow}
\usepackage{bigstrut}
\usepackage{siunitx}
\usepackage{graphicx}
\graphicspath{{C:/Users/Enrico/lateximages/}}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[RO,RE]{\fontsize{10}{12}\selectfont\nouppercase\thepage}
\fancyhead[LO,LE]{\fontsize{10}{12}\selectfont\nouppercase\leftmark} 
\fancyfoot{}
\fancypagestyle{plain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} % remove lines as well
  \renewcommand{\footrulewidth}{0pt}
}

    \makeatletter
\renewcommand*\@makechapterhead[1]{%
  %\vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\renewcommand*\@makeschapterhead[1]{%
  %\vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \Huge \bfseries  #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother

    \begin{document}



    This and the comparison with gymnastics  clarifies that despite the hype that it generated, football was still in the very early stages of development in Switzerland during the first half of the 20th century. With the advantage of football being less reliant on equipment, many played on the streets or in playgrounds rather than in clubs, especially the younger generation.

\begin{figure}[htbp]
\caption{Membership of ETV and SFAV 1910 - 1930}
\includegraphics[width=12cm,keepaspectratio]{footballvsgym}
\centering
    \captionsetup{font={scriptsize}}
    \caption*{Source: Eidgenössischer Turnverein (1910-1930) and Ruoff (1953), own repr. based on A.6/A.25}
\centering
\end{figure}

Figure 7.1 depicts a direct comparison of the total members of both football and gymnastics for the last third of the observation period. First of all, it is blatantly obvious that gymnastics had the much larger membership base than football. he last third of the observation period. First of all

    \end{document}
  • Use use the report class, which typeset the text with \flushbottom. To flush the last line with the bottom margin, LaTeX add space where it finds it appropriate to add space. For example before and after a picture. If you let the figure float, LaTeX may move it around and add text lines to the page, giving better total layout without lots of blank space. When you add H LaTeX has limited possibility to typeset correctly. Try using \raggedbottom in the preamble. – Sveinung Jan 21 '15 at 13:42
  • \raggedbottom didn't help unfortunately. It looks like I'll have to manually edit every table and figure? – MadJens Jan 21 '15 at 14:50
  • Either let the pictures float, or do as @Steven B. Segletes suggests. – Sveinung Jan 21 '15 at 15:28
  • You have a blank line there, meaning a paragraph break where glue can be inserted. Removing the \par would be my first suggestion. – Johannes_B Jan 21 '15 at 16:49
  • Hint: Use the label/ref mechanism to get the number of a figure, this is much less error prone and saves some serious time. – Johannes_B Jan 21 '15 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.