굵은 장과 섹션 및 일반 크기 하위 섹션 KOMA 스크립트의 목차

굵은 장과 섹션 및 일반 크기 하위 섹션 KOMA 스크립트의 목차

(TOC) 에 굵게 표시 chapter하고 싶습니다 . -Script 프로토타입을 사용하고 있습니다 . 내 목차는 다음과 같습니다.sectionTable of ContentsKOMA

여기에 이미지 설명을 입력하세요

섹션을 굵게 표시하도록 정의했지만 목차에서는 굵게 표시되지 않습니다. 또한 장은 다른 글꼴로 표시됩니다. 이유를 아시나요?

나는 다음과 같이 목차를 포함합니다.

\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 스크립트 매뉴얼은 toc-하위 섹션의 전체 인터페이스를 설명합니다. 음, 다음과 같은 글을 쓰는 것은 어떨까요 \addtokomafont{sectionentry}{\bfseries}? 그리고 나머지는 잊어버리세요...

관련 정보