
我正在使用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
。這個宏分節標題應該是「run-in」還是「display」的條件。在顯示部分中,標題設定在單行上,後面的段落內容則設定在單獨的行上。然而,為了避免頁面底部懸空的分段標題,\nobreak
發出了 a。這允許分節標題與後續段落連接/粘合(而不是分離)(好吧,不是全部),要么將它們都保留在當前頁面上,要么將它們刷新到下一頁。
在您的設定中,您已經僅有的使用分段單元來建立您的文件(\section
s 和\subsection
s )。這兩個部分標題都設定為顯示,因此強制\nobreak
.所有標題都發出\nobreak
s,它們實際上“粘在一起”。一旦要發出分頁符,整個分區單元區塊就可以僅有的刷新到下一頁,因為摘要是唯一可以插入可靠分頁符號的文字。
這只是一個特殊的場景,在也包含段落文字的常規(真實)文件中不應引起關注。