self comment...
其实差距就是 \centerline{\normalfont\Large\bfseries\sffamily\contentsname
[editted here]所谓的tocloft
设置“比较困难”也并没有多困难,如下代码:
\documentclass{mcmthesis}
\mcmsetup{tstyle=\color{black}\bfseries,
tcn = 1234567, problem = S, sheet = true,
titleinsheet = true, keywordsinsheet = true,
titlepage = false, abstract = true}
\setlength{\headheight}{13.6pt}
\usepackage{lastpage}
\usepackage{tocloft}
\tocloftpagestyle{main}
\renewcommand{\cfttoctitlefont}{\hfill\Large\bfseries\sffamily}
\renewcommand{\cftaftertoctitle}{\hfill}
\setlength{\cftbeforesecskip}{10pt}
\setlength{\cftbeforesubsecskip}{5pt}
\begin{document}
\tableofcontents
\clearpage
\section{Fisrt}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\section{Second}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\section{Third}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\section{Four}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\end{document}
这便与图一(几乎)一模一样了...
但是这一实现是很不优雅的,相当于如下的情景:
一位优秀的面点师制作了一个优雅的🍰,但是为了把樱桃换成草莓,我们不得已调用了tocloft
,这导致奶油氧化了,我们又模仿那位面点师的手法糊了一层奶油上去。
这一过程令人很不舒服,从代码整体实现逻辑上看更合理的工作流是在更底层实现,让那位优秀的面点师直接换成草莓。
问 mcmthesis模板中使用tcocloft宏包修改目录样式的更优雅(底层)做法