自定义页眉页脚后,目录页只想要自定义的页眉,不想要页脚。

2020-12-31 14:18发布

使用fancy自定义了页眉页脚格式,编译出来结果后目录页出现页眉页脚。 最终想实现正文中页眉是 内蒙古工业大学PLC综合训练报告 页脚是 页码 。目录页只有页眉 内蒙古工业大学PLC综合训练报告...

使用fancy自定义了页眉页脚格式,编译出来结果后目录页出现页眉页脚。 最终想实现正文中页眉是 ”内蒙古工业大学PLC综合训练报告“ 页脚是 页码 。目录页只有页眉 “内蒙古工业大学PLC综合训练报告”。 ```markdown \documentclass{ctexart} \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{内蒙古工业大学PLC综合训练报告}  \rhead{} \cfoot{\thepage} \lfoot{} \rfoot{} \begin{document}  \tableofcontents \newpage \section{绪论} \setcounter{page}{1} \end{document} ```
3条回答
sikouhjw
2020-12-31 15:00 .采纳回答
- 你需要的是 `book` 的 `\frontmatter` 和 `\mainmatter` 而不是设置页码; - 你要确定,你要的是「只有目录」如此还是「带 `\chapter` 的都如此」,「目录」二字是用 `\chapter*` 生成的。 ```tex \documentclass{ctexbook} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \chead{内蒙古工业大学PLC综合训练报告} \cfoot{\thepage} \fancypagestyle{plain}{% \fancyhf{} \chead{内蒙古工业大学PLC综合训练报告} } \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{test} \section{test} \end{document} ```

一周热门 更多>

相关问答