bug338patch.gz

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4163 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-05-14 14:22:11 +00:00
parent a565711d08
commit c3221a5d49
6 changed files with 32 additions and 6 deletions

View 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

View 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

View 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,

View 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

View File

@ -22,6 +22,12 @@
#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);

View 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();
}