My attempt at replacing fancyhdr with scrlayer-scrpage (#174)

Replace `fancyhdr` with `scrlayer-scrpage`
This commit is contained in:
Khaveesh 2021-02-08 04:03:40 +05:30 committed by GitHub
parent 4e93f2ecc7
commit 4b7c6f41e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -849,19 +849,17 @@ $if(beamer)$
$else$
$if(disable-header-and-footer)$
$else$
\usepackage{fancyhdr}
\usepackage[headsepline,footsepline]{scrlayer-scrpage}
\fancypagestyle{eisvogel-header-footer}{
\fancyhead{}
\fancyfoot{}
\lhead[$if(header-right)$$header-right$$else$$date$$endif$]{$if(header-left)$$header-left$$else$$title$$endif$}
\newpairofpagestyles{eisvogel-header-footer}{
\clearpairofpagestyles
\ihead[$if(header-right)$$header-right$$else$$date$$endif$]{$if(header-left)$$header-left$$else$$title$$endif$}
\chead[$if(header-center)$$header-center$$else$$endif$]{$if(header-center)$$header-center$$else$$endif$}
\rhead[$if(header-left)$$header-left$$else$$title$$endif$]{$if(header-right)$$header-right$$else$$date$$endif$}
\lfoot[$if(footer-right)$$footer-right$$else$\thepage$endif$]{$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$}
\ohead[$if(header-left)$$header-left$$else$$title$$endif$]{$if(header-right)$$header-right$$else$$date$$endif$}
\ifoot[$if(footer-right)$$footer-right$$else$\thepage$endif$]{$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$}
\cfoot[$if(footer-center)$$footer-center$$else$$endif$]{$if(footer-center)$$footer-center$$else$$endif$}
\rfoot[$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$]{$if(footer-right)$$footer-right$$else$\thepage$endif$}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\ofoot[$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$]{$if(footer-right)$$footer-right$$else$\thepage$endif$}
\addtokomafont{pageheadfoot}{\upshape}
}
\pagestyle{eisvogel-header-footer}
$if(page-background)$