2

I have to put such frame on the first ToC page, and such one on the rest of ToC pages (a thesis requirement). As i generate ToC via \tableofcontents, i have to clue how to reach that.

I have that frames as PDFs, so i may use wallpaper/graphicsx/whatever package to depict them. The problem is: how to make LaTeX place frames in the required way?

NB: currently my ToC is 4 pages long, that's why i need in a general solution: \tableofcontents --> p1 f#1, p2 f#2, p3 f#2, p4 f#2, ...

lockstep
  • 250,273
  • Do you use any packages for headers and footers? Do you use a class like scrreprt? You can define a special footer for the chapter page and a pagestyle for the rest. – Marco Daniel Jun 03 '11 at 13:51
  • @Marco Don't understand how that my help. I do not need another chapter page, i need to change how ToC is generated only. (I use extarticle class and standard \pagestyle{myheadings} if any.) – Maxim Vuets Jun 03 '11 at 14:02

1 Answers1

1

In the following example, I use the scrpage2 package (part of KOMA-script) to define different sets of page styles for the ToC and the rest of the document. You probably have to adjust the "rest-of-document" header and footer according to your needs (which you didn't specify). Also note that the information you gave in your comment (documentclass extarticle) was crucial, because a class without the \chapter command in your case requires manually forcing thispagestyle{scrplain} for the first ToC page.

\documentclass{extarticle}

\usepackage[automark]{scrpage2}
\pagestyle{scrheadings}

\begin{document}

% In the following code, \rule{8cm}{1cm} stands for the header of the first ToC page
%     (with page style scrplain), \rule{4cm}{1cm} for the header of the other ToC pages
%     (with page style scrheadings)
\clearscrheadfoot
\chead[\rule{8cm}{1cm}]{\rule{4cm}{1cm}}
\cfoot{\pagemark}
\setlength{\headheight}{36pt}

\thispagestyle{scrplain}
\tableofcontents

% Redefine scrheadings and scrplain for the rest of the document
\clearpage
\clearscrheadfoot
\chead{\headmark}
\cfoot{\pagemark}
\setlength{\headheight}{12pt}

\section{foo}

% Force a page break in the ToC
\addtocontents{toc}{\protect\clearpage}

\section{bar}

\end{document}
lockstep
  • 250,273
  • I asked him whether he is using a package such scrpage2 or not. Do you see his answer? – Marco Daniel Jun 03 '11 at 15:05
  • @Marco: I saw it, but contrary to the use of a particular document class or (perhaps) the use of a particular package, I do not consider the fact that a questioner is not using a particular package as a binding constraint for an answerer, unless the questioner expressly says so ("I want a solution that doesn't rely on a package for customizing header and footer"). – lockstep Jun 03 '11 at 15:10
  • This hack helped after some adoptation. Thanks a lot, wizards (: – Maxim Vuets Jun 04 '11 at 10:55