TeX - LaTeX Asked on May 6, 2021
I would like to remove the section name from my header only on pages where a section starts. Also I would like to keep using scrlayer-scrpage
because it’s already implemented in my code. Of course I am also open for simpler solutions.
Thanks for your help.
Cheers,
Benson
documentclass{scrartcl}
usepackage[T1]{fontenc}
usepackage[headsepline,automark, draft = false]{scrlayer-scrpage}
clearpairofpagestyles
ihead{headmark}
rohead{pagemark}
addtokomafont{pageheadfoot}{upshape}
KOMAoptions{onpsinit={linespread{1}selectfont}}
usepackage{blindtext}
begin{document}
section{First Section}
blindtext[11]
newpage
section{Second Section}
blindtext[11]
end{document}
Is this what you want?
documentclass{scrartcl}
usepackage[T1]{fontenc}
usepackage[headsepline,automark,draft=false]{scrlayer-scrpage}
clearpairofpagestyles
ihead[]{headmark}
ohead*{pagemark}
addtokomafont{pageheadfoot}{upshape}
KOMAoptions{onpsinit={linespread{1}selectfont}}
AddtoDoHook{heading/endgroup/section}{thispagestyle{plain}}
usepackage{blindtext}
begin{document}
section{First Section}
blindtext[11]
clearpage
section{Second Section}
blindtext[11]
end{document}
Edit:
If you want the rule to appear in the plain
header as well, add the option plainheadsepline
:
documentclass{scrartcl}
usepackage[T1]{fontenc}
usepackage[headsepline,plainheadsepline,automark,draft=false]{scrlayer-scrpage}
clearpairofpagestyles
ihead[]{headmark}
ohead*{pagemark}
addtokomafont{pageheadfoot}{upshape}
KOMAoptions{onpsinit={linespread{1}selectfont}}
AddtoDoHook{heading/endgroup/section}{thispagestyle{plain}}
usepackage{blindtext}
begin{document}
section{First Section}
blindtext[11]
clearpage
section{Second Section}
blindtext[11]
end{document}
Answered by schoekling on May 6, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP