页面样式适用于参考书目第一页

页面样式适用于参考书目第一页

我在仅将参考书目第一页的页码居中时遇到问题。以下是我的代码:

\documentclass[12pt,a4paper,twoside]{report} % "openright" starts each chapter on an odd-page, remove if not needed
\usepackage[top=2.54 cm, bottom=2.54 cm, left=2.54 cm, right=2.54 cm]{geometry}

\usepackage{fancyhdr}
\usepackage{apacite}
\usepackage[hidelinks]{hyperref} % put before apacite

% define two styles : prelim and main
\fancypagestyle{prelim}{
\fancyhf{} %clear all headers and footers fields
\cfoot{\thepage} %prints the page number on the center side of the footer
\renewcommand{\headrulewidth}{0pt}
}

\fancypagestyle{main}{
\fancyhf{} %clear all headers and footers fields
\chead{\thepage} %prints the page number on the center side of the header
\renewcommand{\headrulewidth}{0pt}
}

\fancypagestyle{plain}{\pagestyle{prelim}}

    \begin{document}
% apply prelim styles for table of contentsl

\pagestyle{prelim} % roman page number from this page
\pagenumbering{roman} % roman page number from this page
\thispagestyle{empty} % no roman page number on this page

\tableofcontents
\cleardoublepage
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables % if necessary
\clearpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures % if necessary
\newpage

% apply main style for chapter and reference
\pagestyle{main} 
\pagenumbering{arabic}
        \include{chp1}
        \newpage

        \bibliographystyle{apacite}
            \bibliography{mybib} % this is mybib 

    \end{document}

% chp1.txt 是

\chapter{Introduction}
\thispagestyle{main}
  Text for Introduction.

答案1

添加\def\thispagestyle#1{}解决问题

\newpage
\def\thispagestyle#1{} % add this 
        \bibliographystyle{apacite}
            \bibliography{mybib} % this is mybib 

相关内容