[Tex/LaTex] Warning, using: typearea, a5, BCOR=8mm, DIV=calc

koma-scripttypearea

can you please help me to avoid the warning that arises by using:

twoside=true, fontsize=10pt, BCOR=8mm, \recalctypearea

Here is my example:

\documentclass{scrreprt}

\usepackage{microtype}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage[automark]{scrlayer-scrpage}   % für angepasste Kopf-/Fußzeilen
\KOMAoptions{headsepline=0.2ex}

\KOMAoptions{twoside=true}
\KOMAoptions{fontsize=10pt}
\KOMAoptions{paper=A5}
\KOMAoptions{headinclude=true}
\KOMAoptions{footinclude=false}
\KOMAoptions{mpinclude=false}

\KOMAoptions{BCOR=8mm}
%\KOMAoptions{DIV=18}
\KOMAoptions{DIV=calc}
\recalctypearea

\begin{document}
    \blinddocument
\end{document}

Doing so, why do I need to set

\KOMAoptions{DIV=calc} 

before the other \KOMAoptions to avoid a warning.

Best Answer

If you include the option pagesize, everything gets calculated correctly. No need for \recalctypearea here.

% arara: pdflatex

\documentclass[%
    ,twoside=true
    ,fontsize=10pt
    ,paper=a5
    ,pagesize % this was missing.
    ,BCOR=8mm
    ,headinclude=true
    ,footinclude=false
    ,mpinclude=false
    ,headsepline=0.2ex
    ,DIV=calc
    ]{scrreprt}

\usepackage[automark]{scrlayer-scrpage}   % für angepasste Kopf-/Fußzeilen
\usepackage{blindtext}
\recalctypearea % not needed here, but in order to show that it is working without warnings.

\begin{document}
\blinddocument
\end{document}