[texhax] listoffigures doesn't work with redefined enviroment

Lars Madsen daleif at imf.au.dk
Wed May 25 01:27:41 CEST 2005


Alexandre Kretchetov :

> Dear Community
>
> I'm redefining my figure envirement in the folloving way to have a nice
> Figures exactly where I want them, but after modification \listoffigures
> produces blank page.
>
> Does anybody know how to fix it?
>
>
> Thank you in advance
> Alexandre
>
> ================================
>
>
> \renewenvironment{figure}                        % FIGURE (not float)
> {%                                               % Begin new environment
>  \vskip 12pt plus 4pt minus 12pt
>  \noindent
>  \begin{minipage}{\textwidth}%
>  \begin{center}
>  \refstepcounter{figure}
>  \FIGtrue
> }
> {%                                               % End environment
>  \end{center}
>  \vskip 6pt plus 2pt minus 2pt%
>  \setbox\b at x=\hbox{\captionbox}
>  \captionbox%                               % print deferred caption
>  \end{minipage}%
>  \vskip 10pt plus 4 pt minus 4pt%
>  \FIGfalse
> }
>

perhaps because \caption writes to the .lof file and yours doesn't?
I don't know what your \captionbox is.


By the way why not just use

\usepackage{float}

\newenvironment{Figure}{%
  \begin{figure}[H] % non floating figure
   \centering}{\end{figure}}

and you could add what ever extra you wanted.



-- 

/daleif

``You cannot help men permanently by doing for them 
what they could and should do for themselves. ''
  -- Abraham Lincoln



More information about the texhax mailing list