fancyhdr
package to modify the header and footer of several KOMA-script classes (scrbook
, scrartcl
, scrreprt
). Everything compiles fine and the output is really nice. I'm only getting a single warning in the console (shown below).However, I know it's not recommended to use
fancyhdr
with a KOMA class document since the KOMA classes already have built-in features to modify the header and footer. So I have two questions :1. What are the wrong things that could happen or what should I expect if I still use the
fancyhdr
package with a KOMA class document ?2. What should be the proper code to replace the
fancyhdr
code shown below, if I really have to scrap that package ?Code: Select all
\RequirePackage[l2tabu,orthodox]{nag}\documentclass[11pt,twoside]{scrartcl}\usepackage[T1]{fontenc}\usepackage{lmodern}\usepackage[left=1in,right=1in,top=0.5in,bottom=0.5in,includehead,includefoot]{geometry}%%%% How to replace the following for a KOMA class document?\usepackage[page]{totalcount}\usepackage{fancyhdr}\fancyhf{}\pagestyle{fancy}\fancyhead[LE,RO]{Fun with \LaTeX}\fancyhead[CE,CO]{\textsf{\textbf{Bold text on top}}}\fancyhead[RE,LO]{\textsl{Text in corner}}\fancyfoot[CE,CO]{\textsc{SmallCaps text at bottom}}\fancyfoot[LE,RO]{page \thepage~of \totalpages}\fancyfoot[RE,LO]{Useless text at bottom}\setlength{\headheight}{14pt}\renewcommand{\headrulewidth}{0.4pt}\renewcommand{\footrulewidth}{0.0pt}%%%%\begin{document}\title{Title}\author{Isaac Newton}\date{}\maketitle\tableofcontents\section{Introduction} Some introduction text for fun.\newpage\section{A title} Some lazy text.\newpage\section{Another title} Some annoying text.\newpage\section*{Thank you} Thanks all!\newpage\begin{thebibliography}{999}\bibitem{bibitem1}\uppercase{Some one}, \par \textit{Title}, \par Found.\ Phys.\ \textbf{47}, no. 6, 797 (2000).\bibitem{bibitem2}\uppercase{Some guy}, \par \textit{Title}, \par Phys.\ Rev.\ D \textbf{65}, 103522 (2017).\end{thebibliography}
So how should I replace theClass scrartcl Warning: Usage of package `fancyhdr' together
(scrartcl) with a KOMA-Script class is not recommended.
(scrartcl) I'd suggest to use
(scrartcl) package `scrlayer-scrpage'.
(scrartcl) Nevertheless, using requested
(scrartcl) package `fancyhdr' on input line 9.
fancyhdr
code ?