1

I'm stuck trying to implement this kind of TOC:

enter image description here

Yep, It's a fragment from the D&D Basic Rulebook. As I can see, this TOC has a few features:

  • Two column
  • Centered and customized "Table of contents" header
  • Add a "B" prefix to page number
  • Leading dots
  • "PART n" prefix for chapters
  • Indented sections

I really tried with titletoc but I failed and the results are not the same (a nice way to say that they're really bad). If anyone can shed some light, it would be greatly appreciated--Thanks!

Update: After published the question I found some help that allows me to reach a close solution (same effect when you visit the doctor: you started to feel better). Here's the Minimal Working Example:

\documentclass{book}
\usepackage{multicol}
\usepackage{titletoc}
\usepackage{xcolor} 

% something similar to the original
\definecolor{colortoc}{RGB}{47,107,167} 
% only display chapters and sections
\setcounter{tocdepth}{1} 
% add B prefix to number page 
\renewcommand\thepage{B\arabic{page}} 
% custom TOC name
% https://tex.stackexchange.com/questions/142445/how-do-i-center-the-table-of-contents-title-using-tocloft
\renewcommand{\contentsname}%
    {\hfill\bfseries\Large TABLE OF CONTENTS \hfill}

% titletoc stuff
\titlecontents{chapter}[0mm]{\normalsize\bfseries}{PART\space\thecontentslabel:\space\MakeUppercase}{}{\normalfont\dotfill\makebox[1em][l]{\thecontentspage}}
\titlecontents{section}[3mm]{\normalsize\relax}{}{}{\dotfill\makebox[1em][l]{\thecontentspage}}


\begin{document}
% some help from % https://tex.stackexchange.com/questions/389319/making-the-second-column-of-the-table-of-contents-clear-the-page-header
\makeatletter
\begingroup % start a TeX group
\color{colortoc}% or whatever color you wish to use
\chapter*{\contentsname
  \@mkboth{%
    \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
% If you want to turn off columns being forced to equal height, use the starred version \begin{multicols*}{2}.
\begin{multicols}{2}
  \@starttoc{toc}
\end{multicols}
\endgroup   % end of TeX group
\makeatother

\chapter{Literature Study}
\section{Section Alpha}
\section{Section Beta}
\section{Section Gamma}
\section{Section Delta}
\section{Section Epsilon}
\section{Section Zeta}

\chapter{More Chapter Alpha}
\section{Section Alpha}
\section{Section Beta}
\section{Section Gamma}
\section{Section Delta}
\section{Section Epsilon}
\section{Section Zeta}

\chapter{More Chapter Beta}
\section{Section Alpha}
\section{Section Beta}
\section{Section Gamma}
\section{Section Delta}
\section{Section Epsilon}
\section{Section Zeta}

\end{document}

enter image description here

Very close to the original I guess. My question now is there's a better way of improving the result.

4
  • 1
    Welcome to TeX.SX It could be of help to see what you've tried so far. Could you please include a minimal working example (MWE) showing what you've tried so far?
    – Skillmon
    Dec 11, 2017 at 20:33
  • What document class are you using? You're more likely to get an answer here if you provide an MWE
    – Troy
    Dec 12, 2017 at 3:36
  • Just updated the first post with a MWE. Hope it helps!
    – xbelanch
    Dec 12, 2017 at 18:57
  • What exactly do you want to chance in this new set-up? Jan 22, 2018 at 16:18

0

Browse other questions tagged .