关于letax 目录引导符和文字距离的问题解决
1、问题现象
上图为已经修改之后的距离,是与word生成的目录是一致的。
1、修改方法
在cls文件里面,将目录部分的代码修改为如下即可搞定
不想打的话,以下为代码
\renewcommand{\contentsname}{目\qquad 录}
\RequirePackage{tocloft}
\makeatletter
\patchcmd{\l@chapter}% <cmd>
{\leavevmode}% <search>
{\leavevmode%
\renewcommand{\numberline}[1]{\hbox{\@cftbsnum ##1\@cftasnum}\@cftasnumb}}% <replace>
{}{}% <success><failure>
\makeatother
\renewcommand\cftchapfont{\zihao{-4}}
\renewcommand\cfttoctitlefont{\hfill\heiti\bfseries\zihao{-2}}
\renewcommand\cftaftertoctitle{\hfill}
\newcommand\acknowledgement{\backmatter\chapter[致谢]{\centerline{\heiti\zihao{-2}\ziju{2}致谢}}}
\renewcommand{\cftchapdotsep}{\cftdotsep}
\makeatletter
\renewcommand{\cftdot}{$\cdot$}
\renewcommand{\cftdotsep}{0.5}
\setlength{\cftbeforetoctitleskip}{-10pt}
\setlength{\cftaftertoctitleskip}{20pt}
\setlength{\cftbeforechapskip}{0pt}
\setlength{\baselineskip}{22pt}
\renewcommand{\@pnumwidth}{1em}
\renewcommand{\cftpnumalign}{r}
\renewcommand\cftchappagefont{} %chapter页码设置
\renewcommand\cftchapaftersnum{~} %chapter编号到文字距离 ~
\renewcommand\cftsecaftersnum{~} %section编号到文字距离 ~
%以下几个参数控制目录缩进以及编号到文字距离
\cftsetindents{chapter}{0em}{1.5em}
\cftsetindents{section}{1.7em}{1.5em}
\cftsetindents{subsection}{3.4em}{1.5em}
\makeatother
以上为本部大佬richey的辛勤工作。借花献佛。
希望能帮到有用的人。