I have problem with creation of table contents. A part of my code:

\documentclass[a4paper]{amsbook}
\usepackage[cp1250]{inputenc}
\usepackage{polski}
\makeatletter
\renewcommand*\@seccntformat[1]{\csname the#1\endcsname.\enspace}
\makeatother
\usepackage[sf,bf,outermarks]{titlesec}

\begin{document}
\tableofcontents
\chapter*{Introduction}
\chapter{(Chapter 1 - Title)}
\section{Section  - Title}
\section{Section  - Title}
\subsection{Subsection - Title}
\subsection{Subsection - Title}
\section{Section  - Title}
\section{Section  - Title}
\section{Section  - Title}
\subsection{Subsection - Title}
\subsubsection{Subsection - Title}
\subsubsection{Subsection - Title}
\subsection{Subsection - Title}
\subsection{Subsection - Title}
\section{Section  - Title}
\begin{thebibliography}{1}
\bibitem{1} Bibliography 1
\end{thebibliography}
\end{document}


and it shows like this as you can see, text overlapping.

How can I change this?
How can I add the number of chapter before number of section?

[ Chapter 1. Title
1.1 Section title
1.2 Section title
.... Chapter 2. Title
2.1 Section title
2.2 Section title
...]

-
Please add a minimal working example (MWE) that illustrates your problem. –  lockstep Jun 12 '11 at 12:09

you are using amsbook. admittedly, the implementation of tables of contents is faulty. leaving aside the reasons for that (fixing it is something that is in the list for the next upgrade, which unfortunately hasn't been scheduled yet), the ams has a package that will allow you to adjust the format to something more suitable.

since the package is not publicly posted, please send a message to tech-support@ams.org requesting it.

the package is not what we would call "industrial strength", and the methods used are not how the problems should be fixed when incorporated directly into amsbook. for these reasons, it is made available only on request.

-
Is the "faulty ToC implementation" also true for other AMS document classes? –  lockstep Jun 12 '11 at 14:52
I found a solution. It's strange but it works, I don’t know why. I compiled the code and I got a table of contents with overlapping text. Then I deleted this part: \usepackage[sf,bf,outermarks]{titlesec} and compiled again. Next I pasted the same part of code, which I deleted before, i.e I compiled the code which I had at the beginning. That solved the problem. (?!) –  LiN Jun 12 '11 at 17:00
@lockstep -- yes, for all ams document classes. sad but true. –  barbara beeton Jun 12 '11 at 21:27
@LiN You should post your solution as an answer and accept it. –  N.N. Sep 21 '11 at 15:04

Add the following to the preamble:

\makeatletter
\def\l@subsection{\@tocline{1}{0,2pt}{2pc}{8mm}{\ \ }}
%% used 0,1 to add vertical space b/w "subsec" and "subsubsec"
%% Used \ (and a space) to add offset for the subsections. Here I added 2 spaces
%% Used 2pc for the nr. of subsubsections in the subsections
%% Used 8mm to add "horizontal space" b/w the "number" and "subsection"


If you replace subsection with section or subsubsection it works for everything.

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Peter Jansson Apr 25 '13 at 12:40