如何使页码显示在所有页面上

如何使页码显示在所有页面上

在我的 latex 文档中,只有简介和第一章的第一页有页码,但后面的页面直到下一章都没有页码。如何让所有页面都编号?

这些是我的包裹:

\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}

请查看我所做的更改。并重新考虑是否使用了 Lenny:我见过的最丑陋的章节标题样式之一。我尝试修复最明显的错误,至少使用与文档相同的字体。

请注意\rm\bf已被弃用约 30 年。

您可能想要修复页面设置,但使用geometry并且绝对不要触摸\hoffset\voffset

顺便说一句,$\textit{time scale}$这绝对是错误的。

在此处输入图片描述

相关内容