我通常用 [H] 来定位表格和图形,表格和图形后面的文本突然出现空白,如上图所示。我不太确定,但自从我在 documentclass 报告中启用了选项 a4paper 后,这种情况也发生了。如何才能恢复到用 [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}