I would like to prepend the page numbers in my scrbook with a letter and a hyphen. This works well for the page footers by redefining \thepage. However, the page numbers get aligned left instead of right in the TOC.
\documentclass{scrbook}
\begin{document}
\tableofcontents
\renewcommand{\thepage}{\Roman{page}} % flush right page entries in TOC
%\renewcommand{\thepage}{P-\Roman{page}} % flush left page entries in TOC
\clearpage\section{Sec1}
\clearpage\section{Sec2}
\end{document}
Can I somehow fix the alignment for the prepended page numbers?


Right justify roman page numbers in list of tables) mentioned that the problem only occurred in the LOT, but not in the TOC. – FlorianL Aug 27 '17 at 08:56