\listoffigures と \listoftables にページ番号を表示するにはどうすればよいですか?

\listoffigures と \listoftables にページ番号を表示するにはどうすればよいですか?

ムウェ

\documentclass[12pt, a4paper, twoside, %openright, 
toc=listof, BCOR=5mm, bibliography=totoc, parskip=half]{scrreprt}
\usepackage[square,sort,comma,numbers]{natbib} %Literaturverzeichnis
\usepackage[linktoc=all,hidelinks]{hyperref} %Verlinkungen
\usepackage[automark,headsepline]{scrlayer-scrpage} %header

%header
\clearscrheadfoot
\automark{section}
\ihead{\headmark}
\ohead{Seite\enspace\pagemark}
\setkomafont{pageheadfoot}{\normalfont}

\begin{document}
\thispagestyle{plain}
\pagenumbering{Roman}
\tableofcontents
\thispagestyle{plain}
\KOMAoptions{open=any}
\thispagestyle{plain}
\listoffigures %Abbildungsverzeichnis
\thispagestyle{plain}
\listoftables %Tabellenverzeichnis
\thispagestyle{plain}

\cleardoublepage
\KOMAoptions{open=right}
\pagestyle{headings}

\end{document}

私がここで受け取ろうとしたのは、通常の各ページに通常のヘッダーがあり、図のリストと表のリストのページには単純なページ番号 (ローマ字) だけがある出力ですが、目次にページ番号があるにもかかわらず、リスト ページにはページ番号が表示されませんでした。これらのリストのどちらも 1 ページ以上ではないので、最初のページの後にページ番号が表示されるかどうかはわかりません。

答え1

それがあなたが達成したいことを実現すると思います。

まず、リストのヘッダーとフッターを設定し、その後すべてをクリアして、もう一度メイン部分の内容を設定します。

\documentclass[12pt, a4paper, twoside, %openright, 
toc=listof, BCOR=5mm, bibliography=totoc, parskip=half]{scrreprt}
\usepackage[square,sort,comma,numbers]{natbib}

\usepackage{blindtext}
\usepackage{pgffor}
\usepackage{showframe}

\usepackage[automark,headsepline]{scrlayer-scrpage}
\clearpairofpagestyles
%\automark{section}%JB Are you sure?
\cfoot*{\pagemark}
\setkomafont{pageheadfoot}{\normalfont}
\usepackage[linktoc=all,hidelinks]{hyperref}

\begin{document}
\pagenumbering{Roman}
\tableofcontents
\KOMAoptions{open=any}
\listoffigures
\listoftables

\cleardoublepage
\pagenumbering{arabic}
\clearpairofpagestyles
\ohead*{Seite\enspace\pagemark}
\ihead{\headmark}
\KOMAoptions{open=right}

\foreach \x in {1,...,10} {%
    \chapter{Chapter}
    \section{Walzing}
    \blindtext
    \captionof{figure}{Figure \x}
    \captionof{figure}{Figure \x}
    \captionof{figure}{Figure \x}
    \section{Wombat}
    \Blindtext[4][3]
    \captionof{table}{Table \x}
    \captionof{table}{Table \x}
    \captionof{table}{Table \x}
}
\end{document}

関連情報