2

Is it possible to format the list of Chapters and Page Numbers in a TOC? I would like to remove the bold font face and reduce the size of the font in the TOC to 10pt.

My MWE is:

\documentclass[12pt,english,british,twoside,openany]{scrbook}
\usepackage{fontspec}
\setmainfont{Gill Sans}
\usepackage{lettrine}
\usepackage[automark,headsepline=.25pt]{scrlayer-scrpage}
\usepackage{microtype}
\usepackage{ragged2e}
\usepackage{graphicx}
\graphicspath{ {../img/} }
\usepackage{wrapfig}
\usepackage[british]{babel}
\pagestyle{scrheadings}
\addtokomafont{pageheadfoot}{\scshape}%changed to small caps in headers
%\addtokomafont{pagehead}{\normalsize}
\addtokomafont{pagehead}{\small}
%\addtokomafont{pagefoot}{\normalsize}
\addtokomafont{pagefoot}{\small}
  \addtokomafont{disposition}{\rmfamily} %for headings
 %\addtokomafont{disposition}
  \chead{Ben Francis}
  \ofoot{} %Author Name
  \ifoot{} % Chapter Number
\lehead{\pagemark}
\rohead{\pagemark}
\cohead{\mytitle}
\renewcommand\thepart{\Alph{part}}
\linespread{1.05}
\usepackage{hyphenat}
\tolerance=1000
\hyphenpenalty=1000
\renewcommand*{\partpagestyle}{empty}
\usepackage{geometry}
\geometry{paperwidth=5.06in,paperheight=7.81in,
%   verbose,
%   tmargin=0.75in,
%   bmargin=0.75in,
%   inner=0.75in,
%   outer=0.5in,
%   headheight=0.1in,
%   headsep=0.15in,
%   footskip=0.45in,
  twoside}
\newcommand{\mytitle}{Tears in the Rain} 
\newcommand{\emptx}[1]{\textit{#1}}

%\RedeclareSectionCommand[
%indent=.25in,
%font=\fontsize{45}{40}\selectfont\mdseries\mathilde
%font=\fontsize{15}{10}
%]{section}

%\setkomafont{section}{\fontsize{15}{20}\selectfont\fontspec{Gill Sans}}
%\setkomafont{subsection}{\small}
%\setkomafont{subsubsection}{\small}
%\setkomafont{paragraph}{\normalsize}
%\setkomafont{subparagraph}{\normalsize}

\widowpenalty=300
\clubpenalty=300

\setlength\parindent{8pt}

  \begin{document}
    \title{\mytitle}
    \author{}
    \date{}
  \frontmatter
\maketitle
\begin{titlepage}
  \begin{flushright}
      {\huge \mytitle}
      \par\end{flushright}{\huge \par}
\end{titlepage}

  \begin{titlepage}
  \noindent\includegraphics[width=4in,height=1.5in]{./titrbensig}
  \vspace*{0.5in}
  \begin{flushright}
      \Huge{Tears in the Rain}
    \par\end{flushright}{\Huge \par}

\clearpage
\thispagestyle{empty}

\begin{center}
    \emph{Copyright}
\end{center}
\begin{center}
    \textcopyright{ 2014 Ben Francis All rights reserved.}
\end{center}
\vspace*{0.5in}
\begin{center}
    \begin{minipage}[t]{0.5\paperwidth}
        No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form, or by any means;
        mechanical, electrical, photocopying, scanning, recording or
        otherwise, without prior written consent from the publishers. Every
        effort has been made to contact all copyright holders. The author and
        publisher will gladly rectify any omissions.
    \end{minipage}
\end{center}
\vspace*{0.5in}
\begin{center}
    ISBN:
\end{center}
\vspace*{0.2in}
\begin{center}
    A CIP Record for this book is available from the British
    Library.
\end{center}
\vspace*{0.1in}
\begin{center}
    Typeset in \LaTeXe
\end{center}
\end{titlepage}

\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\tableofcontents

\addchap{PREFACE}
\input{./titr_pref.tex}     
\mainmatter
\addchap{ONE}
\input{./titr01.tex}
\end document
2
  • Can you please post a compilable minimal MWE? Especially for the toc it is not relevant, what you write on your title page, but to actually see a toc, the documents need sections or something similar. – samcarter_is_at_topanswers.xyz Apr 4 '16 at 19:52
  • Do you use XeLaTeX or LuaLaTeX? Please advise. – Mico Apr 4 '16 at 20:33
4

To change the font of chapter entries in TOC to \mdseries use

\addtokomafont{chapterentry}{\mdseries}

To change the fontsize of all entries in TOC you can use

\AfterTOCHead[toc]{\KOMAoptions{fontsize=10pt}}

If the fontsize should be changed in lists like LOF or LOT too remove the optional argument. And if the size of the TOC heading should be changed too use \BeforeTOCHead instead \AfterTOCHead.

enter image description here

Code:

\documentclass[12pt,openany]{scrbook}
\usepackage{blindtext}% dummy text

\addtokomafont{disposition}{\rmfamily}
\addtokomafont{chapterentry}{\mdseries}

\AfterTOCHead[toc]{\KOMAoptions{fontsize=10pt}}

\begin{document}
\tableofcontents
\blinddocument
\blinddocument
\end{document}
1
  • Apologies I'm still trying to find my way around the discussion board intricacies – Mike Apr 5 '16 at 20:41
1

As it's impossible for me to actually see your MWE in action (Are you writing it in XeTex or LuaTeX?) and I can't comment on your question either, so I will answer here. I suggest you to use the package tocloft of Peter Wilson.

%% Control the fonts and formatting used in the table of contents.

\usepackage[titles]{tocloft}

%% Use Helvetica-Narrow Bold (size 10) for Chapter entries

\renewcommand{\cftchapfont}{%
  \fontsize{10}{13}\usefont{OT1}{phv}{bc}{n}\selectfont
}
2
  • Or: \cftchapfont{\mdseries\footnotesize} and \cftchappagefont{\mdseries\footnotesize}. (Given that the main font size of the document is 12pt, 10pt is equivalent to \footnotesize.) – Mico Apr 4 '16 at 20:32
  • Note that it is not recommended to use tocloft together with a KOMA-Script class. – esdd Apr 4 '16 at 20:34

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.