頁碼未列印在最後一頁(附錄之前)

頁碼未列印在最後一頁(附錄之前)

我有一份論文文檔,我使用以下頁碼

\documentclass[11pt,a4paper]{article}

\usepackage{fancyhdr}
\usepackage{setspace}

\lhead{}
\rhead{}
\chead{Very title\\ Very myself}
\cfoot{\thepage}
\begin{document}

\pagestyle{empty}
\newpage
\tableofcontents
\onehalfspace

\newpage
{\setstretch{1.5}

\pagestyle{fancy}
\setcounter{page}{1}
\section{Introduction} 

...

\clearpage
\section{Conclusions and future work}

} % setstretch

\end{document}

結論章的最後一頁沒有列印頁碼。該章之後我有幾個附錄,我也不需要那裡的頁碼,但我需要直到結論章最後一頁的頁碼。

怎麼了?我可以添加什麼來強制在頁面上列印頁碼?

編輯

我添加了描述問題的程式碼 - 最後一頁上沒有頁碼(帶有結論章節)。

答案1

\pagestyle在本機應用程式頁面樣式,所以你應該把它組 for \setstretch,或最好\clearpage在組結束前呼叫。

\documentclass[11pt,a4paper]{article}

\usepackage{fancyhdr}
\usepackage{setspace}

\lhead{}
\rhead{}
\chead{Very title\\ Very myself}
\cfoot{\thepage}
\begin{document}

\pagestyle{empty}
\newpage
\tableofcontents
\onehalfspace

\newpage
\pagestyle{fancy}
{\setstretch{1.5}

\setcounter{page}{1}
\section{Introduction} 

...

\clearpage
\section{Conclusions and future work}

} % setstretch

\end{document}

相關內容