[Tex/LaTex] table of contents title removed

amsartincompatibilityparskiptable of contents

I wanted to change my paragraph style in my report so that there was no indentation. I used in my preamble:

\usepackage[parfill]{parskip}

Whilst this has dealt with the indentation, it appears to have created a new problem. I have included a table of contents and list of figures by using:

\tableofcontents
\listoffigures

Previously they looked ok but after I added the parskip package the titles of my contents page have been removed. In fact they now appear below the contents page in normal 12 pt font. Has anyone got any suggestions about how I can change my paragraph style but keep the titles in my contents page.
This is gist of my project:

\documentclass[a4paper,12pt, reqno]{amsart}

\usepackage{tikz}        % only needed if you include TpX drawings
\usepackage{graphicx} % only needed if you include graphics files other than TpX
\usepackage{hyperref} % produces nice hyperlinks in your document
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{verbatim}
\usepackage{color}
\usepackage{lscape}
\usepackage[parfill]{parskip}


\theoremstyle{definition}
\newtheorem{example}{Example}[section]
\numberwithin{figure}{section}
\numberwithin{equation}{section}

\begin{document}

\begin{titlepage}
...
\end{titlepage}

\tableofcontents
\listoffigures

\section{}
...
\appendix
...
\begin{thebibliography}

hope some of this helps.

Edit Just to include a screen shot of what the difference is. Here's the version without parskip

enter image description here

and here's the bad version with parskip

enter image description here

One sees that the formatting and placement of the Contents and List of figures labels are shot.

Best Answer

The parskip package redefines \@starttoc in order not to apply a nonzero parskip to the table of contents and similar lists. However, the redefinition it performs is incompatible with the definition of \@starttoc in amsart. Load the parskip package as follows:

\usepackage{etoolbox}
\makeatletter
\let\ams@starttoc\@starttoc
\makeatother
\usepackage[parfill]{parskip}
\makeatletter
\let\@starttoc\ams@starttoc
\patchcmd{\@starttoc}{\makeatletter}{\makeatletter\parskip\z@}{}{}
\makeatother

This patches the amsart version of \@starttoc as desired. You'll still get the warning about \@starttoc having changed. Live with it.

Personal opinion. I wouldn't use parskip in any document longer than two pages. And surely not in a document using an AMS style.