## 编译环境 操作系统 * [x ] Windows 7/8/10 * [ ] macOS * [ ] Linux `若需勾选,请把[ ]改成[x]` Tex发行版 * [x ] TexLive 2020 * [ ] MikTeX `版本号` * [ ] CTeX `若需勾选,请把[ ]改成[x]` ## 我的问题 我的代码里加入tocloft宏包以后就改变不了目录所在也的页码了,不管设置huge还是normalsize什么的字号,目录所在页页码他就是不变化。 代码如下: \documentclass{article} \usepackage{fancyhdr,lipsum} \pagestyle{fancy} \cfoot{\Large\thepage} %\usepackage{ctex} \setcounter{tocdepth}{2}%目录深度 \usepackage{tocloft} \renewcommand{\cftsecfont}{\normalsize} \renewcommand{\cftsubsecfont}{\normalsize} \begin{document} \pagenumbering{Roman} \tableofcontents \cfoot{\huge\thepage} \newpage \pagenumbering{arabic} \setcounter{page}{1} \cfoot{\huge\thepage} \section{1} \lipsum[1-9] \section{2} \lipsum[1-9] \section{2} \lipsum[1-9] \section{2} \lipsum[1-9] \end{document}
tocloft.zip
0KB

1 回答1

0
```` \documentclass{article} \usepackage{fancyhdr,lipsum} \pagestyle{fancy} \cfoot{\Large\thepage} %\usepackage{ctex} \setcounter{tocdepth}{2}%目录深度 \usepackage{tocloft} %\renewcommand{\cftsecfont}{\normalsize} %\renewcommand{\cftsubsecfont}{\normalsize} \begin{document} \tocloftpagestyle{fancy} \pagenumbering{Roman} \tableofcontents \cfoot{\huge\thepage} \newpage \pagenumbering{arabic} \setcounter{page}{1} \cfoot{\huge\thepage} \section{1} \lipsum[1-9] \section{2} \lipsum[1-9] \section{2} \lipsum[1-9] \section{2} \lipsum[1-9] \end{document} ```` ’‘’ 呐,解决了! If the tocloft package is loaded, the page style of pages in the ToC, LoT, and LoF is governed by the package's \tocloftpagestyle macro. Tocloft's default page style is plain. To change the page style of these pages to fancy, issue the command

作者追问:2021-03-01 19:55

请问具体改成啥样呢?我还是不太懂欸?

作者追问:2021-03-01 19:56

哦哦,明白了!

回答: 2021-03-01 19:56

啊? 就那几行代码,你都懒得对比吗?

  • 明白了!非常感谢! – 罗二斯 2021-03-01 19:56 回复

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。