如何讓頁碼出現在所有頁面上

如何讓頁碼出現在所有頁面上

在我的乳膠文件中,只有引言和第一章的第一頁有頁碼,但接下來的頁面直到我到達下一章才編號。如何對所有頁面進行編號?

這些是我的包裹:

\documentclass[english, 12pt]{report}
\usepackage{color}
\usepackage{lettrine}
\usepackage[normalem]{ulem}
\usepackage{fancybox}
\usepackage[Lenny]{fncychap}%form
\usepackage{fancyhdr}
\usepackage[]{graphics}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{epsfig}
\usepackage{enumitem}
\usepackage{url}
\usepackage[skins]{tcolorbox}
\usepackage{silence}

\WarningFilter{minitoc(hints)}{W0023}
\WarningFilter{minitoc(hints)}{W0024}
\WarningFilter{minitoc(hints)}{W0028}
\WarningFilter{minitoc(hints)}{W0030}

\WarningFilter{blindtext}{} % this takes care of the `blindtext` messages

\usepackage[math,bible]{blindtext}
\usepackage{minitoc}
\usepackage{float} 
 \usepackage[pdfencoding = auto, psdextra, bookmarksdepth = 4]{hyperref}
\usepackage[noabbrev]{cleveref}
\usepackage{lmodern}
\usepackage[all]{xy}
\textwidth=16.5truecm \textheight=22.75truecm \voffset=-1truecm
\hoffset=-1 truecm 
\linespread{1.6}

\newtheorem{lem}{Lemma}[section]
\newtheorem{notations}{Notations}[section]
\newtheorem{notation}{Notation}[section]
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{defn}{Definition}[chapter]
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[chapter]
\newtheorem{cor}{Corollary}[section]

這是第一章的文字:

     \chapter*{\textbf{ Introduction}} 
     \addcontentsline{toc}{chapter}{\numberline{}Introduction}
     \pagenumbering{arabic}%number
      \pagestyle{fancy}
     \fancyhf{}
    \rhead{\thepage}
    \lhead{\bfseries Introduction}
     
 \lettrine{\bf{L}}{ }e mot
 
     \chapter{\rm\textbf{ The Time Scales Calculus}}
     \pagestyle{fancy}
    \fancyhf{}
     \lhead{\bfseries\nouppercase{\rightmark}}
    
    % \lettrine{A}{ }
     \section{Basic Definitions}
     
     We begin this chapter by stating out the basic definitions that will be used in this work.
     \begin{defn}
             A $\textit{time scale}$ is an ....
     \end{defn}

答案1

您應該在序言中設定花式風格。

\RequirePackage{fix-cm}% for scalable CM fonts

\documentclass[english, 12pt]{report}
\usepackage{color}
\usepackage{lettrine}
\usepackage[normalem]{ulem}
\usepackage{fancybox}
\usepackage[Lenny]{fncychap}%form <---- OH, NO!
\usepackage{fancyhdr}
\usepackage{graphicx}% <--- NOT graphics
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{epsfig}% <--- OBSOLETE
\usepackage{enumitem}
\usepackage{url}
\usepackage[skins]{tcolorbox}
\usepackage{silence}

\WarningFilter{minitoc(hints)}{W0023}
\WarningFilter{minitoc(hints)}{W0024}
\WarningFilter{minitoc(hints)}{W0028}
\WarningFilter{minitoc(hints)}{W0030}

\WarningFilter{blindtext}{} % this takes care of the `blindtext` messages

\usepackage[math,bible]{blindtext}
\usepackage{minitoc}
\usepackage{float} 
\usepackage{lmodern}
\usepackage[all]{xy}

\usepackage{geometry}
\usepackage{setspace}

\usepackage[pdfencoding = auto, psdextra, bookmarksdepth = 4]{hyperref}
\usepackage[noabbrev]{cleveref}

% USE geometry INSTEAD
%\textwidth=16.5truecm \textheight=22.75truecm \voffset=-1truecm
%\hoffset=-1 truecm
\geometry{textwidth=16.5cm,textheight=22.75cm,heightrounded,headheight=14.5pt}

% USE setspace INSTEAD
%\linespread{1.6}
\setstretch{1.6}

%% fancyhdr setup
\pagestyle{fancy}
\fancyhf{}
\rhead{\thepage}
\lhead{\bfseries\rightmark}

%% fncychap setup
\ChTitleVar{\Huge\bfseries}
\ChNameVar{\fontsize{14}{0}\selectfont}
\ChNumVar{\fontsize{60}{62}\selectfont} 

\newtheorem{lem}{Lemma}[section]
\newtheorem{notations}{Notations}[section]
\newtheorem{notation}{Notation}[section]
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{defn}{Definition}[chapter]
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[chapter]
\newtheorem{cor}{Corollary}[section]

\begin{document}

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{\numberline{}Introduction}
\markboth{Introduction}{Introduction}

\lettrine{\bfseries L}{}e mot
\blindtext \blindtext \blindtext
 
\chapter{The Time Scales Calculus}

\section{Basic Definitions}
     
We begin this chapter by stating out the basic definitions that will be used in this work.
\begin{defn}
A \emph{time scale} is an ....
\end{defn}

\blindtext \blindtext \blindtext

\end{document}

請看看我所做的更改。並重新考慮是否使用萊尼:我見過的最醜陋的章節標題樣式之一。我嘗試修復最明顯的錯誤,至少使用與文件相同的字體。

請注意,\rm\bf已被棄用約 30 年。

您可能想要修復頁面設置,但使用geometry和 絕對不要碰\hoffset\voffset

順便說一下,$\textit{time scale}$肯定是錯的。

在此輸入影像描述

相關內容