我希望我的页眉和页脚具有\normalfont\bfseries\sffamily
字体样式
\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{Overleaf}
\fancyhead[RE,LO]{Guides and tutorials}
\fancyfoot[CE,CO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
\begin{document}
\chapter{Using different page styles}
Lorem ipsum dolor sit amet, consectetur adipiscing ...
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore
\pagebreak
This details the set of real numbers and its subsets such as natural numbers, integers, rational numbers, constructible numbers, algebraic numbers and irrational numbers. Students or learners should be in a position to define all proper subsets of real numbers and should be in a position to tell the proper inclusion. Further, students should master the axioms obeyed by natural numbers, integers, rational numbers and real numbers. Such axioms or laws form a constitution which learners will then apply to justify results just like in court of laws. Using the axioms or the given constitution of real numbers or its subsets, learners should follow logic and use them to establish propositions, lemmas and theorems. Thus rigorous proofs of results emanates from such axiom. Understand the concept of real numbers as a complete ordered field. Define such terms as a lower bound, an upper bound, minimum value, maximum value, infimum and supremum of a given set of real numbers. These are the key in the establishment of results in all the remaining chapters for this course. From the aforementioned definitions be in a position to state and prove the characterization of infimum and supremum. Extend real numbers to the concept of countability of sets. Here you should be in a position to apply Cantor's diagonal method for the case of rational numbers.
et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit es...
\end{document}
答案1
文档只是将字体规范放在/fancyhdr
的参数中。下面这样做,但将字体声明存储在用户定义的宏中,因此您只需在一个地方更改它。\fancyhead
\fancyfoot
\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\newcommand*\myheaderfooterfont{\normalfont\bfseries\sffamily}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\myheaderfooterfont Overleaf}
\fancyhead[RE,LO]{\myheaderfooterfont Guides and tutorials}
\fancyfoot[CE,CO]{\myheaderfooterfont \leftmark}
\fancyfoot[LE,RO]{\myheaderfooterfont \thepage}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
\begin{document}
\chapter{Using different page styles}
Lorem ipsum dolor sit amet, consectetur adipiscing ...
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore
\pagebreak
This details the set of real numbers and its subsets such as natural numbers, integers, rational numbers, constructible numbers, algebraic numbers and irrational numbers. Students or learners should be in a position to define all proper subsets of real numbers and should be in a position to tell the proper inclusion. Further, students should master the axioms obeyed by natural numbers, integers, rational numbers and real numbers. Such axioms or laws form a constitution which learners will then apply to justify results just like in court of laws. Using the axioms or the given constitution of real numbers or its subsets, learners should follow logic and use them to establish propositions, lemmas and theorems. Thus rigorous proofs of results emanates from such axiom. Understand the concept of real numbers as a complete ordered field. Define such terms as a lower bound, an upper bound, minimum value, maximum value, infimum and supremum of a given set of real numbers. These are the key in the establishment of results in all the remaining chapters for this course. From the aforementioned definitions be in a position to state and prove the characterization of infimum and supremum. Extend real numbers to the concept of countability of sets. Here you should be in a position to apply Cantor's diagonal method for the case of rational numbers.
et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit es...
\end{document}