怎么改目录第一页页眉页脚的设置和目录其他页保持一致,但是不改变其他章节的页眉页脚设置风格

发布于 2022-02-06 21:24:37

1.png

\documentclass{book}
\usepackage{geometry}
\geometry{a4paper,left=2cm,right=2cm,top=2.5cm,bottom=2.5cm}   %landscape页面横制,twocolumn双栏
\usepackage{ctex}
\newcommand{\xingkai}{\CJKfontspec{华文行楷}}
\usepackage{xcolor}

\usepackage{lastpage}
\usepackage{fancyhdr}
\fancypagestyle{preContent}{
    \fancyhead{}
    \renewcommand\headrulewidth{0pt}
    \fancyfoot[C]{\thepage}
}

\fancypagestyle{zhengwen}{
    \fancyhead{}
    \renewcommand\headrulewidth{0pt}
    \fancyfoot[c]{第~\thepage~页~~}
}

\fancypagestyle{plain}{
    \fancyhf{}
    \fancyfoot[C]{第~\thepage~页}
    \renewcommand{\headrulewidth}{0pt}
}

\begin{document}
    
\pagestyle{preContent}    
\frontmatter
\tableofcontents
\mainmatter

\pagestyle{zhengwen}    
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\chapter{你好}
\section{你好啊}
\section{你好啊}
\section{你好啊}
\section{你好啊}

查看更多

关注者
0
被浏览
892
行者
行者 2022-02-06
这家伙很懒,什么也没写!
\usepackage{ctex}

\usepackage{fancyhdr}
\fancypagestyle{preContent}{
  \fancyhead{}
  \renewcommand\headrulewidth{0pt}
  \fancyfoot[C]{\thepage}
}

\fancypagestyle{zhengwen}{
  \fancyhead{}
  \renewcommand\headrulewidth{0pt}
  \fancyfoot[c]{第~\thepage~页~~}
}

\begin{document}
  \frontmatter
  \fancypagestyle{plain}{
  \fancyhf{}
  \fancyfoot[C]{\thepage}
  \renewcommand{\headrulewidth}{0pt}
  }
  \pagestyle{preContent}
  \tableofcontents
  \mainmatter
  
  \fancypagestyle{plain}{
    \fancyhf{}
    \fancyfoot[C]{第~\thepage~页}
    \renewcommand{\headrulewidth}{0pt}
  }
  \pagestyle{zhengwen}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \chapter{你好}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
  \section{你好啊}
\end{document}```
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览