19

Although `I wouldn't normally do this', I'm writing a short(ish) document for which I'd like to place a small TOC in two columns as the last thing on the title page.

In single column mode it works fine. However, when I specify \twocoltocetc, I get a new page. Here's an MWE:

\documentclass[10pt,a4paper]{memoir}
\twocoltocetc
\begin{document}
\frontmatter
\title{Something or other}
\author{H.I.M. Self}
\maketitle
\tableofcontents*
\mainmatter
\chapter{Introduction}
\chapter{First chapter}
\section{First section}
\end{document}

What, if anything, must I do to fix this?

lockstep
  • 250,273

4 Answers4

20

A quick way is temporarily disabling \clearpage for the table of contents which prevents that page break:

\begingroup
\let\clearpage\relax
\tableofcontents*
\endgroup

After that group, \clearpage has the original meaning.

Stefan Kottwitz
  • 231,401
6
\documentclass[10pt,a4paper]{memoir}
\usepackage{multicol}
\makeatletter
\renewcommand\tableofcontents{%
\begin{multicols}{2}[
    \section*{\huge\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}]
    \@starttoc{toc}%
\end{multicols}}
\makeatother
\begin{document}
\frontmatter
\title{Something or other}
\author{H.I.M. Self}
\maketitle
\tableofcontents
\mainmatter
\chapter{Introduction}
\chapter{First chapter}
\section{First section}
\end{document}
1

Not sure if this is more pure or not. It might just be abuse of innocent memoir ToC-formatting commands. And if you're looking to have a title followed by the first part of the ToC in column one, this won't work (use one of the other answers). But if you want a narrower ToC to the right of the narrow title block, this could be used.

enter image description here

\documentclass[10pt,a4paper]{memoir}
\twocoltocetc
\begin{document}
\frontmatter
\title{Something or other}
\author{H.I.M. Self}
\date{\today}

\renewcommand{\tocheadstart}{
{\beforepartskip \centering
{\Huge\bfseries\thetitle} \par
{\Large\theauthor} \par
{\Large\thedate} \afterpartskip
\newpage}
}
\tableofcontents*
\mainmatter
\chapter{Introduction}
\chapter{First chapter}
\section{First section}
\end{document}
Mike Renfro
  • 20,550
0

Although six years have elapsed since the question was asked, I want to provide a memoir solution with an index after the title that does not force a page break. This variant includes the excellent idea of Herber using the multicol package, so that the index is two columns. I add that the text is two columns, with a separating line, for a good visual appearance (in my opinion), but that can also be used with a column layout.

\documentclass[article,12pt,twocolumn]{memoir}

% Herber's solution
\usepackage{multicol}
\makeatletter
\renewcommand\tableofcontents{%
\begin{multicols}{2}[
    \section*{\huge\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}]
    \@starttoc{toc}%
\end{multicols}}
\makeatother

% My proposal
\renewcommand{\maketitlehookd}[1]{\twocoltocetc\tableofcontents
{{ }\hfill\rule{0.618\linewidth}{1.25pt}\hfill{ }}}

\begin{document}
%\frontmatter
\title{Something or other}
\author{H.I.M. Self}
\maketitle
%\tableofcontents
%\mainmatter

\chapter{Introduction 1}
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

\section{First section}
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

\section{Second section}
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

\chapter{Introduction 2}
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

\section{First section}
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

\section{Second section}
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx 
xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx xxxxx xxxxxx xxxxxx 

\end{document}
djnavas
  • 411