Misc. small fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2816 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2001-09-28 20:23:49 +00:00
parent ab03bb37ce
commit 88c555f798
8 changed files with 35 additions and 18 deletions

View File

@ -1,3 +1,7 @@
2001-09-28 Dekel Tsur <dekelts@tau.ac.il>
* paragraph.C (validate): Set NeedLyXFootnoteCode
2001-09-27 Angus Leeming <a.leeming@ic.ac.uk>
* lyxfont.C (LyXSizeNames): changed increase-error to increase

View File

@ -1,3 +1,7 @@
2001-09-28 Dekel Tsur <dekelts@tau.ac.il>
* insetert.C (latex): Fix the returned value
2001-09-24 Angus Leeming <a.leeming@ic.ac.uk>
* insetert.[Ch] (selectNextWordToSpellcheck): new method.

View File

@ -315,6 +315,7 @@ int InsetERT::latex(Buffer const *, std::ostream & os, bool /*fragile*/,
bool /*free_spc*/) const
{
Paragraph * par = inset.paragraph();
int lines = 0;
while (par) {
Paragraph::size_type siz = par->size();
for (Paragraph::size_type i = 0; i < siz; ++i) {
@ -322,6 +323,7 @@ int InsetERT::latex(Buffer const *, std::ostream & os, bool /*fragile*/,
switch (c) {
case Paragraph::META_NEWLINE:
os << '\n';
++lines;
break;
default:
os << c;
@ -329,11 +331,13 @@ int InsetERT::latex(Buffer const *, std::ostream & os, bool /*fragile*/,
}
}
par = par->next();
if (par)
if (par) {
os << "\n\n";
lines += 2;
}
}
return 1;
return lines;
}

View File

@ -62,8 +62,3 @@ int InsetFoot::latex(Buffer const * buf,
return i + 2;
}
void InsetFoot::validate(LaTeXFeatures & features) const
{
features.NeedLyXFootnoteCode = true;
}

View File

@ -38,8 +38,6 @@ public:
int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
///
string const editMessage() const;
///
void validate(LaTeXFeatures & features) const;
};
#endif

View File

@ -1,3 +1,7 @@
2001-09-28 Dekel Tsur <dekelts@tau.ac.il>
* math_matrixinset.C (header_write): Add \n after \begin{align}
2001-09-19 Dekel Tsur <dekelts@tau.ac.il>
* math_macrotable.C (builtinMacros): Add some macros if latex

View File

@ -276,7 +276,7 @@ void MathMatrixInset::header_write(std::ostream & os) const
break;
case LM_OT_ALIGN:
os << "\\begin{align" << star(n) << "}";
os << "\\begin{align" << star(n) << "}\n";
break;
case LM_OT_ALIGNAT:
@ -322,31 +322,31 @@ void MathMatrixInset::footer_write(std::ostream & os) const
break;
case LM_OT_EQNARRAY:
os << "\\end{eqnarray" << star(n) << "}\n";
os << "\n\\end{eqnarray" << star(n) << "}\n";
break;
case LM_OT_ALIGN:
os << "\\end{align" << star(n) << "}\n";
os << "\n\\end{align" << star(n) << "}\n";
break;
case LM_OT_ALIGNAT:
os << "\\end{alignat" << star(n) << "}\n";
os << "\n\\end{alignat" << star(n) << "}\n";
break;
case LM_OT_XALIGNAT:
os << "\\end{xalignat" << star(n) << "}\n";
os << "\n\\end{xalignat" << star(n) << "}\n";
break;
case LM_OT_XXALIGNAT:
os << "\\end{xxalignat}\n";
os << "\n\\end{xxalignat}\n";
break;
case LM_OT_MULTLINE:
os << "\\end{multline}\n";
os << "\n\\end{multline}\n";
break;
case LM_OT_GATHER:
os << "\\end{gather}\n";
os << "\n\\end{gather}\n";
break;
default:

View File

@ -381,10 +381,18 @@ void Paragraph::validate(LaTeXFeatures & features) const
}
// then the insets
LyXLayout const & layout =
textclasslist.Style(bparams.textclass,
getLayout());
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if (cit->inset)
if (cit->inset) {
cit->inset->validate(features);
if (layout.needprotect &&
cit->inset->lyxCode() == Inset::FOOT_CODE)
features.NeedLyXFootnoteCode = true;
}
}
}