3

im using fancyhdr to add something to the header, because two sections i have are very long itemizes with similar structure. so the reader can always check in the header which of the two he is reading.

so right before \section i put:

\fancyhead[L]{\sffamily\leftmark{} - first list}
\pagestyle{fancy}

but now the where the second section begins, it will put already the new sections name, which might confuse the reader.

is there something to evoke the pagestyle only for the next and following pages? or should simply put a \newpage and save me struggle..

1 Answer 1

2

The afterpage package and its eponymous \afterpage macro may be what you want:

% in the preamble:
\usepackage{afterpage}
...
% inside the document environment:
\afterpage{%
    \fancyhead[L]{\sffamily\leftmark{} - first list}
    \pagestyle{fancy}}
...

As you can probably guess, the arguments of \afterpage are executed at the start of the next page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .