Page LayoutTOC space between title and "Page"

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
cjtex
Posts: 3
Joined: Sun Apr 22, 2012 6:39 pm

TOC space between title and "Page"

Post by cjtex »

Hello,

I am trying to control the space between the TOC Title ("Table of Contents") and the first line which has the word "Page". It appears to be variable based on the number of entries in the table of contents. I need to limit it to one line (in this case double-spaced).

Attached is the class file I am working with that controls the general page setings and the TOC information.

Thanks for your help in advanced...

C.
Attachments
uathesis.cls
(19.55 KiB) Downloaded 250 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

TOC space between title and "Page"

Post by Stefan Kottwitz »

Hi,

welcome to the board!

This class requires a file thesis12pt.clo. To be able to check class and option file together, we need that. Usually the best way for getting a solution is posting a Infominimal working example, which shows the problem. Only the class file itself is quite theoretically.

Stefan
LaTeX.org admin
cjtex
Posts: 3
Joined: Sun Apr 22, 2012 6:39 pm

TOC space between title and "Page"

Post by cjtex »

Thanks Stefan,

I apologize for not including dependencies and such and I inherited the source so I'm not 100% proficient with its use. I'd attach the file, but the forum is telling me that the extension .clo is not allowed.

However I was able to produce the desired results by simply inserting a vskip with a negative value. If you look at the .cls file you will eventual find the table of contents calls. I modified the TOC, LOF and LOT code sections by adding a vskip between the call to chapter* and the posting of the text "page"

It is probably not the most elegant solution, but it is working. Plus it has the advantage of only changing such space for the TOC, LOF and LOT header/title. In fact, the LOF was generating a blank page for some reason. It just so happened that I had the exact number of entries to cause TeX to create a page for the ghost whitespace and this fix added enough paper space for it to not do that...

Again thanks everyone,
Chris

Code: Select all

\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\tableofcontents}{%
  \if@twocolumn
  \@restonecoltrue\onecolumn
  \else
  \@restonecolfalse
  \fi
  \chapter*{\normalsize \contentsname
    \@mkboth{%
      \MakeUppercase{\contentsname}}{\MakeUppercase{\contentsname}}}%
  [i][b][u]\vskip-3em[/u][/b][/i]
  \hfill Page \relax \newline%
  \@starttoc{toc}%
  \if@restonecol\twocolumn\fi
}
Last edited by cjtex on Mon Apr 23, 2012 9:16 pm, edited 2 times in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

TOC space between title and "Page"

Post by Stefan Kottwitz »

Hi Chris,
cjtex wrote:I'd attached the file, but the forum is telling me that the extension .clo is not allowed.
good to know, I added .clo to the text file types, which are allowed. On this occasion, I did the same for .lco (letter class options), .ldf (language definition files, babel) and .mf (metafont), many more are already registered.
cjtex wrote:However I was able to produce the desired results by simply inserting a vskip with a negative value. If you look at the .cls file you will eventual find the table of contents calls. I modified the TOC, LOF and LOT code sections by adding a vskip between the call to chapter* and the posting of the text "page"
If it works for you, fine. In general, I would redefine the command which produces unnumbered headings. In standard classes and in uathesis, it is \@makeschapterhead:

Code: Select all

\def\@makeschapterhead#1{%
  \vspace*{72\p@}%
  \vspace*{-\baselineskip}%
  {\parindent \z@ \centering%
    \normalfont%
    \interlinepenalty\@M%
    \MakeUppercase{#1} \par\nobreak%
    \vskip 40\p@
  }
}
I would use \renewcommand and use different values for \vskip or \vspace, respectively.

Stefan
LaTeX.org admin
cjtex
Posts: 3
Joined: Sun Apr 22, 2012 6:39 pm

Re: TOC space between title and "Page"

Post by cjtex »

Thanks for the code.

For thoroughness I'm attaching the .clo file
Attachments
thesis12pt.clo
(1.47 KiB) Downloaded 222 times
Post Reply