
Me gustaría hacer chapter
y section
aparecer en negrita en el Table of Contents
(TOC). Estoy usando un KOMA
prototipo -Script. Mi tabla de contenido se ve así:
Aunque defino que las secciones se escriban en negrita, no aparecen en negrita en la tabla de contenido. Además, los capítulos aparecen en una fuente diferente. ¿Sabes por qué?
Incluyo la tabla de contenido por esto:
\begingroup
\changefont{phv}{m}{n}
\tableofcontents
\endgroup
El archivo de clase se ve así:
\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
}
Respuesta1
Esto no pretende ser una solución o una respuesta real, se publica para mostrar la diferencia (por lo que no es necesario votar por ello ;-))
\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}
Omití las subsecciones por falta de tiempo.
Se parece a esto
Respuesta2
El manual del script KOMA describe toda la interfaz en la subsección toc. Bueno, ¿qué tal si escribimos algo como \addtokomafont{sectionentry}{\bfseries}
? Y olvídate del resto...