I would like to get a better understanding, why using fancyhdr
is not recommended using scrartcl
. So far I haven't had any problems using them together but the output is always complaining that I shouldn't use fancyhdr
with scrartcl
. Instead I should use scrlayer-scrpage
. Can somebody please explain the reason why I shouldn't use fancyhdr
?
\documentclass[a4paper,pagesize ,landscape, fontsize=6pt]{scrartcl}
\usepackage[left=0.75cm,right=0.75cm, top=1cm, bottom=0.75cm]{geometry}
\usepackage{multicol}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{fancyhdr}
%\usepackage{scrlayer-scrpage}
\setlength{\columnsep}{25pt}
\setlength{\columnseprule}{0.4pt}
\pagestyle{fancy}
\fancyhf{}
\rhead{Name}
\chead{Page \thepage}
\lhead{Title description}
\begin{document}
\begin{multicols*}{3}
Some entries here
\columnbreak
and some entries there
\columnbreak
and the list goes on
\end{multicols*}
\end{document}
Best Answer
You can only use one of the packages
scrlayer-scrpage
,scrpage2
(predecessor ofscrlayer-scrpage
),fancyhdr
, ...The recommended package for use with a KOMA-Script class is
scrlayer-scrpage
because it is part of the KOMA-Script bundle and you can set and change options in the same way as for the class, see the KOMA-Script documentation. I really suggest to usescrlayer-scrpage
.Your header with
scrlayer-scrpage
:But using
fancyhdr
is also possible if really want to use this package:Note that with
fancyhdr
a small number of options regarding page header and footer will not work. An example is the KOMA optionfootsepline
.So if you really want to use
fancyhdr
and there is only the warning that the usage offancyhdr
together with a KOMA-Script class is not recommended you can ignore it.But do not ignore any additional warning regarding the old font commands like
\rm
,\sl
. Note thatfancyhdr
uses this commands in its default header and footer definitions.Starting with the current prerelease of the next KOMA-Script Version (3.20) KOMA Script does not define this old commands. So
will result in errors. You can avoid the errors if you either use
\fancyhf{}
and define your own header and footer using\fancyhead
and\fancyfoot
without the usage of old font commands or you use a compatibility option.