排版后,我的文档中的页码会从右对齐变为居中对齐。如何确保页码对齐方式明确且一致?
\documentclass[a4paper,12pt, oneside, final]{book}
\usepackage[UKenglish]{babel}% http://ctan.org/pkg/babel
\usepackage[UKenglish]{isodate}% http://ctan.org/pkg/isodate
%Original date format: \today \par
\cleanlookdateon% Remove ordinal day reference
%Modified date format: \today
%\usepackage[utf8]{inputenc}
\usepackage{microtype}
%\usepackage{graphicx}
\usepackage{picinpar,graphicx}
\usepackage{titlesec}
%\usepackage{secdot}
\usepackage{blindtext}
\usepackage{titlesec}
%\titlelabel{\thetitle.\quad}
\usepackage{floatflt}
\usepackage[inner=2.5cm, outer=2.5cm, top=2.5cm, bottom=2.5cm, bindingoffset=1cm]{geometry}
%\usepackage[english]{babel}
\usepackage[translate=babel]{glossaries}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{fancyhdr}
\usepackage{fncychap}
\usepackage{paralist}
%\ChTitleUpperCase
\ChNameUpperCase
\ChNameVar{\centering\Huge\rm\bfseries}
\ChNumVar{\Huge}
\ChTitleVar{\centering\Huge\rm\bfseries}
\renewcommand{\cfttabfont}{Table }
\renewcommand{\cftfigfont}{Figure }
%usepackage{tocloft}
%\centering\Huge\rm\bfseries
%\usepackage{xcolor}
%\usepackage{color}\
%\usepackage{appendix}
%\autoref{app:...}
%\addtocontents{toc}{\cftpagenumberson{chapter}}
%\addtocontents{toc}{\cftpagenumberson}
%See MikTeX and Advanced LaTeX.pdf
%microtype is used for justification of paragraphs
%\usepackage{parskip}
%\usepackage[doublespacing]{setspace}
\setcounter{tocdepth}{5}
%\usepackage{parskip}
\usepackage[doublespacing]{setspace}
\usepackage{hyperref}
\usepackage{glossaries}
\usepackage{tocloft}
\renewcommand\cftchapaftersnum{.}% adds dot after chapter title in ToC
\renewcommand\cftchapdotsep{\cftdotsep}% adds leader dots from chapter titles to page numbers
\usepackage{etoolbox}
\makeatletter
% scale dots
\newcommand\mydot[1]{\scalebox{#1}{.}}
\patchcmd{\@dottedtocline}
{\hbox{.}}
{\hbox{\mydot{2}}}
{}
{}
% change separation between dots
\renewcommand\@dotsep{10} %default: 4.5
\makeatother
\fancyhf{}
\fancyhead[LE]{\leftmark}
\fancyhead[RO]{\nouppercase{\rightmark}}
\fancyfoot[LE,RO]{\thepage}
\pagestyle{fancy}
\newcommand{\HRule}{\rule{\linewidth}{0.2mm}}
%\usepackage{tocloft}
%\setlength\cftparskip{-2pt}
%\setlength\cftbeforesecskip{1pt}
%\setlength\cftaftertoctitleskip{1pt}
\usepackage[titles]{tocloft}
\setlength{\cftbeforechapskip}{.1ex}
\setlength{\cftbeforesecskip}{-.5ex}
\usepackage{lipsum} % placeholder text
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=pl,up]{caption}
答案1
改变线路
\fancyfoot[LE,RO]{\thepage}
到
\fancyfoot[C]{\thepage}