如何在 \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

我認為這就是你想要實現的目標。

首先,為清單設定頁首和頁尾,然後清除所有內容,然後再次為主要部分設定內容。

\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}

相關內容