Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Can you please add to your question a minimal working example illustrating the problem? –  Gonzalo Medina May 3 '12 at 13:11
    
Welcome to TeX.SE! A quick note on formalities: In this group, we tend not to thank people in advance with words for their answers. We're not being rude; it's just understood that the best way to thank people is to upvote useful answers and to accept the best answer. It's generally a good idea to wait a few hours after the first answer's been posted before accepting an answer; premature acceptance of answers may discourage some from posting their own (and possibly even better) answers... –  Mico May 3 '12 at 13:12
    
With a simple document I don't get anything strange, so it's better if you try providing a minimal example. Frequently this helps in spotting the error. –  egreg May 3 '12 at 13:14
1  
It seems to be a problem with the package interacting with amsart document class. As @egreg said, with article class there is no problem. In fact with the amsart class you see the following warning when loading parskip: LaTeX Warning: Command \@starttoc has changed. Check if current package is valid. –  Willie Wong May 3 '12 at 14:43
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.