|
92 | 92 | \usepackage{xcolor} |
93 | 93 | \usepackage{graphicx} |
94 | 94 | \usepackage{eso-pic} |
| 95 | +\usepackage{indentfirst} |
95 | 96 | \usepackage{hyperref} |
| 97 | +\usepackage{fancyhdr} |
| 98 | +\pagestyle{fancy} |
96 | 99 |
|
97 | 100 | \hypersetup{ |
98 | 101 | bookmarksnumbered=true, |
99 | 102 | bookmarksopen=true, |
100 | 103 | bookmarksopenlevel=2 |
101 | 104 | } |
102 | 105 |
|
| 106 | +\makeatletter % 自定义页眉与页脚 |
| 107 | +% 章标题更新 \leftmark 节标题更新 \rightmark |
| 108 | +% \renewcommand{\chaptermark}[1]{\markboth{#1}{}} |
| 109 | +% \renewcommand{\sectionmark}[1]{\markright{#1}} |
| 110 | +
|
| 111 | +\renewcommand{\chaptermark}[1]{% |
| 112 | + \markboth{第\thechapter\ 章\ #1}{} |
| 113 | +} |
| 114 | +\renewcommand{\sectionmark}[1]{% |
| 115 | + \markright{\thesection\ #1}{} |
| 116 | +} |
| 117 | +
|
| 118 | +% 自定义 normal 样式:用于文档的普通页面 |
| 119 | +\fancypagestyle{normal}{ |
| 120 | + \fancyhf{} % 清除所有默认的页眉页脚设置 |
| 121 | + \fancyhead[L]{\nouppercase{\leftmark}} % 左侧页眉内容 |
| 122 | + \fancyhead[C]{\textbf{\@title}} % 中间页眉内容 |
| 123 | + \fancyhead[R]{\nouppercase{\rightmark}} % 右侧页眉内容 |
| 124 | + % \fancyfoot[L]{} % 左侧页脚内容 |
| 125 | + \fancyfoot[C]{\textbf{\thepage}} % 中间页脚内容 |
| 126 | + % \fancyfoot[R]{} % 右侧页脚内容 |
| 127 | + \renewcommand{\headrulewidth}{0.4pt} % 设置页眉线的宽度 |
| 128 | + \renewcommand{\footrulewidth}{0.4pt} % 设置页脚线的宽度 |
| 129 | +} |
| 130 | +
|
| 131 | +% 自定义 plain 样式:用于章节的首页(默认不显示页眉,只显示页脚) |
| 132 | +\fancypagestyle{plain}{ |
| 133 | + \fancyhf{} % 清除所有默认设置 |
| 134 | + \fancyfoot[C]{\textbf{\thepage}} % 章节首页通常只显示页码 |
| 135 | + \renewcommand{\headrulewidth}{0pt} % 章节首页通常不显示页眉线 |
| 136 | + \renewcommand{\footrulewidth}{0.4pt} % 章节首页通常不显示页脚线 |
| 137 | +} |
| 138 | +\makeatother |
| 139 | +
|
103 | 140 | \definecolor{ChapterColorScheme}{RGB}{24, 112, 125} |
104 | 141 | \definecolor{SectionColorScheme}{RGB}{98, 137, 196} |
105 | 142 | \definecolor{SubsectionColorScheme}{RGB}{88, 161, 174} |
106 | 143 |
|
107 | | -\setlength{\parindent}{2em} |
108 | | -\usepackage{indentfirst} |
109 | | -
|
110 | 144 | \ctexset{ |
111 | 145 | contentsname = {目录}, |
112 | 146 | part = { |
|
141 | 175 | } |
142 | 176 | } |
143 | 177 |
|
| 178 | +\setlength{\parindent}{2em} % 首行缩进 |
| 179 | +
|
144 | 180 | \makeatletter |
145 | 181 | \renewcommand{\@pnumwidth}{2.5em} |
146 | 182 | \renewcommand{\@tocrmarg}{3.5em} |
|
0 commit comments