I tried to write table of contents to my book but encountered a problem, as it prints "Sisältö" but there is no table of contents. What is the mistake I made?
\documentclass[11pt,a5paper,twosided,margin=3in]{amsart}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel}
\usepackage{amsmath}
\usepackage[top=0.5in, bottom=0.8in, left=1in, right=1in]{geometry}
\usepackage{fancyhdr}
\fancyfoot{}
\fancyhead[RO,LE]{\thepage}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\cfoot{}
\setlength{\oddsidemargin}{5mm}
\setlength{\evensidemargin}{-5mm}
\linespread{1.5}
\vbadness=20000
\usepackage{titlesec}
\titlespacing{\section}{0pt}{36pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing{\subsection}{0pt}{36pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\pagestyle{fancy}
\begin{document}
\tableofcontents
\title{title}
\newpage
\section*{Beginning}
Some text.
\subsection*{Start}
\hspace{1em}
Some text.
\end{document}
sectionandsubsectionrather thansection*andsubsection*. – Ian Thompson Feb 04 '14 at 16:49\sectionbut now I got an error "! Undefined control sequence.l.24 \section{Beginning}
"
– Jaakko Seppälä Feb 04 '14 at 16:51titlesecdoesn't cooperate with AMS classes. – Gonzalo Medina Feb 04 '14 at 16:58article.amsartdoes include starred headings in the table of contents. however, this file callstitlesec, which redefines all of these. gonzalo has correctly identified the problem as incompatibility between the class and the package. – barbara beeton Feb 04 '14 at 17:02geometrywithamsart... – karlkoeller Feb 04 '14 at 17:11geometrywithamsart? other than one has to remember to specifyfootskip? – daleif Feb 04 '14 at 17:15amsartat all. – Thorsten Donig Feb 04 '14 at 17:19