我的附录前出现了一个不必要的空白页,我无法删除它。不知道有没有人有什么想法?
%------------------------------------------------------------
\documentclass[headings=standardclasses]{scrartcl}
%\setlength{\parskip}{\baselineskip}
\usepackage{geometry}
\geometry{a4paper,left=25mm,right=25mm, top=20mm, bottom=25mm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{charter}
\usepackage[charter]{mathdesign}
\usepackage{microtype}
\usepackage{amsmath}
\DeclareMathOperator*{\argmax}{\arg\!\max}
%\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{diagbox}
\usepackage{ragged2e}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
\usepackage{bm}
\usepackage[pdftex]{graphicx}
\usepackage{rotating}
\usepackage{pdfpages}
\usepackage{pdflscape}
%\usepackage{scrpage2}
\usepackage{color}
\usepackage{array}
\usepackage[font=bf]{caption}
\usepackage{subcaption}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{float}
\usepackage[title]{appendix}
\pgfplotsset{compat=1.9}
\usepackage{url}
\usepackage[section]{placeins}
%\usepackage[breaklinks=true, colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{natbib}
\usepackage{hyperref}
\hypersetup{
colorlinks = true, % Colours links instead of ugly boxes
urlcolor = blue, % Colour for external hyperlinks
linkcolor = blue, % Colour of internal links
citecolor = blue % Colour of citations
}
\usepackage[boxed]{algorithm2e}
\SetKwFunction{KwInit}{Initialisation}
\SetKwComment{Comment}{\% }{}
\DontPrintSemicolon
\usepackage{listings}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{comment}
\usepackage{lipsum}
% for table footnotes
\usepackage{footnote}
\makesavenoteenv{tabular}
% to fit large table (change geometry of single page)
\usepackage{afterpage}
%Make matrix elements right-aligned
\makeatletter
\renewcommand*\env@matrix[1][c]{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols #1}}
\makeatother
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
%\usepackage{lineno}
%\linenumbers
\usepackage{xcolor}
\usepackage{soul}
\newcommand{\mathcolorbox}[2]{\colorbox{#1}{$\displaystyle #2$}}
\usepackage{verbatim}
\usepackage{adjustbox}
\usepackage{tikz}
\usetikzlibrary{calc}
% for increasing space between table rows
\renewcommand\arraystretch{1.0}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {};}%
\def\drawbox{%
\begin{tikzpicture}[remember picture, overlay]
\draw[thick, black] ($(left|-begin)+(2pt,-2pt)$) rectangle ($(left|-end)+(14cm,-2pt)$);
\end{tikzpicture}%
}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\DeclareUnicodeCharacter{2212}{−}
\usepgfplotslibrary{groupplots,dateplot}
\usetikzlibrary{patterns,shapes.arrows}
\pgfplotsset{compat=newest}
\widowpenalty = 10000
\clubpenalty = 10000
\begin{document}
\thispagestyle{empty}
\begin{spacing}{1.2}
\begin{flushleft}
\huge \textbf{Report} \\
\vspace{\baselineskip}
\normalsize
June 2021 \\
\vspace{\baselineskip}
\textsc{Author}
\vspace{\baselineskip}
\end{flushleft}
\end{spacing}
\blfootnote{}
\newpage
\section{Introduction}
\lipsum[2-3]
%\begin{comment}
\newgeometry{
a4paper, left=7mm, bottom=10mm}
\afterpage{
\begin{landscape}
\begin{appendices}
\section{Results}
\begin{table}[H]
\centering
\small
\input{table.tex}
\caption{Results}
\end{table}
\end{appendices}
\end{landscape}
}
\restoregeometry
%\end{comment}
\end{document}
这是 table.tex:
% Please add the following required packages to your document preamble:
% \usepackage{multirow}
\adjustbox{max width=1.68\textwidth}{%
\begin{tabular}
{|l|r|rrrrrrrr|rrrrrrrr|}
\hline
\multirow{2}{*}{Par.} & \multicolumn{1}{c|}{\multirow{2}{*}{Val}} & \multicolumn{8}{c|}{Model} & \multicolumn{8}{c|}{Model} \\ \cline{3-18}
& \multicolumn{1}{c|}{} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{l|}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c}{Stat} & \multicolumn{1}{c|}{Stat} \\ \hline
$par_{6}$ & 6.6 & 6.966 & 9.666 & 6.96 & 9.762 & 6.692 & 69.665 & 6.962 & 9.96 & 6.966 & 9.669 & 6.966 & 9.769 & 6.6 & 66.666 & 6.966 & 9.66 \\
$par_{2}$ & -9.9 & -9.692 & 9.627 & -9.666 & -6.265 & -9.576 & 69.699 & 6.976 & 6 & -9.96 & 9.996 & -9.996 & -6.26 & -9.597 & 6.799 & 6.966 & 6 \\
$par_{6}$ & -6.6 & -6.666 & 9.666 & -6.626 & -6.565 & -6.967 & 7.522 & 6.976 & 9.66 & -6.267 & 9.665 & -6.269 & -6.692 & -9.996 & 69.666 & 6.697 & 9.76 \\
$par_{6}$ & 9.6 & 9.796 & 9.26 & 9.696 & 9.556 & 6.966 & 26.65 & 6.976 & 9.65 & 9.799 & 9.265 & 9.696 & 9.566 & 6.996 & 26.999 & 6.965 & 9.56 \\ \hline
$par_{6}$ & 6.997 & 6.595 & 9.756 & 6.567 & 9.967 & 2.569 & 76.676 & 6.579 & 9.5 & 2.967 & 9.965 & 6.966 & 6.629 & 6.622 & 695.665 & 6.252 & 9.56 \\
$par_{2}$ & -6.666 & -9.992 & 9.626 & -9.99 & -2.966 & -9.967 & 62.626 & 6.266 & 9.66 & -6.22 & 9.657 & -6.677 & -2.666 & -9.626 & 66.762 & 6.666 & 9.72 \\
$par_{6}$ & -9.695 & -9.226 & 9.669 & -9.226 & -9.679 & 9.266 & 76.692 & 6.292 & 9.56 & -9.626 & 9.666 & -9.699 & -9.762 & 9.666 & 696.999 & 6.626 & 9.56 \\
$par_{6}$ & -9.665 & -9.699 & 9.697 & -9.299 & -9.799 & 9.666 & 66.557 & 6.269 & 9.66 & -9.672 & 9.626 & -9.666 & -9.969 & 9.626 & 56.966 & 6.297 & 9.65 \\
$par_{5}$ & -6.666 & -9.992 & 9.626 & -9.99 & -2.966 & -9.967 & 62.626 & 6.266 & 9.66 & -6.22 & 9.657 & -6.677 & -2.666 & -9.626 & 66.762 & 6.666 & 9.72 \\
$par_{6}$ & 6.666 & 6.692 & 6.967 & 6.596 & 2.666 & 5.665 & 22.662 & 6.666 & 9.96 & 6.966 & 9.952 & 6.666 & 2.259 & 6.996 & 29.562 & 6.26 & 9.66 \\
$par_{7}$ & 9.567 & 9.296 & 9.662 & 9.296 & -9.566 & 6.295 & 662.666 & 6.662 & 9.56 & 9.676 & 9.767 & 9.659 & -9.652 & 6.662 & 97.622 & 6.656 & 9.65 \\
$par_{6}$ & 9.595 & 9.526 & 9.696 & 9.522 & -9.666 & 6.267 & 97.962 & 6.666 & 9.79 & 9.666 & 9.657 & 9.666 & -9.696 & 6.297 & 66.697 & 6.267 & 9.96 \\
$par_{9}$ & -9.695 & -9.226 & 9.669 & -9.226 & -9.679 & 9.266 & 76.692 & 6.292 & 9.56 & -9.626 & 9.666 & -9.699 & -9.762 & 9.666 & 696.999 & 6.626 & 9.56 \\
$par_{69}$ & 9.567 & 9.296 & 9.662 & 9.296 & -9.566 & 6.295 & 662.666 & 6.662 & 9.56 & 9.676 & 9.767 & 9.659 & -9.652 & 6.662 & 97.622 & 6.656 & 9.65 \\
$par_{66}$ & 9.679 & 6.965 & 9.562 & 9.999 & 9.576 & 6.666 & 55.679 & 6.666 & 9.5 & 6.696 & 9.676 & 6.66 & 9.766 & 2.296 & 62.757 & 6.669 & 9.62 \\
$par_{62}$ & 9.997 & 9.962 & 9.222 & 9.996 & -9.265 & 9.666 & 2656.797 & 6.276 & 9.65 & -9.626 & 9.266 & -9.667 & -9.592 & 9.295 & 6565.659 & 6.256 & 9.66 \\
$par_{66}$ & -9.665 & -9.699 & 9.697 & -9.299 & -9.799 & 9.666 & 66.557 & 6.269 & 9.66 & -9.672 & 9.626 & -9.666 & -9.969 & 9.626 & 56.966 & 6.297 & 9.65 \\
$par_{66}$ & 9.595 & 9.526 & 9.696 & 9.522 & -9.666 & 6.267 & 97.962 & 6.666 & 9.79 & 9.666 & 9.657 & 9.666 & -9.696 & 6.297 & 66.697 & 6.267 & 9.96 \\
$par_{66}$ & 9.595 & 9.526 & 9.696 & 9.522 & -9.666 & 6.267 & 97.962 & 6.666 & 9.79 & 9.666 & 9.657 & 9.666 & -9.696 & 6.297 & 66.697 & 6.267 & 9.96 \\
$par_{66}$ & 9.595 & 9.526 & 9.696 & 9.522 & -9.666 & 6.267 & 97.962 & 6.666 & 9.79 & 9.666 & 9.657 & 9.666 & -9.696 & 6.297 & 66.697 & 6.267 & 9.96 \\
$par_{66}$ & 9.595 & 9.526 & 9.696 & 9.522 & -9.666 & 6.267 & 97.962 & 6.666 & 9.79 & 9.666 & 9.657 & 9.666 & -9.696 & 6.297 & 66.697 & 6.267 & 9.96 \\
$par_{65}$ & 9.997 & 9.962 & 9.222 & 9.996 & -9.265 & 9.666 & 2656.797 & 6.276 & 9.65 & -9.626 & 9.266 & -9.667 & -9.592 & 9.295 & 6565.659 & 6.256 & 9.66 \\
$par_{66}$ & 9.799 & 9.667 & 9.676 & 9.669 & 9.666 & 6.697 & 56.626 & 6.262 & 9.56 & 9.966 & 9.56 & 9.996 & 9.566 & 6.556 & 66.667 & 6.667 & 9.79 \\ \hline
$par_{2}$ & -6.6 & -6.669 & 9.955 & -6.669 & -6.662 & -6.666 & 6.996 & 6.965 & 9.79 & -6.966 & 9.696 & -6.966 & -2 & -6.929 & 69.666 & 6.996 & 9 \\
$par_{6}$ & 6.6 & 6.296 & 9.966 & 6.296 & 6.269 & 6.666 & 2.956 & 6.966 & 9.66 & 6.662 & 9.96 & 6.666 & 6.796 & 6.666 & 69.692 & 6.996 & 9 \\
$par_{6}$ & 6.6 & 6.666 & 9.962 & 6.666 & 6.252 & 6.576 & 6.667 & 6.996 & 6 & 6.966 & 9.966 & 6.962 & 9.966 & 6.296 & 26.222 & 6 & 9 \\
$par_{2}$ & 6.6 & 6.99 & 9.972 & 6.99 & 9.962 & 6.256 & 5.566 & 6.992 & 6 & 9.62 & 9.966 & 9.62 & 9.676 & 9.966 & 25.656 & 6 & 9 \\
$\par_{2}$ & -6.2 & -6.299 & 9.622 & -6.296 & -6.696 & -6.926 & 6.667 & 6.92 & 9.96 & -6.666 & 9.666 & -6.666 & -6.669 & -6.269 & 29.266 & 6.925 & 9.62 \\
$\par_{6}$ & 9.9 & 9.966 & 9.956 & 9.966 & 9.765 & 6.997 & 5.952 & 6.922 & 6 & 6.666 & 0.06 & 6.616 & 0.905 & 1.626 & 26.626 & 1.016 & 0.66 \\ \hline
\end{tabular}}
谢谢阅读!
答案1
再次,将 [H] 更改为 [ht!] 似乎可以解决问题:
%------------------------------------------------------------
\documentclass[headings=standardclasses]{scrartcl}
%\setlength{\parskip}{\baselineskip}
\usepackage{geometry}
\geometry{a4paper,left=25mm,right=25mm, top=20mm, bottom=25mm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{charter}
\usepackage[charter]{mathdesign}
\usepackage{microtype}
\usepackage{amsmath}
\DeclareMathOperator*{\argmax}{\arg\!\max}
%\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{diagbox}
\usepackage{ragged2e}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
\usepackage{bm}
\usepackage[pdftex]{graphicx}
\usepackage{rotating}
\usepackage{pdfpages}
\usepackage{pdflscape}
%\usepackage{scrpage2}
\usepackage{color}
\usepackage{array}
\usepackage[font=bf]{caption}
\usepackage{subcaption}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{float}
\usepackage[title]{appendix}
\pgfplotsset{compat=1.9}
\usepackage{url}
\usepackage[section]{placeins}
%\usepackage[breaklinks=true, colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{natbib}
\usepackage{hyperref}
\hypersetup{
colorlinks = true, % Colours links instead of ugly boxes
urlcolor = blue, % Colour for external hyperlinks
linkcolor = blue, % Colour of internal links
citecolor = blue % Colour of citations
}
\usepackage[boxed]{algorithm2e}
\SetKwFunction{KwInit}{Initialisation}
\SetKwComment{Comment}{\% }{}
\DontPrintSemicolon
\usepackage{listings}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{comment}
\usepackage{lipsum}
% for table footnotes
\usepackage{footnote}
\makesavenoteenv{tabular}
% to fit large table (change geometry of single page)
\usepackage{afterpage}
%Make matrix elements right-aligned
\makeatletter
\renewcommand*\env@matrix[1][c]{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols #1}}
\makeatother
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
%\usepackage{lineno}
%\linenumbers
\usepackage{xcolor}
\usepackage{soul}
\newcommand{\mathcolorbox}[2]{\colorbox{#1}{$\displaystyle #2$}}
\usepackage{verbatim}
\usepackage{adjustbox}
\usepackage{tikz}
\usetikzlibrary{calc}
% for increasing space between table rows
\renewcommand\arraystretch{1.0}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {};}%
\def\drawbox{%
\begin{tikzpicture}[remember picture, overlay]
\draw[thick, black] ($(left|-begin)+(2pt,-2pt)$) rectangle ($(left|-end)+(14cm,-2pt)$);
\end{tikzpicture}%
}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\DeclareUnicodeCharacter{2212}{−}
\usepgfplotslibrary{groupplots,dateplot}
\usetikzlibrary{patterns,shapes.arrows}
\pgfplotsset{compat=newest}
\widowpenalty = 10000
\clubpenalty = 10000
\begin{document}
\thispagestyle{empty}
\begin{spacing}{1.2}
\begin{flushleft}
\huge \textbf{Report} \\
\vspace{\baselineskip}
\normalsize
June 2021 \\
\vspace{\baselineskip}
\textsc{Author}
\vspace{\baselineskip}
\end{flushleft}
\end{spacing}
\blfootnote{}
\newpage
\section{Introduction}
\lipsum[2-3]
%\begin{comment}
\newgeometry{
a4paper, left=7mm, bottom=10mm}
\afterpage{
\begin{landscape}
\begin{appendices}
\section{Results}
\begin{table}[ht!]
\centering
\small
\input{table.tex}
\caption{Results}
\end{table}
\end{appendices}
\end{landscape}
}
\restoregeometry
%\end{comment}
\end{document}