Re: [MiKTeX] Changing the Table of contents
MiKTeX source code moved to GitHub
Brought to you by:
csc
From: Philip G. R. <phi...@ti...> - 2002-11-29 12:23:59
|
> However, I need it to look like this > > Contents > Section \t Page > {Sections} \t {Page number} > ... > > > With Section and Page explicitly written in the top. I have tried to hack Here's a quick (very) and dirty (very) hack that should more-or-less solve your problem. Cut it out and paste it into a file you can call, say, "tocheader.sty". Then input it into your main file using the usual \usepackage{tocheader.sty} in the preamble. %----------------------------cut here-------------------------------- \RequirePackage{afterpage} % This is the header line itself (the alignment may need adjusting) \def\tocheader{% \hfill\hbox to 0pt{\hss \hbox to \textwidth{\hspace*{2pt}Section \hfill Page\par}% } } % This adds the header line to successive pages \def\runtocheader{\afterpage{\tocheader\runtocheader}} \renewcommand\tableofcontents{% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse \fi \chapter*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% %%% begin added lines \tocheader \runtocheader %%% end added lines \@starttoc{toc}% %%% begin added lines \let\tocheader\relax \let\runtocheader\relax %%% end added lines \if@restonecol\twocolumn\fi } %----------------------------cut here-------------------------------- N.B. This is hacked from book.cls; if you use a different class, you may need to rehack the equivalent command there. Cheers, Phil Ratcliffe |