2

I asked a question on how to set up the footer in koma script to get the right distance between page number and text using scrlayer-scrpage (https://tex.stackexchange.com/a/559567/18561). The solution works if komascript is loaded directly, but I cannot get it to work if I load komascript in a separate class file.

%    \documentclass[footlines=1]{scrbook}            
\documentclass{debug-langscibook}            

%    \usepackage{scrlayer-scrpage}
%\usepackage{scrpage2}

\usepackage{showframe}

\usepackage{lipsum}% only for dummy text

\begin{document}

\lipsum[1-20]

\end{document}

This is the self-defined class:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     Class
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\LoadClass[
  footlines=1,
  ]{scrbook}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    Header and footer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{datetime}
\usepackage{scrlayer-scrpage}
%\usepackage{scrpage2}

The footline=1 option is simply ignored.

1
  • If you put footlines=1 in to the optional argument to \documentclass it is a global option and will be picked up by packages as well, whereas it is only a local option to scrbook if you put it in the argument of \LoadClass. You could use \KOMAoptions after you loaded scrlayer-scrpage, or put a \PassOptionsToPackage{footlines=1}{scrlayer-scrpage} before you load scrlayer-scrpage, or put it in the optional argument of \documentclass for your own class as well.
    – Skillmon
    Commented Sep 14, 2020 at 6:53

1 Answer 1

2

Option footline and option footheight are options of package typearea which is loaded by the KOMA-Script classes automatically. But if you use this options in the argument of \LoadClass, package typearea will not see them.

You could use either

\PassOptionsToPackage{footlines=1}{typearea}
\LoadClass{scrbook}
\RequirePackage{scrlayer-scrpage}

or

\LoadClass{scrbook}
\KOMAoptions{footlines=1}
\recalctypearea
\RequirePackage{scrlayer-scrpage}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .