General"Contents" appearing out of nowhere amsbook

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
raoul.duke
Posts: 2
Joined: Tue May 25, 2010 2:58 pm

"Contents" appearing out of nowhere amsbook

Post by raoul.duke »

Hi all!

I'm having a little problem with my table of contents; for some reason there is this "Contents" appearing out of nowhere at the very end of my table of contents. For example:

% ********************************
Chapter 1. Introduction 1
|
|
|
Chapter 7. Appendix 51
Bibliography 81
Contents <- WHAT IS THIS DOING HERE?
% ********************************

BTW: This happens only when using the amsbook documentclass. I create the table of contents with the command \tableofcontents

I'm using the documentclass amsbook, and I'm compiling with the latex command under linux.
[ If I enter latex in the terminal this shows up: This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) ]

Any help is appreciated :)

Dont know if this is of any help, but here are my declerations and package inclusions

\documentclass[11pt, a4paper]{amsbook}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[agsm]{harvard}
\usepackage{url}
\usepackage{amsmath}
\usepackage[parfill]{parskip}
\usepackage[dvips]{graphicx}
\usepackage{listings}
\usepackage{amsfonts}
\usepackage{hyperref}
\usepackage{amsthm}
\usepackage{subfigure}

\small

\lstset{language=c++}
\lstset{commentstyle=\tiny}
\lstset{tabsize=2}
\lstset{breaklines=true}
\lstset{showstringspaces=false}

\newtheoremstyle{custom}{10pt}{10pt}{\itshape}{}{\bfseries}{.}{.5em}{}
\theoremstyle{custom}
\newtheorem{definition}{Definition}
\DeclareMathOperator{\argmax}{argmax}
\DeclareMathOperator{\argmin}{argmin}

\begin{document}
\frontmatter

\chapter*{Abstract}

\chapter*{Acknowledgments}

\tableofcontents

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

"Contents" appearing out of nowhere amsbook

Post by gmedina »

Hi,

the problem comes from using the parskip package with the amsbook document class as the following MWE illustrates:

Code: Select all

\documentclass{amsbook}
\usepackage{parskip}

\begin{document}
\tableofcontents
\chapter{Test}
\end{document}
I don't have time right now to look for the cause of the problem and try to find a fix. Can you live without using parskip?

Some remarks: 1) Drop the dvips option for graphicx (modern systems automatically detect the corresponding driver). 2) Load the harvard package after all the other packages (at least on my system that prevented a compilation error). 3) Don't use the obsolete package subfigure; in its stead you can use subfig or subcaption.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
raoul.duke
Posts: 2
Joined: Tue May 25, 2010 2:58 pm

Re: "Contents" appearing out of nowhere amsbook

Post by raoul.duke »

Thanks!

At least I know what the problem is now. Unfortunately, I like having that space between paragraphs, so I think I'll have to just live with that one little error.

:)
Post Reply