
我想在(TOC)中使chapter
並顯示為粗體。我正在使用 -Script 原型。我的目錄如下圖所示:section
Table of Contents
KOMA
儘管我將各部分定義為粗體,但它們在目錄中並未顯示為粗體。此外,章節以不同的字體顯示。你知道為什麼嗎?
我這樣包含目錄:
\begingroup
\changefont{phv}{m}{n}
\tableofcontents
\endgroup
類別文件如下所示:
\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
}
答案1
這並不意味著作為解決方案或真正的答案,它被發布是為了顯示差異(所以不需要投票;-))
\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}
由於時間不夠,我省略了這些小節。
看起來像這樣
答案2
KOMA-script 手冊在 toc-subsection 中描述了整個介面。那麼,寫一些類似的東西呢\addtokomafont{sectionentry}{\bfseries}
?忘記其餘的...