TeX - LaTeX Asked on May 17, 2021
I want to use URW Grotesk in the header. The format I want is:
RE chapter name LE page number, LO section name, RO page number.
I have modified the example given in fancyhdr
documentation to change the font to required one. I have managed to get the section and chapter name in the required font, but am unable to change the font for thepage
and it defaults to main font of the document. How can one change the page number font as well?
MWE
documentclass{book}
usepackage{fancyhdr}
renewcommand{chaptermark}[1]%
{markboth{{fontfamily{ugq}selectfont #1}}{}}
renewcommand{sectionmark}[1]%
{markright{{fontfamily{ugq}selectfont #1}}}
renewcommand{headrulewidth}{0pt}
renewcommand{footrulewidth}{0pt}
newcommand{grotsq}{%
fontfamily{ugq}footnotesizeselectfont}
fancyhf{}
fancyhead[LE,RO]{grotsq thepage} % this seems to have no effect
fancyhead[LO]{grotsq rightmark}
fancyhead[RE]{grotsq leftmark}
usepackage{lipsum}
begin{document}
chapter{The Start}
section{alpha}
lipsum
lipsum
lipsum
section{beta}
lipsum
lipsum
end{document}
You're missing pagestyle{fancy}
. Without that, you get the page style headings
which ignores the definitions from the fancyhdr
package.
(You're getting the URW Grotesk for the chapter title because you added the fontfamily...selectfont
command to the markboth
command which you probably don't want to do).
Correct answer by Don Hosek on May 17, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP