从目录中删除部分,但保留其自己的页眉

从目录中删除部分,但保留其自己的页眉

这是我第一次向 StackExchange 提交问题,所以请耐心等待。

我有一篇论文使用了该类scrartclclassicthesis包。我希望我的摘要有自己的页面,右上角有自己的页眉,页码旁边写着“摘要”,就像其他每个部分一样。但是,我既不希望摘要有章节编号,也不想让它出现在我的目录中。我多次搜索这个特定问题的答案,虽然我可以找到方法将其从目录中删除,或删除其章节编号,或将其放在自己的页面上并带有自己的页眉,但我找不到同时完成这三项操作的方法。摘要后面的部分,即简介,也很重要,它是第一部分,章节编号为 1。

在下面的代码中,请注意输出显示页眉为摘要所在页面的“目录”,而我希望它显示“摘要”,而不给摘要提供章节编号或目录中的位置。

\documentclass[
    headinclude,footinclude, % Extra spacing for the header and footer
    ]{scrartcl}

\usepackage[
nochapters, % Turn off chapters since this is an article        
]{classicthesis} % The layout is based on the Classic Thesis style

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template

\title{Title} % The article title

\begin{document}
\maketitle % Print the title/author/date block
\tableofcontents % Print the table of contents
\newpage
\section*{Abstract} % starred section doesn't get the correct header
%\section{Abstract} % unstarred section gets the correct header

\lipsum[1]

\end{document}

答案1

您可以使用

\section*{Abstract} % starred section doesn't get the correct header
\markright{\spacedlowsmallcaps{Abstract}}% set the header

在此处输入图片描述

代码:

\documentclass[
    headinclude,footinclude, % Extra spacing for the header and footer
    ]{scrartcl}
\usepackage[
nochapters, % Turn off chapters since this is an article        
]{classicthesis} % The layout is based on the Classic Thesis style
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\title{Title} % The article title
\begin{document}
\maketitle % Print the title/author/date block
\tableofcontents % Print the table of contents
\newpage
\section*{Abstract} % starred section doesn't get the correct header
\markright{\spacedlowsmallcaps{Abstract}}% set the header
\lipsum[1]
\end{document}

请注意,这classicthesis会破坏许多 KOMA-Script 功能。如果没有,classicthesis我会使用 class 选项headings=optiontoheadandtoc,然后\addsec[tocentry={}]{Abstract}

\documentclass[
    headinclude,footinclude,
    headings=optiontoheadandtoc
    ]{scrartcl}
\usepackage{lipsum}
\title{Title}
\pagestyle{headings}% set the page style
\begin{document}
\maketitle
\tableofcontents
\newpage
\addsec[tocentry={}]{Abstract}
\lipsum[1]
\end{document}

相关内容