pdf 文件中未显示页数

pdf 文件中未显示页数

我的问题是 pdf 文件中没有显示页数。我使用了 winEdt 10。我使用了以下论文 LATEX 模板

\documentclass[12pt,b5paper,openright]{report}
%\usepackage{hyperref}
\usepackage{epsfig}
\usepackage{color}
\usepackage{latexsym}
\usepackage{graphicx}
%\usepackage{subfigure}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{amssymb,amsmath}
\usepackage{lscape}
\usepackage{amsthm}
\usepackage[mathscr]{eucal}

%\usepackage{subfigure}
%\usepackage{array}
\usepackage{fancyhdr}
%\usepackage{setspace}  %%\singlespacing   \doublespacing   \onehalfspacing
\usepackage[left=1.5cm, right=1.5cm, top=3cm, bottom=1.5cm, includefoot, headheight=11pt]{geometry}
\pagestyle{plain}
\includeonly{All/title,All/Aproval,All/Acknowledgements,All/Summary,All/ch1,All/ch2,All/ch3,All/ch4,All/ch5,All/ch6,All/References}
\usepackage[compact]{titlesec} %% TO put space after and before sections or subsections
\titlespacing{\section}{0pt}{+8mm}{+5mm}
\titlespacing{\subsection}{0pt}{+6mm}{+4mm}
\titlespacing{\subsubsection}{0pt}{+6mm}{+4mm}
\parindent=5mm
\newcommand{\h }{\hspace*{18pt}}
\newcommand{\G}{\mathscr{G}}

\begin{document}
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
\include{All/title}
%+++++++++++++++++++++++++++++++++++++++++++++++++
\include{All/Aproval}
%+++++++++++++++++++++++++++++++++++++++++++++++++
\include{All/Acknowledgements}
%+++++++++++++++++++++++++++++++++++++++++++++++++


\pagenumbering{roman}
\setcounter{page}{1}
\pagestyle{fancyplain}

%+++++++++++++++++++++++++++++++++++++++++++++++++

\fancyhead[RE,LO]{}
\fancyfoot[CE,CO]{\thepage}
\pagestyle{fancyplain}
%\addcontentsline{toc}{chapter}{Contents}

\tableofcontents

\include{All/Summary}
\include{All/ch1}
\include{All/ch2}
\include{All/ch3}
\include{All/ch4}
\include{All/ch5}
\include{All/ch6}
\include{All/References}
\end{document}

答案1

您设置不正确fancyhdr

编译时您应该注意到这些警告:

Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use on input line xx.
Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line xx.

换句话说,您twoside在加载report类时没有使用该选项。因此设置偶数和奇数页的页眉和页脚是没有意义的。

你可能想要这样的东西:

\fancyhead{}
\fancyfoot[C]{\thepage}

代替

\fancyhead[RE,LO]{}
\fancyfoot[CE,CO]{\thepage}

相关内容