我的 Latex 论文开头有 2 页空白页

我的 Latex 论文开头有 2 页空白页

使用以下软件包和设置,我的论文开头出现了两个空白页,论文(包括标题)从第三页开始。在第一页中,我只有“1.5em 0pt”。我该如何删除这两个空白页?

%\documentclass[8pt]{llncs}
\documentclass[runningheads,a4paper,fleqn]{llncs}
%\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
%\usepackage[english,turkey]{babel}
\usepackage{amssymb}
\setcounter{tocdepth}{3}
 \usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{subfiles}
%\usepackage{caption}
\usepackage{mdframed}
\usepackage{pifont}
%\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{float}
\usepackage{graphicx}
\usepackage{multirow}
%\usepackage{algorithmicx}
%\usepackage{amssymb,booktabs}
\usepackage{amsmath}
%\usepackage[belowskip=-1pt,aboveskip=0pt]{mathtools}
\usepackage{changepage}
\usepackage{array}
\usepackage{enumitem}
\usepackage{color}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{setspace}
\setlist{nosep} 

%\usepackage[ruled,noend]{algorithm2e} %to put 2 algorithm side by side
%for space of refernces%%%%%%%%%%%%
%\usepackage{natbib}
%\setlength{\bibsep}{-3pt} 


%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[font=scriptsize,skip=-8pt, belowskip=0pt,aboveskip=1pt]{caption}
\usepackage{subcaption}% http://ctan.org/pkg/subcaption
\captionsetup{compatibility=false}
\sloppy

\DeclareMathSizes{6}{6}{6}{6}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\newcommand\fplus{\mathrel+}

%% Save the class definition of \subparagraph
\let\llncssubparagraph\subparagraph
%% Provide a definition to \subparagraph to keep titlesec happy
\let\subparagraph\paragraph
%% Load titlesec
\usepackage[compact]{titlesec}
%% Revert \subparagraph to the llncs definition
\let\subparagraph\llncssubparagraph
\titlespacing\section {0pt} {12pt plus 0pt minus 2pt} {0pt plus 0pt minus 2pt}
\titlespacing\subsection {0pt} {0pt plus 0pt minus 2pt} {0pt plus 0pt minus 2pt}
\titlespacing\subsubsection {0pt} {0pt plus 0pt minus 2pt} {0pt plus 0pt minus 2pt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[utf8]{inputenc}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[T1]{fontenc}
%\usepackage[english,turkey]{babel}
\usepackage{amssymb}
\setcounter{tocdepth}{3}
 \usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{subfiles}
\usepackage{mdframed}
\usepackage{pifont}
\usepackage{algorithm}
\usepackage{algpseudocode}
%\usepackage[font=footnotesize]{caption}
\usepackage{graphicx}
\usepackage{multirow}
%\usepackage{algorithmicx}
%\usepackage{amssymb,booktabs}
\usepackage{amsmath}
\usepackage{changepage}
\usepackage{array}
\usepackage{enumitem}
\usepackage{color}
%\usepackage{caption}
\usepackage{algpseudocode}
\usepackage{algorithm}
\setlist{nosep} 
\usepackage{algorithm}% http://ctan.org/pkg/algorithm
\usepackage{algpseudocode}%http://ctan.org/pkg/algorithmicx


\sloppy

\DeclareMathSizes{6}{6}{6}{6}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%\setlength\floatsep{10 pt}
%\setlength\textfloatsep{7.5 pt}
%\setlength\intextsep{7.5 pt}

%\doi{10.475/123_4}

% ISBN
%\isbn{123-4567-24-567/08/06}

%Conference
%\conferenceinfo{PLDI '13}{June 16--19, 2013, Seattle, WA, USA}

%\acmPrice{\$15.00}

%\conferenceinfo{WOODSTOCK}{'97 El Paso, Texas USA}

%space of equations
\makeatletter
\g@addto@macro\normalsize{%
  \setlength\abovedisplayskip{0pt}
  \setlength\belowdisplayskip{0pt}
  \setlength\abovedisplayshortskip{0pt}
  \setlength\belowdisplayshortskip{0pt}
}
\makeatother
%psace of section titles


\begin{document}


\mainmatter 
% first the title is needed
\title{}
\author{}


\maketitle

答案1

这里的问题是algpseudocodealgorithmic不兼容,如下所示最小例子:

\documentclass{article}

\usepackage{algpseudocode}
\usepackage{algorithmic}

\begin{document}
Lorem ipsum
\end{document}

出于这个特定原因,如果您希望使用algorithmic类似输入,则该algorithmicx捆绑包提供了该algcompatible包。从algorithmicx包装文档(部分2.1 软件包):

algcompatible与包完全兼容algorithmic,它应该只在旧文档中使用

因此,您应该避免同时加载algpseudocode algorithmic,而只是加载algcompatible 或者 algorithmic

答案2

在禁用 \usepackage{algorithmic} 并启用 \usepackage{algorithm,algpseudocode} 后,第一个空白页显示“1.5em 0pt”的问题现已解决。谢谢大家

相关内容