Page LayoutMemoir class, contents formatting

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
twesslen
Posts: 6
Joined: Thu Feb 03, 2011 9:17 pm

Memoir class, contents formatting

Post by twesslen »

I am using the memoir class to format my thesis, with a format similar to the memoir documentation sample thesis. The requirement for my university requires that the table of contents be spaced as in the attachment "Required Format." Also attached as "Current Format" is what my contents look like. Its close, but it looks like algorithmically, I need to doublespace after a change in the section level, i.e. after changing from chapter to section and from section to subsection, but if a level repeats, it should be single spaced.

A minimum working example is:

Code: Select all


\documentclass{memoir}

\begin{document}
\maxtocdepth{subsubsection}
\tableofcontents

\chapter{Chapter One}
\section{Section A}
\section{Section B}
\subsection{Subsection a}
\subsection{Subsection b}

\chapter{Chapter Two}
\section{Section A}
\section{Section B}
\section{Section C}


\end{document}

which gives the output seen in the attachment "MWE." Any help is greatly appreciated.
Attachments
MWE
MWE
Screen shot 2011-05-19 at 9.07.54 PM.jpg (36.06 KiB) Viewed 2440 times
Current Format
Current Format
Screen shot 2011-05-19 at 9.03.42 PM.jpg (115.41 KiB) Viewed 2440 times
Required Format
Required Format
Screen shot 2011-05-19 at 9.03.10 PM.jpg (87.38 KiB) Viewed 2440 times
Last edited by twesslen on Wed May 25, 2011 7:14 pm, edited 1 time in total.

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: 10329
Joined: Mon Mar 10, 2008 9:44 pm

Memoir class, contents formatting

Post by Stefan Kottwitz »

Hi,

the requirement is a bit strange and perhaps hard to implement. Spacing before sections, for example, would be easy to set, such as

Code: Select all

\setlength{\cftbeforesectionskip}{\cftbeforechapterskip}
You could do it manually, if necessary, using \addtocontents, such as by

Code: Select all

\chapter{Chapter One}
\addtocontents{toc}{\vspace{\cftbeforechapterskip}}
\section{Section A}
Stefan
LaTeX.org admin
Post Reply