我正在使用我所在大学提供的自定义文件(实际文件名不同)撰写研究提案thesis.sty
。使用此样式文件生成的节标题在页面末尾中断。因此,页面末尾有孤立的节标题。在一个实例中,节标题本身内有一个分页符,在这种情况下,节标题的长度超过一行。以下是thesis.sty
定义自定义节和子节的文件的片段:
%==============================================================
% BEGIN Section and subsection Customization
%==============================================================
%\def\section#1{\ifnum\chaptertest>1 \vskip 0.25in \else \vskip 0.01in \fi
\def\section#1{\ifnum\chaptertest>1 \vskip 0.25in \else \vskip 0.25in \fi
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{section}
\addcontentsline{toc}{section}{\protect
\numberline{\thesection.}#1}\else
\addcontentsline{toc}{section}{#1}\fi
\sectionmark{#1}
\noindent %T
%T \centerline{$\underline{\hbox{\thesection.} _{\ } \ \hbox{#1}}$}
\Null {\bf \thesection. \ #1}%T Removed preceeding space before bf which makes headers misaligned TCM
\vskip -0.23in %% Ju
\indent
}
%\def\sectiondl#1#2{\ifnum\chaptertest>1 \vskip 0.25in \else \vskip 0.01in \fi
\def\sectiondl#1#2{\ifnum\chaptertest>1 \vskip 0.25in \else \vskip 0.25in \fi
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{section}
\addcontentsline{toc}{section}{\protect
\numberline{\thesection.}#1 #2}\else
\addcontentsline{toc}{section}{#1 #2}\fi
\sectionmark{#1 #2}
\centerline{$\underline{\hbox{\thesection.} _{\ } \ \hbox{#1}}$}
\centerline{$\underline{\hbox{\thesection.} _{\ } \ \hbox{#1}}$}
\centerline{$\underline{_{\ } \hbox{#2}}$}
\vskip -0.09in %% Ju
\indent
}
\def\subsection#1{\vskip 0.25in \ifnum \c@secnumdepth >\m@ne
\refstepcounter{subsection}
\addcontentsline{toc}{subsection}{\protect
\numberline{\thesubsection.}#1}\else
\addcontentsline{toc}{subsection}{#1}\fi
\subsectionmark{#1}
%T \centerline{\thesubsection. \ #1}
\noindent %T
\Null \thesubsection. \ #1
\vskip -0.27in %% Ju: space betw. name to the fisrt line
\indent
}
\def\subsectiondl#1#2{\vskip 0.25in \ifnum \c@secnumdepth >\m@ne
\refstepcounter{subsection}
\addcontentsline{toc}{subsection}{\protect
\numberline{\thesubsection.}#1 #2}\else
\addcontentsline{toc}{subsection}{#1 #2}\fi
\subsectionmark{#1}
}
\def\subsubsection#1{\vskip 0.25in \ifnum \c@secnumdepth >\m@ne
\refstepcounter{subsubsection}
\addcontentsline{toc}{subsubsection}{\protect
\numberline{\thesubsubsection.}#1}\else
\addcontentsline{toc}{subsubsection}{#1}\fi
\subsubsectionmark{#1}
\noindent
%\centerline{\thesubsubsection. \ #1} %% title is on the middle originally
%T\Null \thesubsubsection. \ #1 %% Ju move it to the left ( standard requirement)
\Null {\em \thesubsubsection. \ #1 } %% Ju move it to the left ( standard requirement) % Removed preceeding space before em which makes headers misaligned TCM
%T \Null added to show first numeral
\vskip -0.27in
\indent
}
\def\subsubsectiondl#1#2{\vskip 0.25in \ifnum \c@secnumdepth >\m@ne
\refstepcounter{subsubsection}
\addcontentsline{toc}{subsubsection}{\protect
\numberline{\thesubsubsection.}#1 #2}\else
\addcontentsline{toc}{subsubsection}{#1 #2}\fi
\subsubsectionmark{#1 #2}
\noindent
\centerline{\em \thesubsubsection. \ #1} \vskip -0.08in
\centerline{\em #2}
\vskip -0.27in
\indent
}
%==============================================================
% END Section and subsection Customization
%==============================================================
使用我必须使用的 thesis.sty 格式时,章节标题应如下所示:
我还提供了一些额外的细节,以防万一它能提供任何解决这个问题的线索。非常奇怪的是,这个 thesis.sty 的设计方式是,我们应该在节标签后添加一个空白行,否则会导致标题和下一段之间的间距出现问题。
\section{section header}
<leave a blank line>
Start Paragraph from here.
但是,我并不介意在节标签后添加一个空行。这只是一个小麻烦,我稍后会研究。现在我真的不知道如何修复这些孤立的节标题。我查看了这里很多关于同一问题的帖子,但这些解决方案对我都不起作用。如果我需要提供任何其他信息来帮助解决这个问题,请告诉我。非常感谢!