Rod Pinna wrote:

> Hi all,
> 
> This is *possibly* an endfloat bug, but it seems to be caused by a change
> in the sytax outputted by 1.2.0
> 
> For floats, the new format is 
> 
> text text text \begin{figure}%
> \include{}\end{figure}%
> 
> Endfloat demands
>  text text text \begin{figure}%
> \include{}
> \end{figure}%


please apply together with small changes to insetgraphics.

Herbert



-- 
http://www.lyx.org/help/
Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.408
diff -u -r1.408 ChangeLog
--- src/insets/ChangeLog        29 Apr 2002 09:24:19 -0000      1.408
+++ src/insets/ChangeLog        30 Apr 2002 13:21:32 -0000
@@ -1,3 +1,10 @@
+2002-04-30  Herbert Voss  <[EMAIL PROTECTED]>
+
+       * insetfloat.C (latex): fix bug with a missing \n 
+       before \end{<floattype>}
+
+       * insetgraphics.C (latex): better view of latex output
+        
 2002-04-28  Dekel Tsur  <[EMAIL PROTECTED]>
 
        * insetfloatlist.C (getScreenLabel): Fix crash in the case where
Index: src/insets/insetfloat.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfloat.C,v
retrieving revision 1.42
diff -u -r1.42 insetfloat.C
--- src/insets/insetfloat.C     26 Apr 2002 15:38:15 -0000      1.42
+++ src/insets/insetfloat.C     30 Apr 2002 13:21:33 -0000
@@ -248,7 +248,7 @@
        os << "%\n";
 
        int const i = inset.latex(buf, os, fragile, fp);
-       os << "\\end{" << tmptype << "}%\n";
+       os << "\n\\end{" << tmptype << "}%\n";
 
        return i + 2;
 }
Index: src/insets/insetgraphics.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.107
diff -u -r1.107 insetgraphics.C
--- src/insets/insetgraphics.C  29 Apr 2002 09:24:19 -0000      1.107
+++ src/insets/insetgraphics.C  30 Apr 2002 13:21:34 -0000
@@ -741,11 +753,11 @@
                << "InsetGraphics::latex. Opts = " << opts << endl;
 
        if (!opts.empty() && !message.empty())
-               before += ("[" + opts + ',' + message);
+               before += ("[%\n" + opts + ',' + message);
        else if (!message.empty())
-               before += ('[' + message);
+               before += ("[%\n" + message);
        else if (!opts.empty())
-               before += ("[" + opts + ']');
+               before += ("[%\n" + opts + ']');
 
        lyxerr[Debug::GRAPHICS]
                << "InsetGraphics::latex. Before = " << before

Reply via email to