
Gostaria de fazer chapter
e section
aparecer em negrito no Table of Contents
(TOC). Estou usando um KOMA
protótipo -Script. Meu índice se parece com:
Embora eu defina que as seções sejam escritas em negrito, elas não aparecem em negrito no Índice. Além disso, os capítulos aparecem em uma fonte diferente. Você sabe por quê?
Eu incluo a tabela de conteúdo assim:
\begingroup
\changefont{phv}{m}{n}
\tableofcontents
\endgroup
O arquivo de classe fica assim:
\addtokomafont{chapter}{\fontfamily{phv}\fontsize{14}{14}\bfseries}
\addtokomafont{section}{\fontfamily{phv}\normalsize\bfseries}
\addtokomafont{subsection}{\fontfamily{phv}\normalsize\mdseries}
\renewcommand{\cftchappagefont}{\fontfamily{phv}\bfseries}
\renewcommand{\cftchapfont}{\fontfamily{phv}\bfseries}
\renewcommand{\cftsecpagefont}{\fontfamily{phv}}
\renewcommand{\cftsubsecpagefont}{\fontfamily{phv}}
\renewcommand{\cftsecfont}{\fontfamily{phv}}
\renewcommand{\cftsubsecfont}{\fontfamily{phv}}
\renewcommand*{\chapterpagestyle}{empty}
\def\@dottedtocline#1#2#3#4#5{%
\ifnum #1>\c@tocdepth \else
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{#4}\nobreak
\leaders\hbox{\rmfamily\mdseries$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak
\hskip-.2em
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
\par}%
\fi}
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\if@tocleft
\ifx\toc@l@number\@empty\else
\setlength\@tempdima{0\toc@l@number}%
\fi
\fi
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\vspace{-\baselineskip}
\leavevmode \sectfont
\advance\leftskip\@tempdima
\hskip -\leftskip
\@dottedtocline{0}{\z@}{1.3em}{\textbf{#1}}{{\changefont{phv}{m}{u}#2}}
\penalty\@highpenalty
\endgroup
\fi
}
Responder1
Isso não é uma solução ou uma resposta real, é postado para mostrar a diferença (portanto, não há necessidade de votar ;-))
\documentclass{scrbook}
% Other stuff
\begin{document}
\tableofcontents
\chapter{Einleitung}
% Text to come...
\chapter{Begriffe}
\section{Definitionen von Einkommen}
% Now with *bold* toc - entry!!! %
\section[\textbf{Definitionen von Einkommensrisiko}]{Definitionen von Einkommensrisiko}
\end{document}
Omiti as subseções por falta de tempo.
Se parece com isso
Responder2
O manual do script KOMA descreve toda a interface na subseção toc. Bem, que tal escrever algo como \addtokomafont{sectionentry}{\bfseries}
? E esqueça o resto...