Display "Part I" instead of "I" in the table of content

31 views
Skip to first unread message

Hong-Ye Hu

unread,
Jan 28, 2022, 1:46:46 PM1/28/22
to ucsd-thesis
Dear authors, 
  I really appreciate your effort in providing this excellent template. The UCSD Graduate Division ask me to change the display of parts from "I,II" to "Part I, Part II” in table of content. In the main text, it shows "Part I", so it is good.
  I didn't know how to add the word "Part" for table of content. I wish you can help me!
Bests,
Hong-Ye

Weijian Xu

unread,
Feb 23, 2022, 1:44:03 PM2/23/22
to ucsd-thesis
I was also told to add Part in table of content during preliminary appointment. Have you found a solution?

Best,
Weijian

Weijian Xu

unread,
Feb 23, 2022, 2:03:10 PM2/23/22
to ucsd-thesis
I found a hack to add Part in ToC:

Search 
#1\hfil \hbox to\@pnumwidth{\hss #2}}\par
in ucsd.cls, and replace it by
Part #1\hfil \hbox to\@pnumwidth{\hss #2}}\par

The surrounding code should be:
\def\l@part#1#2{\addpenalty{-\@highpenalty}%
   \addvspace{2.25em plus\p@}% space above part line
   \begingroup
   \@tempdima 3em         % width of box holding part number, used by
     \parindent \z@ \rightskip \@pnumwidth             %% \numberline
     \parfillskip -\@pnumwidth
     {\large \bfseries          % set line in boldface
     \leavevmode          % TeX command to enter horizontal mode.
    %  #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
     Part #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
     \nobreak             % Never break after part entry
    \global\@nobreaktrue                        %% Added 24 May 89 as
    \everypar{\global\@nobreakfalse\everypar{}}%% suggested by
                                               %% Jerry Leichter
   \endgroup}

Hope it helps.

Best,
Weijian

Reply all
Reply to author
Forward
0 new messages