Document Classestocloft and amsart interaction

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
shearerp
Posts: 2
Joined: Thu Apr 15, 2010 12:13 am

tocloft and amsart interaction

Post by shearerp »

If I compile the code below [TeXShop running LaTeX]

Code: Select all

%\documentclass[12pt]{article}  % tocloft works with this
\documentclass[12pt]{amsart} % tocloft doesn't work with this

\usepackage{tocloft}

\begin{document}
   \tableofcontents

\section{Test}
sdfsdfsdf
\subsection{testsub}
dfsdfsdf 
\end{document}
my log file contains many errors of the following form:

Code: Select all


! Missing } inserted.
<inserted text> 
                }
l.6    \tableofcontents
                       
However, if I change the document class by removing the amsart line and uncommenting the article line, everything compiles error-free.

I'd like to use amsart with tocloft so that I can have a nice table of contents in my mathematical article. I've searched the forums and the web for a solution to this problem, but no luck. (In fact, if you google "amsart tocloft" you get someone with my exact same problem and no solution is given.) Any ideas?

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

tocloft and amsart interaction

Post by frabjous »

Do you need to use amsart for some reason?

If you just need the math commands, you could use:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{tocloft}

I'm pretty sure that works.

If this is actually something you're making for the AMS, no doubt they have their own instructions on how to format the TOC.
shearerp
Posts: 2
Joined: Thu Apr 15, 2010 12:13 am

Re: tocloft and amsart interaction

Post by shearerp »

I don't need to use amsart, so for now I'll just change to article. I might need it later though if I submit to a journal that wants AMS formatting.
Post Reply