1

I am using solution from Fixed top margin on normal text but after adding ToC it behaves strange.

First problem is that the \contentsname of ToC has different style than other chapters. What can I do to have same style?

Second problem is that the ToC page is shifted down.

\documentclass[oneside, 11pt]{memoir}
\pagestyle{plain}

\usepackage[top=5cm,bottom=3cm,heightrounded]{geometry}
\makeatletter
\def\@makechapterhead#1{%
\vbox to 0pt{%
\vss
\parindent \z@ \raggedright \normalfont
\Large \bfseries #1\par\nobreak
\vskip 40\p@
}%
\vspace{-\baselineskip}%
}
\def\@makeschapterhead#1{%
\vbox to 0pt{%
\parindent \z@ \raggedright
\normalfont
\Large \bfseries  #1\par\nobreak
\vskip 40\p@
}%
\vspace{-\baselineskip}%
}
\makeatother

\usepackage{lipsum}

\begin{document}

\chapter{chapter}
\lipsum[1-9]

\newpage
\tableofcontents

\end{document}

enter image description here

enter image description here

enter image description here

1 Answer 1

1

The ToC, LoF and LoT titles are set like a \chapter* The following modification of your MWE just adjusts the location and size of the ToC title (read section 9.2.1 Changing the titles in the manual).

% titleoftocprob.tex  SE 619689

\documentclass[oneside, 11pt]{memoir}
\pagestyle{plain}

\usepackage[top=5cm,bottom=3cm,heightrounded]{geometry}
\makeatletter
\def\@makechapterhead#1{%
\vbox to 0pt{%
\vss
\parindent \z@ \raggedright \normalfont
\Large \bfseries #1\par\nobreak
\vskip 40\p@
}%
\vspace{-\baselineskip}%
}
\def\@makeschapterhead#1{%
\vbox to 0pt{%
\parindent \z@ \raggedright
\normalfont
\Large \bfseries  #1\par\nobreak
\vskip 40\p@
}%
\vspace{-\baselineskip}%
}
\makeatother

\usepackage{lipsum}

\begin{document}

\chapter{chapter}
\lipsum[1-9]

\newpage
%%%%%%%%%%% change the loaction and size of the ToCtitle
\renewcommand{\tocheadstart}{\vspace*{-60pt}}
\renewcommand{\printtoctitle}{\Large\bfseries}
\tableofcontents

\end{document}

Alternatively you could redefine how a \chapter* is set to match how you redefined the \chapter settings.

2
  • Thank you Peter. It looks very good. It solves the ToC title style and position. There is one small think. The vertical space between ToC title and ToC 'content' is bigger than space under chapter. Is possible to customize this space somehow?
    – kolisko
    Oct 21, 2021 at 18:51
  • @kolisko Yes, Read the manual. Oct 22, 2021 at 17:21

You must log in to answer this question.

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