I am writing a paper for my candidacy exam. I am using book
class, but I want my name and the title to appear on the first page with the Table of Contents instead of appearing in a sepearte page. How can I do that?
Any help is appreciated.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communitythere are several possible solutions:
Use a different class. article
or scrartcl
would be good place to start. Can not remember if a report
class would do what you want.
Redefine \maketitle
\makeatletter
\renewcommand{\maketitle}{%
\begin{center}
\vspace{2em}
\sffamily\LARGE \@author \\
\vspace{1em}
\Huge \@title \\
\vspace{1em}
\normalfont \@date \\
\vspace{2em}
%include any more variables, which are needed for a title page.
\end{center}
}
\makeatother
This should redefine \maketitle
, so that it would be possible to put \tableofcontents
on the same page. You should play a bit more to get the spacings right.
On how to create custom title pages you should read the LaTeX Wikibook
EDIT: I edited it to fix some silly typos, but It did not achieve what was wanted. the command Table of Contents is clearing a double page, which is making everything worse.
Take a glimpse to the KOMA Script document classes, the scrbook
class is much more flexible and it might be possible to customize it to fit your requirements without implementing any ugly hacks.
\HUGE
command. Change it to regular latex command \Huge
As an addition to the previous answer: you can also use a minipage environment, that works for me in the scrbook documentclass:
\documentclass{scrbook}
\title{Title-Page plus Contents}
\subtitle{tex.stackexchange.com example}
\author{Author}
\date{31 March 2018}
\begin{document}
\begin{minipage}{\linewidth}
\maketitle
\end{minipage}
Here goes other contents like the TOC.
\end{document}
You might have to embed the TOC into a minipage as well.