hust-latex / hustthesis

:notebook_with_decorative_cover: An Unofficial Thesis Template in LaTeX for Huazhong University of Science and Technology
http://hust-latex.github.io/download#hustthesis
LaTeX Project Public License v1.3c
151 stars 30 forks source link

关于生成目录的页码格式问题 #18

Closed raytaylorlin closed 8 years ago

raytaylorlin commented 8 years ago

导师说目录中大章后面不写页码,小节的页码用小括号括起来,像下面这样。请问下模板应该怎么改?

1. 绪论                                                  【←这里不显示页码】
  1.1 课题研究背景与意义 ............................... (1)
  1.2 国内外研究现状.....................................(2)
xu-cheng commented 8 years ago

Please refer to tocloft for DIYing table of contents.

raytaylorlin commented 8 years ago

明白了,使用以下代码即可

\let\origcftsecpagefont\cftsecpagefont
\let\origcftsecafterpnum\cftsecafterpnum
\renewcommand{\cftsecpagefont}{(\origcftsecpagefont}
\renewcommand{\cftsecafterpnum}{\origcftsecafterpnum)}

\addtocontents{toc}{\cftpagenumbersoff{chapter}}

How to add text before page number using tocloft?

bdgong commented 6 years ago

这样的确可以去掉chaper的页码,以及为section加括号,但是摘要和参考文献等页码也没有了啊?