在 documentclass scrartcl 中,我创建了一个命令来更新文档中间的页眉和页脚。页眉不应显示在发出命令的页面上,而应显示在所有其他页面上。使用\thispagestyle{plain}
(删除页眉但保留页脚)效果很好。但是,页脚应该仅有的在发出命令的页面上显示。我该如何实现?
\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}
答案1
\lofoot*{<content>}
是 的简写版本。它设置(可选参数)和(强制参数)页面的\lofoot[<content>]{<content>}
页脚内容。如果使用页面样式的页面的页脚应为空,请使用。plain
scrheadings
scrheadings
\lofoot[<content>]{}
\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]{}% <- changed
}
\begin{document}
\mynewcommand
\lipsum[1-24]
\end{document}