Document Classesold \listoffigures problem needing a new solution

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
sjgraves
Posts: 2
Joined: Fri Sep 05, 2008 4:09 pm

old \listoffigures problem needing a new solution

Post by sjgraves »

So I've got the standard \listoffigures problem wherein my figures are numbered within sections, so in my List of Figures the numbers overwrite the caption. Normally, people can use the following two lines of code to fix this, in their preambles:

Code: Select all

\usepackage[titles]{tocloft}
\setlength{\cftfignumwidth}{3.3em}
Here's my problem. tocloft doesn't work on my rig, for some reason. If I use the simplest possible code involving tocloft, I get errors:

Code: Select all

\documentclass[12pt]{amsbook}
\usepackage{tocloft}

\begin{document}
\tableofcontents

\chapter{First} Blah Blah Blah.
\end{document}
This throws a "Missing }" error on the "\tableofcontents" line. I'm using the Texlive distribution under OS X, so Im not sure where I should have posted the topic, but it seems like a tocloft problem.

Oh, and the other workaround using

Code: Select all

\makeatletter
\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{3.3em}}
\makeatother
doesn't work, either.

Thanks in advance.
~Steve

Recommended reading 2024:

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

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

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

old \listoffigures problem needing a new solution

Post by Juanjo »

Well, what about this?

Code: Select all

\makeatletter
\renewcommand\l@figure{\@tocline{0}{3pt plus2pt}{0pt}{3.3em}{}}
\makeatother
The log file gives you the path to amsbook.cls. It then suffices to open this file and search inside the macros involved, which you seem to know.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
sjgraves
Posts: 2
Joined: Fri Sep 05, 2008 4:09 pm

Re: old \listoffigures problem needing a new solution

Post by sjgraves »

It took me a while to get back to this as I've just been worrying about my content instead of my layout, but this fixed the problem. When I have more time, I'm going to pick apart why this all happened in the first place, but for now, I'm just going to thank you for your acceptable workaround.

Thank you.
Post Reply