Latex 如何在报告课上只针对主要问题进行标题?

Latex 如何在报告课上只针对主要问题进行标题?,latex,Latex,我正在用乳胶写论文,文档类:报告。我已经收到了包括摘要、确认等在内的文件 我只想把标题添加到我的主要内容中,从我的第一章开始:引言。我希望标题是章节号,旁边没有“章节”和章节标题。我还希望页码出现在主要内容所有页面底部的中间位置 我不想在头版的任何一页上出现任何标题或行 你能指引我吗?谢谢 这里是我正在应用的示例代码 \documentclass[a4paper,12pt,titlepage]{report} \usepackage{amsfonts} \usepackage[english]

我正在用乳胶写论文,文档类:报告。我已经收到了包括摘要、确认等在内的文件

我只想把标题添加到我的主要内容中,从我的第一章开始:引言。我希望标题是章节号,旁边没有“章节”和章节标题。我还希望页码出现在主要内容所有页面底部的中间位置

我不想在头版的任何一页上出现任何标题或行

你能指引我吗?谢谢

这里是我正在应用的示例代码

\documentclass[a4paper,12pt,titlepage]{report}

\usepackage{amsfonts}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{color}
\usepackage{colordvi}
\usepackage{amssymb}
\usepackage{natbib}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{theorem}
\usepackage{lineno}
\usepackage{multirow}
\usepackage [toc,page]{appendix}
\usepackage{framed}
\usepackage{setspace}
\doublespacing
\usepackage[left=1.5in,top=2in,right=1in,bottom=2in]{geometry}

\begin{document}

\title{xxx}
\author{xxx} 
\date{xxx}
\maketitle
\thispagestyle{empty}

\renewcommand{\thepage}{\roman{page}}

% here it comes my front matter for example:

\clearpage
\addcontentsline{toc}{chapter}{Abstract}
\chapter*{Abstract}
ABSTRACT CONTENTS

%then:
\clearpage
\cleardoublepage
\pagenumbering{arabic}

% here it starts my main matter:
\chapter{Introduction} %first chapter
\chapter{First Esssay in XXX}  %second chapter

\end{document}

您有许多选项可以设置文档中的标题。最常用的软件包是

首先,您需要从常规章节标记中删除单词Chapter。为此,添加

\usepackage{etoolbox}
\makeatletter
%\newcommand{\updatechaptermark}{%
\appto\ps@fancy{%
  \patchcmd{\chaptermark}% <cmd>
    {\@chapapp\ }{}% <search><replace>
    {}{}% <success><failure>
}%}
\makeatother
上面将标题设置为\leftmark,其中包含\chaptermark设置,因为\chaptermark实际上向\markeath{}{}发出了一个空值

请注意,默认情况下使用普通样式设置\章节。如果希望这有所不同,则必须重新定义普通页面样式


您可以使用不同的页眉/页脚包实现相同的输出,如。

非常感谢Werner。那太好了!
\usepackage{fancyhdr}
\fancyhf{}% Clear header/footer
\fancyhead[C]{\leftmark}% Chapter mark
\fancyfoot[C]{\thepage}% Footer contains the page number
\renewcommand{\headrulewidth}{.4pt}% Header rule width
\documentclass{report} 
\usepackage{fancyhdr,lipsum}

\usepackage{etoolbox}
\makeatletter
%\newcommand{\updatechaptermark}{%
\appto\ps@fancy{%
  \patchcmd{\chaptermark}% <cmd>
    {\@chapapp\ }{}% <search><replace>
    {}{}% <success><failure>
}%}
\makeatother

\fancyhf{}% Clear header/footer
\fancyhead[C]{\leftmark}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{.4pt}

\begin{document}

%\frontmatter
\pagenumbering{roman}

\title{xxx}
\author{xxx} 
\date{xxx}
\maketitle
\thispagestyle{empty}


% here it comes my front matter for example:
\cleardoublepage
\tableofcontents

\cleardoublepage
\addcontentsline{toc}{chapter}{Abstract}%
\chapter*{Abstract} \lipsum[1]

\cleardoublepage
\pagenumbering{arabic}

\pagestyle{fancy}
\chapter{Introduction} \lipsum[1-50] % first chapter
\chapter{Methodology}  \lipsum[1-50] % second chapter
\chapter{Conclusion}   \lipsum[1-50] % last chapter

\end{document}