5

I changed the chapter entry style in the toc with chapterentry (in koma-script class document -- changing from koma-script is not an option) to small caps. Unfortunately this also effects the pages numbers for the chapter, i.e. the page numbers are small caps too. Is there a way to prevent the page numbers to be changed to small caps and just stay in the normal roman font?

\documentclass[
    fontsize=12pt,              
    open=right,             
    twoside = true,
    paper=a4,               
    listof=totoc,       
    numbers=noenddot,
    headings=big,
    chapterprefix=false]    % 
{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{blindtext}

\setkomafont{sectioning}{\rmfamily} 
\setkomafont{chapterentry}{\mdseries\scshape\lowercase}
\addtokomafont{chapter}{\normalsize\scshape}
\addtokomafont{section}{\normalsize\scshape}
\addtokomafont{subsection}{\normalsize\itshape}     

\begin{document}
\pagenumbering{roman} 
\tableofcontents
\listoffigures                  
\listoftables   
\newpage 
\pagenumbering{arabic} 
\Blinddocument
\end{document}
4

Use

\setkomafont{chapterentrypagenumber}{\normalfont\normalcolor}

to use the normal font for the chapter page numbers in the table of contents.

enter image description here

Code:

\documentclass[
    fontsize=12pt,              
    open=right,             
    twoside = true,
    paper=a4,               
    listof=totoc,       
    numbers=noenddot,
    headings=big,
    chapterprefix=false]    % 
{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{blindtext}

\setkomafont{sectioning}{\rmfamily} 
\setkomafont{chapterentry}{\mdseries\scshape\lowercase}
\setkomafont{chapterentrypagenumber}{\normalfont\normalcolor}%<- added
\addtokomafont{chapter}{\normalsize\scshape}
\addtokomafont{section}{\normalsize\scshape}
\addtokomafont{subsection}{\normalsize\itshape}

\begin{document}
\pagenumbering{roman} 
\tableofcontents
\listoffigures                  
\listoftables   
\newpage 
\pagenumbering{arabic} 
\Blinddocument
\end{document}
1

The easiest way to get what you want is to add the line

\addtokomafont{pagenumber}{\rmfamily\normalsize}

in your preambel. Then the pagenumbers on the pages and in the toc are in the given font \rmfamily in size \normalsize.

Complete code:

\documentclass[
  fontsize=12pt,              
  open=right,             
  twoside = true,
  paper=a4,               
  listof=totoc,       
  numbers=noenddot,
  headings=big,
  chapterprefix=false]    % 
{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage{blindtext}

\setkomafont{sectioning}{\rmfamily} 
\setkomafont{chapterentry}{\mdseries\scshape\lowercase}
\addtokomafont{chapter}{\normalsize\scshape}
\addtokomafont{section}{\normalsize\scshape}
\addtokomafont{subsection}{\normalsize\itshape}
\addtokomafont{pagenumber}{\rmfamily\normalsize} % <====================

\begin{document}
\pagenumbering{roman} 
\tableofcontents
\listoffigures                  
\listoftables   
\newpage 
\pagenumbering{arabic} 
\Blinddocument
\end{document}

with the resulting toc:

enter image description here

  • 1
    \addtokomafont{pagenumber}{...} or \setkomafont{pagenumber}{...} affects only page numbers in header or footer. – esdd Nov 15 '15 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.