latex中页眉怎么去掉_[转载]在latex中如何去除或设置目录\tableofcontents中的页眉问...

问题描述:

在论文、报告排版中,Latex设置为封面页是无页眉(页脚)的,目录、表目录、图目录、正文的页眉一样,章节页的第一页通常也是没有页眉的。在遇到要求目录、表目录、图目录同封面都为无页眉要求时,我在百度上检索通常的解决方案都是pagestyle{plain}和thispagestyle{plain}命令。但本人发现这并不能很好的解决这个问题。

问题解决方案:

(1) 添加章节第一页的页眉。

使用:

pagestyle{fancy}

fancypagestyle{plain}{ ...... }

(2)

去掉目录中的页眉,而不影响其他正文章的页眉。以下命令完全不同于pagestyle{plain}和thispagestyle{plain}命令。

documentclass{report}

%book类似

usepackage{fancyhdr}

fancypagestyle{front}{ % style for TOC, LOF, LOT

(设置目录、表目录、图目录)

fancyhf{}

renewcommand{headrulewidth}{0pt}

cfoot{thepage} }

%可根据自己要求修改

fancypagestyle{main}{ % style for the

mainmatter(设置正文目录)

fancyhf{}

renewcommandheadrulewidth{.4pt}

fancyhead[C]{slshape

leftmark}

fancyfoot[C]{thepage} }

makeatletter

%在.cls文件中不需要makeatletter和makeatother

newcommandfrontpagestyle{cleardoublepagepagestyle{front}letps@plainps@front} newcommandmainpagestyle{cleardoublepagepagestyle{main}letps@plainps@main}

makeatother

usepackage{blindtext}

begin{document}

frontpagestyle % switch to the

pagestyle front

tableofcontents

listoffigures

listoftables

mainpagestyle % switch to the

pagestyle main BlinddocumentBlinddocumentBlinddocumentBlinddocumentBlinddocument BlinddocumentBlinddocumentBlinddocumentBlinddocumentBlinddocument

end{document}

解决方案参考资料:https://tex.stackexchange.com/questions/177101/how-to-remove-header-and-footer-in-table-of-contents-and-lof-and-lot

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值