Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The word "Page" required at the top of each page of ToC, LoT, etc. #17

Open
lr0029 opened this issue Sep 8, 2021 · 7 comments
Open

Comments

@lr0029
Copy link

lr0029 commented Sep 8, 2021

Hello, It seems ASU now requires the word 'Page' above the topmost page number on each page of the Table of Contents. The current template file includes code which puts 'Page' at the top of the first page, but not any subsequent pages.

@neonjelly64
Copy link
Collaborator

Hi @lr0029 . As you can tell, we're not super super active on this repo, but I do try to jump in and help when I can. Did you resolve this yet? –Joel

@lr0029
Copy link
Author

lr0029 commented Nov 17, 2021 via email

@imanprs
Copy link

imanprs commented Jun 1, 2022

Could you please share your solution?
I have a similar problem. on the second page I get "Table of contents" on both right- and lef-hand sides of the header and then nothing on the third page.

@neonjelly64
Copy link
Collaborator

Hi @imanprs. Since @lr0029 didn't provide their solution via a pull request for example, I don't know what the solution was. I'm happy to help if you provide a minimal working example of the problem. –Joel

@imanprs
Copy link

imanprs commented Jun 1, 2022

Thank you Joel.
I am not sure how I should make a minimal working example, so sorry if this doesn't help. I currently have the following in my main file.

\tableofcontents
\addtocontents{toc}{~\hfill Page\par}
\newpage
\addcontentsline{toc}{part}{LIST OF TABLES}
\listoftables
\addtocontents{lot}{Table~\hfill Page \par}
\newpage
\addcontentsline{toc}{part}{LIST OF FIGURES}
\addtocontents{toc}{CHAPTER \par}
\addtocontents{lof}{Figure~\hfill Page \par}
\listoffigures

In the asudis.sty, this is what I think is the relevant part.

% Fix the table of contents
%
%
% Get leader dots right.  They should all be spaced the same and need to be
% added for chapters and parts.
%
\renewcommand{\cftchapdotsep}{1.7}
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftpartdotsep}{1.7}
\renewcommand{\cftpartleader}{\cftdotfill{\cftpartdotsep}}
\renewcommand{\cftsecdotsep}{1.7}
\renewcommand{\cftsubsecdotsep}{1.7}
\renewcommand{\cfttabdotsep}{1.7}
\renewcommand{\cftfigdotsep}{1.7}
%
% Fonts for the chapter titles and part titles.
%
\renewcommand{\cftchapfont}{\rm}
\renewcommand{\cftpartfont}{\rm}
\renewcommand{\cftchappagefont}{\rm}
\renewcommand{\cftpartpagefont}{\rm}
%
% Indentations: These are in accordance with the chart at the top of page 4 of
% the document
% ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf
% I simply moved each of the following sections "up" one level to get the
% indentations right.
%
\cftsetindents{chapter}{1.5em}{1.5em}
\cftsetindents{section}{3.0em}{2.3em}
\cftsetindents{subsection}{5.3em}{3.2em}
%
% Spacing between entries is taken care of by the double-spacing in this 
% section, so no need for extra space before chapter or part entries.
%
\setlength{\cftbeforepartskip}{0truept}
\setlength{\cftbeforechapskip}{0truept}
%
% Get the title for the TOC normal sized, centered, and at the right height.
%
\setlength{\cftbeforetoctitleskip}{-64.0truept}
\setlength{\cftaftertoctitleskip}{0truept}
%
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\cfttoctitlefont}{\hfill\normalsize\rm}
\renewcommand{\cftaftertoctitle}{\hfill}
%
\newcommand{\cftlabel}{CHAPTER}
%
% Get rid of the header underline.
\renewcommand{\headrulewidth}{0pt}
%

%\def\pagethreshold{6}

% Get the header on subsequent pages right.
\renewcommand{\@cfttocstart}{ 
\newgeometry{top=1.0in,hmargin=1.25in,height=9.0in,
includehead,includefoot,letterpaper}%,showcrop,showframe}

\doublespace
\pagestyle{fancyplain}
   \afterpage{\lhead{}\rhead{Page}}
%\afterpage{\lhead{\cftlabel}\rhead{Page}}
}

\renewcommand{\@cfttocfinish}{
\restoregeometry\clearpage\afterpage{\lhead{}\rhead{}}
}

@imanprs
Copy link

imanprs commented Jun 1, 2022

It seems like I was able to find a way to circumvent the issue. I manually added a \pagestyle{fancy} before the tables and later redefined to make the headers blank.

\renewcommand{\cftlabel}{CHAPTER}
\pagestyle{fancy} \lhead{\cftlabel} \rhead{Page}
\tableofcontents
\addtocontents{toc}{~\hfill Page\par}
\newpage
\addcontentsline{toc}{part}{LIST OF TABLES}
\renewcommand{\cftlabel}{Table}
\listoftables
\addtocontents{lot}{Table~\hfill Page \par}
\newpage
\addcontentsline{toc}{part}{LIST OF FIGURES}
\addtocontents{toc}{CHAPTER \par}
\addtocontents{lof}{Figure~\hfill Page \par}
\renewcommand{\cftlabel}{Figure}
\listoffigures

\newpage
%-----------------------body
\doublespace
\pagenumbering{arabic}
\fancyhead{}
\include{chapter1}
\include{chapter2}
\include{chapter3}

@neonjelly64
Copy link
Collaborator

Nice! I just tried it out on a more-or-less blank dissertation and it seems to do the trick. I'll see if I can implement it in the asudis style file and make a pull request. Good work around. –Joel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants