I use the tocloft package to customize the format of TOC and the ctex package to support Chinese typesetting and to customize the section title format. Everything works well. But I find that the vertical spacing before the title of TOC is slightly smaller than that before the normal section title. Here is MWE:

%!TeX program = xelatex

% for Chinese typesetting
    section/format = \bfseries \centering \LARGE


\renewcommand{\cfttoctitlefont}{\hfill \bfseries \LARGE}


    {\Huge\bfseries\@title} \\
    {\Large\@author} \\

    \let \oldtableofcontents \tableofcontents



    这是第一节。This is the first section.

    这是第二节。This is the second section.

enter image description here enter image description here

It can be seen, though not obvious, that the vertical spacing before TOC title is smaller. I tried to solve this problem and I found this question. Add this code in my preamble:


But it has no effect.

Then I read the doc of tocloft package and found the definition of TOC title:

 \vskip \cftaftertoctitleskip

So the problem might come from \vspace,I renewcommand this macro by substitute \vspace to \vspace*. But this time, a new problem arose! The spacing became larger: enter image description here

I finally solved this problem by renewcommanding \@cftmaketoctitle like this:


enter image description here To make the TOC title become a section title without numbering and its above spacing is controled by ctex package.

But I still can't figure out why those problem happened. Does tocloft conflict with ctex?

  • If the TOC title should be a normal unnumbered section title, set option titles for package tocloft: \usepackage[titles]{tocloft}. – esdd May 16 at 10:18
  • @esdd Oh, thanks:). This works and is simpler. I should read the doc more carefully. – North May 16 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.