# [texhax] whitespace before \end{figure} command

Brian Papa bpapa at ametsoc.org
Mon Jul 30 19:23:40 CEST 2007

OK, I just read the endfloat package file and it indicates:

When floats are being read, LATEX is in verbatim mode. Among other
things, this
means that the lines like
\end{figure}
must appear on lines by themselves without any whitespace before or
after them.
A complete reimplementation of the most difficult part of the package is
required
to fix this limitation, but it is among the distant goals I have.

So I guess this is all "normal" behavior.

-Brian

Brian Papa wrote the following on 7/30/2007 1:14 PM:
> I am using the article class, modified with my own style file.  I've
> traced the problem to the following line in my style file:
> \usepackage[nomarkers]{endfloat}%
>
> It appears that if I do not use the endfloat package then I do not get
> any errors. When I do include use of the endfloat package (regardless of
> whether the nomarkers option is specified) and I have spaces before the
> \end{figure} command I get the errors.
>
> -Brian
>
> Lars Madsen wrote the following on 7/30/2007 12:53 PM:
>
>> Brian Papa :
>>
>>
>>> I'm getting errors if I have any whitespace before the \end{figure}
>>> command in my captions.  I'm wondering if this is normal behavior and
>>> there should never be whitespace before a command like this, or if it is
>>> an indication of some other problem?
>>>
>>> The following works ok:
>>> \begin{figure}
>>>  \noindent\includegraphics[width=40pc,angle=0]{./figures/figure01.eps}
>>>  \caption{Enter the caption for your figure here.  Repeat as
>>>  necessary for each of your figures. Create a figures directory and
>>>  place all figures in that directory.}\label{f1}
>>> \end{figure}
>>>
>>> but space added before the "\end{figure} command result in errors:
>>> \begin{figure}
>>>  \noindent\includegraphics[width=40pc,angle=0]{./figures/figure01.eps}
>>>  \caption{Enter the caption for your figure here.  Repeat as
>>>  necessary for each of your figures. Create a figures directory and
>>>  place all figures in that directory.}\label{f1}
>>>    \end{figure}
>>>
>>> The errors given are a bit unclear to me:
>>> ! Fle ended while scanning use of \next
>>> <inserted text>
>>>    \par
>>> !Emergency stop
>>>
>>> In the second case, any reference to figure 1 just appears as question
>>> marks.
>>>
>>> Any insight you can provide would be helpful; hopefully I'm not missing
>>> something too obvious.
>>>
>>>
>> could you please provide a minimal example, this is not normal, so we
>> need to know which class you are using, etc.
>>
>>
>> /daleif
>>
>
>

--
Brian Papa
Technical Editor
American Meteorological Society
45 Beacon Street
Boston, MA 02108-3693 USA
phone: 617.227.2426 ext 279
fax: 617.973.0468
e-mail: bpapa at ametsoc.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20070730/6471eac7/attachment-0001.html


More information about the texhax mailing list