我正在尝试将页码放在页面底部。文档是\documentclass[a4paper, 12pt]{book}
我能够\fancyfoot{\thepage}
只用几页(每章的第一页)来完成。我怎样才能用所有页面来完成?
梅威瑟:
\documentclass[a4paper, 12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{indentfirst}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{latexsym}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{xcolor}
\usepackage[hidelinks]{hyperref}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{quoting}
\usepackage{fancyvrb}
\usepackage{alltt}
\usepackage{lineno}
\usepackage{lipsum}
\usepackage{float}
\fancyfoot{\thepage}
\usepackage{mathpazo}
\renewcommand{\baselinestretch}{1.25}
\theoremstyle{plain}
\newtheorem{thm}{Teorema}[chapter]
\newtheorem{cor}[thm]{Corollario}
\newtheorem{prop}[thm]{Proposizione}
\newtheorem{oss}[thm]{Osservazione}
\theoremstyle{definition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{es}{Esempio}[chapter]
\newtheorem{oss}{Osservazione}[chapter]
\theoremstyle{definition}
\newtheorem{defn}{Definizione}[chapter]
\usepackage{geometry}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\grd}{\nabla}
\newcommand\dvg{\operatorname{div}}
\newcommand{\rot}{\operatorname{rot}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\esssup}{\operatornamewithlimits{ess\,sup}}
\newcommand{\essinf}{\operatornamewithlimits{ess\,inf}}
\newcommand{\eps}{\varepsilon}
\newcommand{\lam}{\lambda}
\renewcommand{\th}{\vartheta}
\newcommand{\Om}{\varOmega}
\renewcommand{\Gamma}{\varGamma}
\newcommand{\om}{\omega}
答案1
包裹花式高清更适合标题定制。
但是您可以使用\pagestyle{fancy}
来激活fancyhdr提供的页面样式。
以下是 MWE:
\documentclass[a4paper, 12pt]{book}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{fancy}
\begin{document}
The package \emph{fancyhdr} is more suited for header customization.
But you can use pagestyle{fancy} to activate the page style provided by \emph{fancyhdr}.
\end{document}