## LaTeX forum ⇒ General ⇒ List of Figure Problem

LaTeX specific issues not fitting into one of the other forums of this category.
Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm

### List of Figure Problem

Good Morning!

I am trying to write a class file based upon the report style file.

I have disabled the automatic resetting of the figure number when the chapter counter is incremented. However, there is a 10pt space included in the LOF and LOT between figures in different chapters.

I know that

\addtocontents{lof}{\vspace*{-10pt}}\addtocontents{lot}{\vspace*{-10pt}}

will put a bandaid on things by adding a negative space to counter the positive space, but this sort of thing annoys me. (I assume that there is a more permanent way to do this).

Below is the class file I'm working on...done a lot of internet scavenging for the code, so please assume that I know very little about writing style files.

Any ideas?

Keith


Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am
If you really want to avoid the vertical space of 10pt added between chapters in the LOF and LOT, just remove the following lines from the definition of \@chapter:
\addtocontents{lof}{\protect\addvspace{10\p@}}%\addtocontents{lot}{\protect\addvspace{10\p@}}%
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm
Wow. Thanks so very much! I've been trying to solve this for way too long.

Do you know of a reference that explains the language used in style files? Is that TeX...or a hybrid of TeX and the internals needed to ensure that LaTeX works?

Keith

sommerfee
Posts: 500
Joined: Mon Apr 09, 2007 4:20 pm
Keith Emmert wrote:Wow. Thanks so very much! I've been trying to solve this for way too long.

\usepackage[figurewithin=none]{caption}

would be a solution, too, when using version 3.1g or newer of the caption package.

Is that TeX...or a hybrid of TeX and the internals needed to ensure that LaTeX works?

Both. So you need to know about the LaTeX internals you want to change, but usually need to learn TeX, too. Unfortunately very much of the source of LaTeXs class and package files is written in TeX because of runtime and memory efficiency which is IMHO not relevant in our times anymore but makes the code hard to read for beginners. For example \thesection is defined within article.cls as
\renewcommand \thesection {\@arabic\c@section}

which is equivalent to
\renewcommand \thesection {\arabic{section}}

while the latter one would IMHO be more readable since it uses no LaTeX internals.

Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm
Hey,

For fun, I re-enabled the lines I previously deleted

\addtocontents{lof}{\protect\addvspace{10\p@}}%\addtocontents{lot}{\protect\addvspace{10\p@}}%

and tried using

\usepackage[figurewithin=none]{caption}

It didn't have the desired effect. I suppose that MiKTeX 2.7 is not using Caption 3.5 or later...

Anyway, thanks for the info. I'll try and learn some TeX in my spare time...when I can find spare time.

Keith

sommerfee
Posts: 500
Joined: Mon Apr 09, 2007 4:20 pm
Keith Emmert wrote:I suppose that MiKTeX 2.7 is not using Caption 3.5 or later...

Since MikTeX has an update manager, the version number of MikTeX is telling less about the version numbers of the packages.

So for finding out which version number the caption package has, take a look at your log file. Or just update the caption package using the MikTeX update wizard.

Keith Emmert
Posts: 12
Joined: Sat Nov 08, 2008 9:24 pm
I updated MiKTeX...it is using caption ver 3.1j now...still doesn't work. Ah well, will use the other solution.

Keith

alexhenry1977
Posts: 1
Joined: Wed Dec 10, 2008 7:42 am
Hi Mr Sommerfee and Keith,

I am new in Latex. I am writing my report but I am having problem that there is a 10pt space included in the LOF and LOT between figures in different chapters (the same as Keith problem). I tried to copy keith command but seems to be conflicting with my other format..
Is there any command just to remove the 10pt space? without making a new definition of the chapter.
Thanks,