横向之前的空白(\afterpage 不起作用)

横向之前的空白(\afterpage 不起作用)

如何消除横向页面前的空白?如下所述:删除横向之前的空白,\afterpage 对我来说不起作用。请参阅下面的示例。

\documentclass[a4paper, 12pt]{article}
\DeclareUnicodeCharacter{FB01}{fi}
\DeclareUnicodeCharacter{FB02}{fl}
%\usepackage[space]{grffile}
\usepackage{apacite}
\usepackage{lipsum}
\usepackage{makecell}
\usepackage{afterpage}
\usepackage{dblfloatfix}
\usepackage[referable]{threeparttablex}
\usepackage[paper=portrait,pagesize]{typearea}
\usepackage{mleftright}
\usepackage{lscape}
\usepackage{a4wide}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{float, afterpage, rotating, graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz, epstopdf,pgfplots}
\usepackage{longtable, booktabs, tabularx}
\usepackage{fancyvrb, moreverb, relsize}
\usepackage{eurosym, calc, chngcntr}
\usepackage{amsmath, amssymb, amsfonts, amsthm, bm}
\usepackage{mathtools}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\usepackage[labelfont={bf}, skip=5pt]{caption}
\usepackage{mdwlist}
\usepackage{tabularx, booktabs}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{xfrac}
\usepackage{setspace,geometry}
\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{upgreek}
\usepackage{afterpage}
\usepackage{wrapfig}
\usepackage{pdflscape}
\usepackage{multirow, booktabs, makecell, caption}
\usepackage{fancyhdr}
\usepackage[toc]{glossaries}
\usepackage{subcaption}
\usepackage{lipsum}  
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{eurosym}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{abstract}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage[hyphens]{url}
\usepackage{acronym}
\usepackage[english]{babel}
\usepackage[round, sort&compress]{natbib} %sort&compress orders in text citation automatically
\usepackage{pgfplots}
\usepackage{threeparttable}
\usepackage{siunitx} %setze S in Tabelle, um nach dem Punkt auszurichten
\usepackage[export]{adjustbox}
\usepackage{etoolbox}
\usepackage[hyperfootnotes=false]{hyperref}
\usepackage{footnotebackref}
\usepackage{appendix}
\usepackage[bottom,hang,flushmargin]{footmisc} %footnotes always appear on bottom and not end of text on single page
\geometry{a4paper, top=30mm, left=30mm, right=30mm, bottom=30mm,headsep=10mm, footskip=12mm}


\begin{document}

\section{Empirical results} 
\label{sec2:results}

\lipsum[3-5]

\newgeometry{top=30mm, left=5mm, right=10mm, bottom=30mm,headsep=10mm, footskip=12mm}

\afterpage{
\begin{landscape}

Test

\end{landscape}
}
\restoregeometry


\lipsum[3-5]

\end{document}

刚刚发现,使用该代码可以正常工作。因此,它一定是导致问题的软件包之一。

\documentclass[a4paper, 12pt]{article}
\DeclareUnicodeCharacter{FB01}{fi}
\DeclareUnicodeCharacter{FB02}{fl}
%\usepackage[space]{grffile}
\usepackage{apacite}
\usepackage{lipsum}
\usepackage{makecell}
\usepackage{afterpage}
\usepackage{lscape}

\begin{document}

\section{Empirical results} 
\label{sec2:results}

\lipsum[3-5]


\afterpage{
\begin{landscape}

Test

\end{landscape}
}



\lipsum[3-5]

\end{document}

分页符来自 \newgeometry,它现在可以工作了:

\documentclass[a4paper, 12pt]{article}
\DeclareUnicodeCharacter{FB01}{fi}
\DeclareUnicodeCharacter{FB02}{fl}
%\usepackage[space]{grffile}

\usepackage{lipsum}
\usepackage{afterpage}
\usepackage{lscape}
\usepackage{setspace,geometry}
\usepackage{acronym}


\begin{document}

\section{Empirical results} 
\label{sec2:results}

\lipsum[3-5]



\afterpage{
\newgeometry{top=30mm, left=5mm, right=10mm, bottom=30mm,headsep=10mm, footskip=12mm}
\begin{landscape}

Test

\end{landscape}
\restoregeometry
}



\lipsum[3-5]

\end{document}

相关内容