2

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.

2

there 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.

  • Thanks! But it didn't work out! It shows " undefined control sequence" Is there any changes I have to do in titlepage environment? BTW, I have chapters so I should use book class. – yaa09d Feb 10 '12 at 2:26
  • 1
    The reason of the undefined control sequence is the \HUGE command. Change it to regular latex command \Huge – Al_th Mar 4 '14 at 9:36
0

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.

Example PDF

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.