![如何从第二页开始在每一页上重复代码?](https://linux22.com/image/405464/%E5%A6%82%E4%BD%95%E4%BB%8E%E7%AC%AC%E4%BA%8C%E9%A1%B5%E5%BC%80%E5%A7%8B%E5%9C%A8%E6%AF%8F%E4%B8%80%E9%A1%B5%E4%B8%8A%E9%87%8D%E5%A4%8D%E4%BB%A3%E7%A0%81%EF%BC%9F.png)
我想从第二页开始在每一页上重复某些代码块。这是假设已定义页眉。有没有可以检测页数的包?
谢谢
答案1
使用两种页面样式,例如first
和main
。然后在您的文档中执行以下操作:
\documentclass...
% define the first and main pagestyles, or use existing ones
% ...
\pagestyle{main}
\begin{document}
% some text (which might set its own page style)
\thispagestyle{first} % for the first page
% more text on the first page then \pagestyle{main} comes into effect on the following pages