In the documentclass scrartcl, I’m creating a command to renew the header and footer mid-document.
The header should not show on the page on which the command is issued, but on all other pages.
This works very well using \thispagestyle{plain}
(which drops the header but keeps the footer).
However, the footer should only show on the page on which the command is issued.
How can I achieve that?
\documentclass[twoside=semi]{scrartcl}
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles% only to remove page number for clarity of mwe
\usepackage{lipsum}
\newcommand{\mynewcommand}%
{
\rohead{New header on odd pages starts here}
\lehead{New header on even pages starts here}
\thispagestyle{plain}
\lofoot*{Footer should only appear once, but appears on all odd pages}
}
\begin{document}
\mynewcommand
\lipsum[1-24]
\end{document}
Best Answer
\lofoot*{<content>}
is a short version of\lofoot[<content>]{<content>}
. It sets the footer content for bothplain
(optional argument) andscrheadings
(mandantory argument) pages. If the footer on pages using page stylescrheadings
should be empty, use\lofoot[<content>]{}
.