I would like to have part toc entries, which are formatted \bfseries\sffamily, as small-caps. This combination is not available for the font used. Not even with packages. I implemented it "manually" by increasing the font size one level for the corresponding initial letters and then reducing it again. I know this is a "bad hack" and not recommended. But it looks really quite good in this case. Since I need it several times and would like to define something like that and not just "hard-code" it, I wonder whether it would be possible to write a parser that parses a string like "Paris and Rome" into \large P\normalsize ARIS AND \large R\normalsize OME...?
This is, more or less, what I use now:
\documentclass[headings=optiontotoc,paper=a5,10pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{microtype}
\usepackage{hyperref}
\usepackage{bookmark}
\linespread{1.05}
\renewcommand*{\raggedsection}{\centering}
% for centering part toc entry:
\makeatletter
\newcommand*{\specialparttocentryformat}[1]{%
\large\bfseries\sffamily%
\let\numberline@box\mbox%
\def\autodot{: }%
\centering%
#1%
}
\RedeclareSectionCommand[tocnumwidth=0pt,tocindent=0pt,tocentryformat=\specialparttocentryformat,toclinefill={},tocpagenumberbox=\@gobble,tocpagenumberwidth=0pt,tocrightindent=0pt,tocraggedpagenumber]{part}
\makeatother
\newcommand*{\up}{\large}
\newcommand*{\down}{\normalsize}
\newcommand*{\muc}[1]{\MakeUppercase{#1}}
\newcommand*{\bookonetoc}{\up F\down IRST BOOK}
\newcommand*{\bookonetopictoc}{\up C\down APITALS IN EUROPE}
\newcommand*{\partonetoc}{\up F\down IRST THEME}
\newcommand*{\partonetopictoc}{\up B\down ERLIN AND \up R\down OME}
\newcommand*{\dlb}{\\\vspace{\baselineskip}}% double line break
\newcommand*{\tlb}{\\\vspace{2\baselineskip}}% triple line break
\newcommand*{\lbtoc}{\texorpdfstring{\hspace{50em}}{: }}% line break in toc
\newcommand*{\dlbtoc}{\texorpdfstring{\hspace{50em}\textcolor{white}{--}\hspace{50em}}{ -- }}% double line break in toc
\begin{document}
\tableofcontents
\part[%
nonumber=true,%
tocentry={\bookonetoc\lbtoc\bookonetopictoc\dlbtoc\partonetoc\lbtoc\partonetopictoc}%
]%
{\huge\muc{First book}\dlb\muc{Capitals in europe}\tlb\LARGE\muc{First theme}\dlb\muc{Berlin and Rome}}
\end{document}
So I would like to have flexibility regarding the font size. Furthermore, I prefer the bookmarks-entry to be all-caps.
BTW: \hspace{50em} of course is a hack. When I use \\ instead, the spacing between the lines is inconsistent. If someone has an idea on how to avoid this hack, I would of course be happy to hear it.


