3

Background: I'm using the amsbook environment, and the title created by \tableofcontents starts near the first quarter of the page by default. I've been trying to move it up by placing a \vspace{-3in} before \tableofcontents, but it didn't do anything. Then I tried \vspace*{-3in} and not only did it not work, it also inserted two blank pages (or 1, if I use the oneside parameter for amsbook) before the table of contents. I tested it with positive numbers too and observed the same behaviour.

Everything worked, however, when I changed from amsbook to article.

Question: How I can use vspace with a negative value to move my table of contents up in the amsbook environment, without creating new pages. My table of contents is supposed to start on a new page.

Other things I've tried: Instead of using a plain \vspace right before \tableofcontents, I've also tried

\usepackage{etoolbox}
\patchcmd{\tableofcontents}{\@starttoc}{\clearpage\vspace{-3in}\@starttoc}{}{}

which also didn't do anything, and created a new page when I added the *.

Code:

\documentclass[12pt]{amsbook}

\begin{document}
  \tableofcontents
\end{document}
\documentclass[12pt]{amsbook}

\begin{document}
  \vspace{-3in}
  \tableofcontents
\end{document}

Both of the code blocks above produced this

a page with a blank toc

\documentclass[12pt]{amsbook}

\begin{document}
  \vspace*{-3in}
  \tableofcontents
\end{document}

This produced

three blank pages with a blank toc

4
  • the table of contents starts in the same place as other unnumbered chapters (try with \chapter*{something}). To change this you would have to adapt \@makeschapterhead Jan 17 at 8:44
  • @Ulrike Fischer Thank you for replying. I understanding this is diverging from the original question, but since I'm quite new to latex, do you mind elaborating or providing a link on how I can adapt \@makeschapterhead to move my table of contents up please? Jan 17 at 8:54
  • Why do you use the class if you don't like their design decisions? It is rather special and adapted to the ams needs. A class like book or scrbook or memoir can be changed more easily. Jan 17 at 8:58
  • I like all of the other stylings that amsbook has. The only design in amsbook I want to change is the toc top margin. I thought it would be easier to change this one thing than to change the styling of everything else like the chapter, section, subsection... etc Jan 17 at 9:02

2 Answers 2

2

You may want to treat the chapters initiated by \tableofcontents, \listoffigures and \listoftables in a different fashion.

\documentclass[oneside]{amsbook}
\usepackage{xpatch}
\usepackage{showframe}% just for showing the placement

\makeatletter
\xpatchcmd{\@starttoc}{\@makeschapterhead}{\special@makeschapterhead}{}{}
\let\special@makeschapterhead\@makeschapterhead
\xpatchcmd{\special@makeschapterhead}{7.5pc}{0pt}{}{}
\makeatother

\begin{document}

\frontmatter

\tableofcontents

\mainmatter

\chapter{Test title}

\end{document}

I use oneside just to show the relative placements in a smaller picture; also showframe is used to display the text block boundaries.

enter image description here

2

You can try this. It will affect all unnumbered chapter! Adapt the 10pt to your needs.

\documentclass[12pt]{amsbook}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@makeschapterhead{7.5pc}{10pt}{}{\fail}
\makeatother
\begin{document}
  \tableofcontents
  \chapter*{something}
\end{document}
1
  • Thank you very much. This worked, and luckily I don't have any other unnumbered chapters :) Sorry I can't upvote you as I don't have 15 reputation yet. Jan 17 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.