[MiKTeX] Re: MiKTeX-Users digest, Vol 1 #136 - 11 msgs
MiKTeX source code moved to GitHub
Brought to you by:
csc
From: <ar...@so...> - 2002-11-29 20:32:27
|
> From: "Philip G. Ratcliffe" <phi...@ti...> > To: <mik...@li...> > Subject: Re: [MiKTeX] Changing the Table of contents > Date: Fri, 29 Nov 2002 13:23:20 +0100 > Reply-To: mik...@li... > > > 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 > Thanks a lot!!! -- Andrés Rosado-Sepúlveda Electrical Engineering Student University of Puerto Rico, Mayagüez Campus E-mail: an...@ie... |