Aumentar o headsep se a seção começar em uma nova página

Aumentar o headsep se a seção começar em uma nova página

Estou usando a classe scartcl do script KOMA com o pacote de geometria e gostaria que minhas seções (que sempre começam em uma nova página) tivessem algum espaçamento vertical extra entre o headsepline, mas não gostaria de alterar o headsep para subseções , subsubseções, parágrafos, carros flutuantes, etc.

Eu liesta postagemmas infelizmente não tenho representante suficiente para comentar.

Acredito que aplicar este comando à seção, mas não apenas à sub e subsubseção, funcionaria:

\usepackage{xpatch}
\xpretocmd\sectionlinesformat{\vspace*{0pt}}{}{\PatchFailed}

E aqui está meu MWE:

%%% Preamble
\documentclass[12pt,
twoside=false,
letterpaper,
hidelinks,
parskip=half,
onehalfspacing,
bibliography=numbered,
numbers=noenddot]{scrartcl}

\usepackage[headsepline]{scrlayer-scrpage}  % enable header line

\usepackage[
top=3cm,
headheight=2.5cm, % 17pt as per the warning by fancyhdr 17pt = about 0.6cm
headsep=1em,
%includehead,  % do not includefoot so that you can strictly define the top of the footer
heightrounded, % to avoid spurious underfull messages
footskip=5mm,
bottom=1cm,
bindingoffset=0.0mm,
left=2.2cm,
right=2.2cm,
%showframe=true,
]{geometry} 

\usepackage{xpatch}
\xpretocmd\sectionlinesformat{\vspace*{0pt}}{}{\PatchFailed}  % adds padding to subsections also :(

\addtokomafont{section}{\clearpage}
\RedeclareSectionCommand[beforeskip=1.0em,afterskip=0.01em]{section}
\RedeclareSectionCommand[beforeskip=1.0em, afterskip=0.01em]{subsection}
\RedeclareSectionCommand[beforeskip=1.0em, afterskip=0.01em]{subsubsection}


\usepackage{blindtext}

%%%   Document  %%%
\begin{document}

\blindtext

\blinddocument

\blindtext

\blindtext

\blinddocument

\end{document}

Responder1

Isenção de responsabilidade: eu sugeriria usar class scrreprte \chapter.


Não faça mau uso \addtkomafont. Existem apenas comandos de fonte permitidos no argumento.

Altere o patch \sectionlinesformatpara:

\usepackage{xpatch}
\xpretocmd\sectionlinesformat
  {\ifstr{#1}{section}{\clearpage\vspace*{0pt}}{}}
  {}{\PatchFailed}

Exemplo:

\documentclass[12pt,
twoside=false,
letterpaper,
%hidelinks,
parskip=half,
%onehalfspacing,
bibliography=numbered,
numbers=noenddot]{scrartcl}
\usepackage{blindtext}% only for dummy text

\usepackage[headsepline]{scrlayer-scrpage}  % enable header line

\usepackage[
top=3cm,
headheight=2.5cm, % 17pt as per the warning by fancyhdr 17pt = about 0.6cm
headsep=1em,
%includehead,  % do not includefoot so that you can strictly define the top of the footer
heightrounded, % to avoid spurious underfull messages
footskip=5mm,
bottom=1cm,
%bindingoffset=0.0mm,
left=2.2cm,
right=2.2cm,
%showframe=true,
]{geometry} 

\usepackage{xpatch}
\xpretocmd\sectionlinesformat
  {\ifstr{#1}{section}{\clearpage\vspace*{0pt}}{}}
  {}{\PatchFailed}

\RedeclareSectionCommands
  [beforeskip=1.0em,afterskip=0.01em]
  {section,subsection,subsubsection}

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

Resultado:

insira a descrição da imagem aqui

informação relacionada