]> git.lyx.org Git - features.git/commitdiff
bug338patch.gz
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 14 May 2002 14:22:11 +0000 (14:22 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 14 May 2002 14:22:11 +0000 (14:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4163 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C
src/buffer.h
src/insets/ChangeLog
src/insets/insetfoot.C
src/insets/insettext.C

index 33177df7abef02be71b3dbd97fe23200584bce8c..e3bcb36acae9c478a56c005e4cbb754a7318da58 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-11  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * buffer.C (latexParagraphs): Add new argument (moving_arg).
+
 2002-05-14  Juergen Vigna  <jug@sad.it>
 
        * text.C (breakParagraph): fixed function to honor the keepempty
index 930074c404f6a4421d4cbaaea9b7df119c60d9db..51cc8b611fb3f4abf97b6c8768b716eabd2cf71d 100644 (file)
@@ -2644,7 +2644,8 @@ void Buffer::makeLaTeXFile(string const & fname,
 // LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end
 //
 void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
-                            Paragraph * endpar, TexRow & texrow) const
+                            Paragraph * endpar, TexRow & texrow,
+                            bool moving_arg) const
 {
        bool was_title = false;
        bool already_title = false;
@@ -2679,10 +2680,10 @@ void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
                        {
                                par = par->TeXEnvironment(this, params, ofs, texrow);
                        } else {
-                               par = par->TeXOnePar(this, params, ofs, texrow, false);
+                               par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
                        }
                } else {
-                       par = par->TeXOnePar(this, params, ofs, texrow, false);
+                       par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
                }
        }
        // It might be that we only have a title in this document
index 67e9eeb40b40d440c5de596997ce666804a8bcd9..f18e03e6f884b8e508354e12fa56a209de5c3ad2 100644 (file)
@@ -162,7 +162,7 @@ public:
            \param \a endpar if == 0 then to the end
        */
        void latexParagraphs(std::ostream & os, Paragraph * par,
-                            Paragraph * endpar, TexRow & texrow) const;
+                            Paragraph * endpar, TexRow & texrow, bool moving_arg = false) const;
        ///
        void simpleDocBookOnePar(std::ostream &,
                                 Paragraph * par, int & desc_on,
index b2ee4bc2e558aa80f4967664544302f6461557bb..cee2d90a1b3c9b6861bb9466009415c175f211c1 100644 (file)
@@ -1,3 +1,12 @@
+2002-05-11  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * insettext.C (latex): Honor the moving_arg argument.
+
+2002-04-22  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * insetfoot.C (latex): if a footnote is in a title layout, then it
+       is a \thanks. And then, its contents is a moving argument.
+
 2002-05-14  Juergen Vigna  <jug@sad.it>
 
        * insetcollapsable.C (InsetCollapsable): forgot to initialize
index cf1576383bd8d020e090045980130f04f68d3743..28ee366ce0b394fb147ab7af28296eb67ba51b5a 100644 (file)
 #include "insets/insettext.h"
 #include "support/LOstream.h"
 #include "debug.h"
+// the following are needed just to get the layout of the enclosing
+// paragraph. This seems a bit too much to me (JMarc)
+#include "lyxlayout.h"
+#include "lyxtextclasslist.h"
+#include "buffer.h"
+#include "paragraph.h"
 
 
 using std::ostream;
@@ -58,6 +64,12 @@ string const InsetFoot::editMessage() const
 int InsetFoot::latex(Buffer const * buf,
                     ostream & os, bool fragile, bool fp) const
 {
+       if (buf && parOwner()) {
+               LyXLayout const & layout =
+                       textclasslist[buf->params.textclass][parOwner()->layout()];
+               fragile |= layout.intitle;
+       }
+
        os << "%\n\\footnote{";
 
        int const i = inset.latex(buf, os, fragile, fp);
index a2190ca1da7baf6086f8a310078b31aff30aa893..b375b56d1e82853f8b47c1ccc5a98de6e6875f56 100644 (file)
@@ -1546,10 +1546,10 @@ InsetText::localDispatch(BufferView * bv,
 }
 
 
-int InsetText::latex(Buffer const * buf, ostream & os, bool, bool) const
+int InsetText::latex(Buffer const * buf, ostream & os, bool moving_arg, bool) const
 {
        TexRow texrow;
-       buf->latexParagraphs(os, par, 0, texrow);
+       buf->latexParagraphs(os, par, 0, texrow, moving_arg);
        return texrow.rows();
 }