I'm sure there's a better way to do this, but this was the only one I 
could come up with. What you have to do is find the style file for the 
documentclass you are using. That's either a .sty or .cls file in your 
texmf directory, usually texmf/tex/latex/base/*.cls. Then within that 
file search for a line like this:

"\addcontentsline{toc} {part}"

Copy the section starting with \def that includes that line and paste it 
in your document's preamble. What you want to do is add "\partname~" 
right before "\thepart" The following is an example of what's in my 
preamble for a koma-script document:

-------------------------
\def\@part[#1]#2{%
     \ifnum \c@secnumdepth >-2\relax
       \refstepcounter{part}\@maybeasf%
 
\addcontentsline{toc}{part}{\protect\numberline{\partname~\thepart}#1}%
     \else
       \addcontentsline{toc}{part}{#1}%
     \fi
     \chaptermark{}
     {\centering
      \interlinepenalty \@M
      \normalfont
      \ifnum \c@secnumdepth >-2\relax
        \size@partnumber\sectfont\partformat
        \par
        \vskip 20\p@
      \fi
      \size@part\sectfont #2\par}%
     \@endpart}
-------------------------

You will also need to copy another portion of the definition to your 
preamble so the "Part I." and the title for that part don't overlap. 
After modifying a few things, this is what I came up with. The change 
was made in the "\setlength\@tempdima{5em}", it used to be 2.25em.

-------------------------
\renewcommand*\l@part[2]{%
   \ifnum \c@tocdepth >-2\relax
     \addpenalty{-\@highpenalty}%
     \addvspace{2.25em \@plus\p@}%
     \setlength\@tempdima{5em}%  <------ Change here
     \begingroup
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       \leavevmode\sectfont\large
       \advance\leftskip\@tempdima
       \hskip -\leftskip
       #1\nobreak\
        \leaders\hbox{$\m@th
         \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
         mu$}\hfil\nobreak\hb@xt@\@pnumwidth{\hss #2}\par
       \penalty\@highpenalty
     \endgroup
   \fi}
-------------------------

Well, I hope that helps. The solution is ugly, but it's the only one 
this newbie could come up with.

If any of you LaTeXperts read this and know of a shorter, more elegant 
way to do this, please let me know.

Regards,

Roberto


Tony Dancer wrote:

> Hello,
> 
> I really am sorry for posting this, as I suspect it is an FAQ. However,
> I can't find any record of it in the digests.
> 
> I have a thesis using report style, and want to make the TOC look
> different.
> 
> Specifically, `Part' just reads I, II etc, and I would like it to say
> Part I. 
> 
> Can anyone tell me how do I do this?
> 
> Thanks
> Tony
> 
> ----------
>  
> Question: Is it better to abide by the rules until they're changed or
> help speed the change by breaking them?
> 
> 
> 




Reply via email to