4

I have a scrartcl document with arabic and roman page numbers. The list of tables looks like this:

LOT

Arabic page numbers are right justified (relative to each other), whereas roman numbers are centered.

I would like to have all page numbers right justified, like this (the red line is just for illustration):

LOT - expected

Although I suppose that the solution is probably related to the listof document options, I cannot find an appropriate setting. However, the problem also occurs with article instead of scrartcl, so it does not seem to be specific to KOMA script.

MWE:

\documentclass{scrartcl}
\begin{document}
\listoftables
\clearpage

\begin{table}
\caption{First main table.}
\end{table}
\clearpage

\setcounter{page}{95}
\begin{table}
\caption{Second main table.}
\end{table}
\clearpage

\pagenumbering{roman}

\setcounter{page}{1}
\begin{table}
\caption{First appendix table.}
\end{table}
\clearpage

\setcounter{page}{28}
\begin{table}
\caption{Second appendix table.}
\end{table}
\end{document}
CL.
  • 901

1 Answers1

5

A possible solution working for article and scrartcl (i.e. without using features of KOMA)

The page numbers are still right justified, but the width of the page number slot at the right margin is too small, because Roman numbers need more space to be typeset than arabic figures.

Increasing the value of \@pnumwidth will solve this problem, however, this will increase it for all .toc etc -- since Roman numbers are for all pages this should be no issue!

\documentclass{scrartcl}

\makeatletter
\renewcommand{\@pnumwidth}{40pt}% 40pt is just an example
\makeatother

\begin{document}


\listoftables
\clearpage

\begin{table}
\caption{First main table.}
\end{table}
\clearpage

\setcounter{page}{95}
\begin{table}
\caption{Second main table.}
\end{table}
\clearpage

\pagenumbering{roman}

\setcounter{page}{1}
\begin{table}
\caption{First appendix table.}
\end{table}
\clearpage

\setcounter{page}{28}
\begin{table}
\caption{Second appendix table.}
\end{table}
\end{document}

enter image description here

  • Works great, thank you. Interestingly, the TOC does not need the setting, it can deal with the wide roman numbers by default. I therefore changed @pnumwidth only after TOC (and before LOT), thus TOC is not affected. – CL. Jun 25 '16 at 07:37
  • @CL: Yes, indeed -- I was looking at the wrong code actually. I'll remove my previous comment! –  Jun 25 '16 at 09:54