\usepackage{fancyhdr}
\begin{document}
%封面用大写罗马数字标示页码
\pagenumbering{Roman}
\setcounter{page}{1}
\input{coversheet/coversheet}
\newpage
%各种目录用小写罗马数字标示页码
\pagenumbering{roman}
%插入目录
\tableofcontents
\newpage
%正文部分使用fancy主题
\pagestyle{fancy}
%清空页眉
\fancyhead{}
%页眉中间为空
\fancyhead[CO]{}
%页眉右边为页码
\fancyhead[RO]{\thepage}
%清空页脚
\fancyfoot{}
\fancyfoot[LO]{}
\fancyfoot[RO]{}
\fancyfoot[CO]{}
%奇数页偶数页处理
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ #1}}
\newcommand{\mymarks}{
\ifthenelse{\equal{\leftmark}{\rightmark}}
{\leftmark} % if equal
{\rightmark}} % if not equal
%左上角为文章当前二级标题
\fancyhead[LO]{\slshape \mymarks}
%正文部分用普通阿拉伯数字标记
\pagenumbering{arabic}
\setcounter{page}{1}
.....正文部分
\end{document}
我常用的版式
LaTeX文档结构
最新推荐文章于 2025-09-03 10:54:19 发布
本文介绍了一个详细的LaTeX文档结构设置示例,包括不同部分页码的不同格式化方式、页眉和页脚的设计以及如何插入封面和目录等内容。通过此结构可以实现专业级别的文档排版。
1347

被折叠的 条评论
为什么被折叠?



