LNCS 格式中 \subsection 后的分页问题

LNCS 格式中 \subsection 后的分页问题

我正在使用LNCS模板撰写论文。但是,奇怪的是,如果我在某个随机点添加分页符,则\subsection在“摘要”和“第一部分”之间会出现分页符:

\documentclass[runningheads,a4paper]{llncs}

\usepackage{amssymb}
\setcounter{tocdepth}{3}
\usepackage{graphicx}

\usepackage{url}
%\urldef{\mailsa}\path|{alfred.hofmann, ursula.barth, ingrid.haas, frank.holzwarth,|
%\urldef{\mailsb}\path|anna.kramer, leonie.kunz, christine.reiss, nicole.sator,|
%\urldef{\mailsc}\path|erika.siebert-cole, peter.strasser, lncs}@springer.com|    
\newcommand{\keywords}[1]{\par\addvspace\baselineskip
\noindent\keywordname\enspace\ignorespaces#1}

\begin{document}

\mainmatter  % start of an individual contribution

% first the title is needed
\title{XXXXXX}
% a short form should be given in case it is too long for the running head
%\titlerunning{Lecture Notes in Computer Science: Authors' Instructions}

% the name(s) of the author(s) follow(s) next
%
% NB: Chinese authors should write their first names(s) in front of
% their surnames. This ensures that the names appear correctly in
% the running heads and the author index.
%
\author{}
%\author{Alfred Hofmann%
%\thanks{Please note that the LNCS Editorial assumes that all authors have used
%the western naming convention, with given names preceding surnames. This determines
%the structure of the names in the running heads and the author index.}%
%\and Ursula Barth\and Ingrid Haas\and Frank Holzwarth\and\\
%Anna Kramer\and Leonie Kunz\and Christine Rei\ss\and\\
%Nicole Sator\and Erika Siebert-Cole\and Peter Stra\ss er}
%
%\authorrunning{Lecture Notes in Computer Science: Authors' Instructions}
% (feature abused for this document to repeat the title also on left hand pages)

% the affiliations are given next; don't give your e-mail address
% unless you accept that it will be published
\institute{}
%\institute{Springer-Verlag, Computer Science Editorial,\\
%Tiergartenstr. 17, 69121 Heidelberg, Germany\\
%\mailsa\\
%\mailsb\\
%\mailsc\\
%\url{http://www.springer.com/lncs}}

%
% NB: a more complex sample for affiliations and the mapping to the
% corresponding authors can be found in the file "llncs.dem"
% (search for the string "\mainmatter" where a contribution starts).
% "llncs.dem" accompanies the document class "llncs.cls".
%

%\toctitle{Lecture Notes in Computer Science}
%\tocauthor{Authors' Instructions}
\maketitle


\begin{abstract}
Dummy abstract
\keywords{}
\end{abstract}


\section{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\section{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\section{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\section{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\subsection{XXXXXX}

\section{XXXXXX}

%\subsection{XXXXXX}% Uncomment this to see the problem

\end{document}

令人惊讶的是,我\subsection在末尾添加了一个,但换行符出现在最开始,在第一页之后。有人能告诉我如何修复它吗?

答案1

您的最小示例实际上并不能反映典型文档,但输出符合预期。原因如下...

每个分段单元在施工过程中都要经过相同的宏观处理,\@startsection这个宏条件是章节标题应该是“运行”还是“显示”。在显示部分中,标题设置在一行上,段落内容则位于单独的一行上。但是,为了避免章节标题悬垂在页面底部,\nobreak发出一个。这允许节标题与后续段落连接/粘合(而不是分离)(好吧,不是全部),要么将它们都保留在当前页面上,要么将它们都刷新到下一页。

在您的设置中,您已经仅有的使用章节单位来构建文档(\sections​​ 和\subsections)。这两个章节标题都设置为显示,因此强制使用\nobreak。所有标题都发出\nobreaks 结尾,因此它们实际上“粘在一起”。一旦有分页符要发出,整个分节单元块就可以仅有的刷新到下一页,因为摘要是唯一可以插入可靠分页符的文本。

这只是一种特殊的情况,在包含段落文本的常规(真实)文档中不必担心。

相关内容