Latex 如何控制KOMA脚本中TOC条目的字体大小
我使用命令Latex 如何控制KOMA脚本中TOC条目的字体大小,latex,Latex,我使用命令\setcounter{tocdepth}{\subsubsectiontocdepth}将子部分添加到TOC。但子部分的字体大小大于节和子部分的字体大小(请参考附图)。有人能帮我把TOC中的子部分的字体大小设置为与部分和子部分相同的字体大小吗 以下是MWE,其中还包括我的问题的解决方案: \documentclass[a4paper,10pt,twoside,bibliography=totoc]{scrreprt} \usepackage{babel}
\setcounter{tocdepth}{\subsubsectiontocdepth}
将子部分添加到TOC。但子部分的字体大小大于节和子部分的字体大小(请参考附图)。有人能帮我把TOC中的子部分的字体大小设置为与部分和子部分相同的字体大小吗
以下是MWE,其中还包括我的问题的解决方案:
\documentclass[a4paper,10pt,twoside,bibliography=totoc]{scrreprt}
\usepackage{babel}
\usepackage[subfigure]{tocloft}
\usepackage{caption}
\usepackage{setspace}
\setstretch{1.4}
\usepackage[headsepline]{scrlayer-scrpage}
\automark[chapter]{chapter}
\setcounter{tocdepth}{\subsubsectiontocdepth}
\renewcommand{\cftsecfont}{\sffamily}
\renewcommand{\cftsubsecfont}{\sffamily}
\renewcommand{\cftsubsubsecfont}{\sffamily} % I added this line of code. This solved my problem
\renewcommand{\cftchapdotsep}{4.1}
\renewcommand*{\chapterheadstartvskip}{\vspace*{-1cm}}
\begin{document}
\pagestyle{plain}
\pagenumbering{Roman}
\vspace*{-2cm}
\tableofcontents
\pagestyle{scrheadings}
\pagenumbering{arabic}
\chapter{This is Chapter 1}
\section{This is section 1}
\subsection{This is subsection 1}
\subsubsection{This is subsubsection 1}
\end{document}
你能帮我写一封信吗?谢谢你让我发MWE。当我在MWE上工作时,我能够弄明白为什么会出现这种情况。谢谢你的帮助。你能解决你的问题真是太好了。请你写一个简短的回答,以确保其他有同样问题的用户能够参与到你所学到的内容中来?