# Problem about double space in list of figures when using endfloat package

I'm writing a manuscript using endfloat to make all the figures at the end of the article.

However, when using the code below to eliminate numbers from lists of figures, the definition \AtBeginDelayedFloats{\renewcommand{\baselinestretch}{1.4}} does not work:

\renewcommand*{\l@figure}[2]{%
\setlength\@tempdima{2.3em}%
\noindent\hspace*{1.5em}#1\hfil\newline }


By the way, \renewcommand{\baselinestretch}{1.4} works well if the above code does not exist.

Any suggestion?

MWE

\documentclass{article}
\usepackage[lists]{endfloat}

\AtBeginDelayedFloats{\renewcommand{\baselinestretch}{1.4}}

\makeatletter
\renewcommand*{\l@figure}[2]{%
\setlength\@tempdima{2.3em}%
\noindent\hspace*{1.5em}#1\hfil\newline }
\makeatother

\begin{document}

\section{title}
text text text text text text text text text text text text text text text   text text text text text text text text text text text

\begin{figure}[!ht]\caption{This is caption 1}\end{figure}
\begin{figure}[!ht]\caption{This is a long caption 2 This is a long caption 2 This is a long caption 2 This is a long caption 2}\end{figure}

\end{document}

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – egreg May 31 '12 at 14:59

There are three problems in your input.

1. Redefinitions of code that contains commands with an @ in their names should be surrounded by special commands

\makeatletter
\renewcommand*{\l@figure}[2]{%
\setlength\@tempdima{2.3em}%
\noindent\hspace*{1.5em}#1\hfil\newline }
\makeatother


Unfortunately the documentation of endfloat doesn't make this very clear.

2. The code for figures must be properly input with \begin{figure} and \end{figure} on lines by themselves:

\begin{figure}[!htp]
<code for the figure>
\caption{The caption}\label{label}
\end{figure}


(the \label is optional, of course).

3. Changing the definition of \baselinestretch is not sufficient, in general for getting increased line space: often the first paragraph will not be spaced. Use

\AtBeginDelayedFloats{\linespread{1.4}}

-
Thanks for your correction. But the line-spacing is not change by the definition \AtBeginDelayedFloats{\renewcommand{\baselinestretch}{1.4}} – toby Jun 1 '12 at 0:48
@toby Use \AtBeginDelayedFloats{\linespread{1.4}}. – egreg Jun 1 '12 at 6:24

I found below command work well：

\AtBeginDelayedFloats{\linespread{2}\selectfont}

-