# Compile Error (tableofcontenents, maketitle) [closed]

I'm trying to compile this file:

\documentclass[12pt, a4paper]{book}
\usepackage{doc}
\usepackage[italian]{babel}
\begin{document}
\author{Me}
\title{Test}
\date{\today}
\maketitle
\tableofcontenents
\frontmatter
\section{Preface}
\section{Nomenclature}
\mainmatter
\section{Introduction}
\section{Result and discussion}
\subsection{Section}
\subsection{Another section}
\section{Conclusion}
\end{document}


But i get these two error:

! Undefined control sequence.
\maketitle ...ge \global \@topnum \z@ \@maketitle
\fi \thispagestyle {titlep...
l.29 \maketitle

?

! Undefined control sequence.
l.30 \tableofcontenents

?


What could I do? Thank you in advice!

## closed as off-topic by user31729, Stefan Pinnow, Kurt, user13907, ZarkoJul 19 '16 at 22:39

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SX! You can't use the doc package here And the command is called \tableofcontents, not \tableofcontenents – user31729 Jul 17 '16 at 20:19
• What do you think \usepackage{doc} is for? If somebody recommended it to you, it's a good occasion for breaking a friendship. ;-) – egreg Jul 17 '16 at 21:57
• Thank you, now at least compile! The problem now is that the resulting .dvi has an empty Index and the sections are numbered as subsections. – sworwitz Jul 18 '16 at 9:04
• For the index I found out I have to compile two or three times but the section problems still remain – sworwitz Jul 18 '16 at 9:08
• I'm voting to close this question as off-topic because the issue could be solved in comments (suggesting to remove the doc package from being included, correcting of typos and compiling twice) – user31729 Jul 19 '16 at 21:27