0

In formatting my Ph.D thesis (report document class) it is required that the first page of the TOC ("Table of Contents") contains just a page number and a "Page" located at the right-lower side of the "Table of Contents", while in the subsequent page of TOC, there should be a CHAPTER header right aligned and Page header left aligned on top of each subsequent page in the TOC. However, the use of \fancyhf combined with \addtocontents{toc}{\protect\thispagestyle{empty} eliminates the page number in the first page of TOC (which I want to preserve). I also tried to change \addtocontents{toc}{\protect\thispagestyle{empty} to \addtocontents{toc}{\protect\thispagestyle{plain} but in that case the first page also contains the "CHAPTER header right aligned and Page header left aligned" which I only want to enforce starting from the second page of my TOC (my TOC is a 3-pages TOC). Is there a way to achieve my desired formatting requirement? Thank you for your help and this issue has driven me crazy... Edit: I have to make sure that the "TABLE OF CONTENTS" should only appear at the first page of TOC... Not in the subsequent pages of TOC....

{\addtocontents{toc}{\protect\thispagestyle{empty}}
\fancyhf{}
\fancyfoot[C]{\thepage}
\rhead{Page}
\lhead{CHAPTER}
\tableofcontents}
%\afterpage{\cfoot{\thepage}}
\addtocontents{toc}{~\hfill Page\par}

I also attached the relevant generated first page of the TOC below. The ideal situation is that I can make the first picture below to have the number iii located at the bottom center of the first page of TOC. enter image description here enter image description here


Edit: Using the idea provided by Pieter van Oostrum, I got the followings. However, it is required that "The margin should be 1 inch at the top of pages iii-xiv. The headers should be below, just touching the 1 inch margin line." May I know how can I adapt Pieter van Oostrum's code so that this requirement is fulfilled as well? Thanks! enter image description here enter image description here enter image description here enter image description here

6
  • Just removing the \addtocontents{toc}{\protect\thispagestyle{empty} or any variant thereof and not redefining pagestyle plain should give you only the page number on the first page of the TOC. Mar 22, 2022 at 6:53
  • As I said, if I simply remove that line I got the same thing as shown in the second picture above. i.e., the CHAPTER left header and the Page right header wil show up in the first page of TOC... Mar 22, 2022 at 6:58
  • OK, then this must be a peculiarity of the thesis class. Which class are you using? And I'll look into this later. Mar 22, 2022 at 7:12
  • There is a \usepackage{asudis} line which uses the asudis.sty file (which can be googled, see for instance here github.com/shumway/asudis/blob/master/asudis.sty) Thank you very much! Mar 22, 2022 at 7:15
  • Dear Fei: I feel that you can request your University to hand you a sample LaTeX document of any of their accepted PhD dissertations and you work with that model! Best wishes..
    – Dr. Sundar
    Mar 22, 2022 at 7:22

2 Answers 2

1

Is this what you want?

d

Using the code of previous answer now start your document as

\begin{document}
    \renewcommand{\contentsname}{\normalsize  \centering TABLE OF CONTENTS \par \medskip \hfill Page} % ToC title

    \pagestyle{TOC} % use TOC style
    \pagenumbering{roman} % roman numbering
    \setcounter{page}{3} % start with iii
    \tableofcontents

    \cleardoublepage% needed to start a new style<<<
    
    \addcontentsline{toc}{chapter}{LIST OF FIGURES} % this title to to add to ToC
    \pagestyle{FIG}% use FIG style
    \listoffigures

    \cleardoublepage% needed to start a new style<<<
    
    \pagenumbering{arabic}
    \pagestyle{plain}
6
  • Hello I actually didn't get what I want (as you showed), with your code everything looks even worse in my document... As I said my TOC is a 3-pages TOC but the layout of the first page is different from the subsequent pages of TOC... Mar 22, 2022 at 6:15
  • Also even if you used \renewcommand I didn't see where it is used... Mar 22, 2022 at 6:22
  • @Fei Cao Thank you for your feedback. To advance in the solution: (1) If you compile just my answer in your system you get the desired result for the ToC and LoF? (2) Do you mind if I provide you with a replacement package asudis later? Mar 23, 2022 at 14:13
  • Dear Simon, thank you very much! Pieter van Oostrum's code already helped me a lot so I guess until the dissertation formatting team informs me that further modifications are necessary I do not plan to touch that anymore, I have just thrown too much time on it... Mar 23, 2022 at 22:06
  • @Fei Cao Glad you find a solution. Thank you for your feedback and good luck with your thesis! Mar 23, 2022 at 22:15
1

EDIT: I have adapted the spacing and the headers on following TOC pages. Experiment with the numbers in two the lines indicated with <<<<<<<<<<<<<<< to adjust to the requirements or your taste.

The package asudis does some weird things with the layout of the TOC. It uses \pagestyle{fancyplain} which is deprecated. And then it changes the headers in the second page with \afterpage, but not on the following pages. This is done in the macros \@cfttocstart and \@cfttocfinish so I disable these and use my own code.

This is a minimal example that uses the rest of asudis.sty but with my header definitions for the TOC. You may use similar code for the list of tables/figures if you want.

\documentclass[12pt,letterpaper]{report}
\usepackage{natbib}
\usepackage[headheight=15pt]{geometry}
\usepackage{fancyhdr}
\usepackage{afterpage}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsbsy}
\usepackage{dcolumn,array}
\usepackage{tocloft}
\usepackage{asudis}
\usepackage[pageanchor=true,plainpages=false,pdfpagelabels,bookmarks,bookmarksnumbered]{hyperref}

\newcommand\LB[1]{\raisebox{-\baselineskip}[0pt][0pt]{#1}} % not used anymore
\fancyhf{}

\fancypagestyle{toc}{
  \fancyhead[L]{CHAPTER}
  \fancyhead[R]{Page}
  \fancyfoot[C]{\thepage}
}
\usepackage{blindtext}

\makeatletter
\renewcommand{\@cfttocstart}{%
  \newgeometry{top=1.0in,hmargin=1.25in,height=9.0in,includehead,includefoot}% <<<<<<<<<<<<<<
  \doublespace
}
\renewcommand{\@cfttocfinish}{\restoregeometry}
\makeatother

\begin{document}
\pagenumbering{roman}
\title{Your Title Goes Here}
\author{Your name}
\maketitle
\newpage
\mbox{}
\cleardoublepage
\pagestyle{toc}
\doublespace
\addtocontents{toc}{~\hfill Page\\[-0.3in]\par} %<<<<<<<<<<<<<<
\tableofcontents
\newpage
\pagestyle{fancy}
\fancyhf{}

\blinddocument
\blinddocument
\blinddocument
\blinddocument
\blinddocument

\end{document}

enter image description here enter image description here

5
  • Hello, unfortunately this is not I want, the "TABLE OF CONTENTS" should only appear at the first page of TOC... Not in the subsequent pages of TOC.... Mar 22, 2022 at 16:15
  • Just remove the \fancyhead[C]{\contentsname} Mar 22, 2022 at 16:40
  • Thank you, I will upload the document to see if the "dissertation format team" is OK with this version. In my look, the spacing between the "FIGURE" header ("Page" header as well) and the top content in the LIST OF FIGURES are slightly different across different pages of LIST OF FIGURES (the first page of LIST OF FIGURES has a larger/normal spacing while starting from the second page the spacing is a little bit narrow). If they are OK with this version I will accept your answer, thanks! Mar 22, 2022 at 17:55
  • Thanks! Can you also adjust the spacing issue? The staff in our University want "The margin should be 1 inch at the top of pages iii-xiv. The headers should be below, just touching the 1 inch margin line." Thank you so much! Mar 22, 2022 at 20:32
  • 1
    I have edited to code to get the new spacing. You can adjust the numbers to get things right if it still isn't good enough. Mar 22, 2022 at 22:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .