"eval(`latex/latex/*`)):\n";
// remove spurious \\noalign{\\medskip} in matrix output
- header +=
+ header +=
"`latex/latex/matrix`:= "
"subs(`\\\\\\\\\\\\noalign{\\\\medskip}` = `\\\\\\\\`,"
"eval(`latex/latex/matrix`)):\n";
//
// ... > echo "1A;" | mint -i 1 -S -s -q
// on line 1: 1A;
- // ^ syntax error -
+ // ^ syntax error -
// Probably missing an operator such as * p
//
lyxerr << "checking expr: '" << expr << "'\n";
mathed_parse_cell(res, out);
return res;
}
-
-
+
+
MathArray pipeThroughOctave(string const &, MathArray const & ar)
{
ostringstream os;
for (int i = 0; i < 100; ++i) { // at most 100 attempts
//
- // try to fix missing '*' the hard way
+ // try to fix missing '*' the hard way
// parse error:
// >>> ([[1 2 3 ];[2 3 1 ];[3 1 2 ]])([[1 2 3 ];[2 3 1 ];[3 1 2 ]])
// ^
//
lyxerr << "checking expr: '" << expr << "'\n";
- out = captureOutput("octave -q 2>&1", expr);
+ out = captureOutput("octave -q 2>&1", expr);
lyxerr << "checking out: '" << out << "'\n";
// leave loop if expression syntax is probably ok
lyxerr << "converter to '" << lang << "' not found\n";
return MathArray();
}
-
+
// run external sript
string out = captureOutput(file, data);
MathArray res;
{}
-InsetFormula::InsetFormula(string const & s)
+InsetFormula::InsetFormula(string const & s)
{
if (s.size()) {
bool res = mathed_parse_normal(par_, s);
}
-void InsetFormula::write(Buffer const * buf, ostream & os) const
+void InsetFormula::write(Buffer const *, ostream & os) const
{
os << "Formula ";
- latex(buf, os, false, false);
+ WriteStream wi(os, false, false);
+ par_->write(wi);
}
-int InsetFormula::latex(Buffer const *, ostream & os, bool fragil, bool) const
+int InsetFormula::latex(Buffer const *, ostream & os, bool fragile, bool) const
{
- WriteStream wi(os, fragil);
+ WriteStream wi(os, fragile, true);
par_->write(wi);
return wi.line();
}
{
#if 1
TextMetricsInfo mi;
- par()->metrics(mi);
+ par()->metricsT(mi);
TextPainter tpain(par()->width(), par()->height());
- par()->draw(tpain, 0, par()->ascent());
+ par()->drawT(tpain, 0, par()->ascent());
tpain.show(os);
// reset metrics cache to "real" values
metrics();
switch (action) {
- case LFUN_BREAKLINE:
+ case LFUN_BREAKLINE:
bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->breakLine();
mathcursor->normalize();
updateLocal(bv, true);
break;
}
-
+
case LFUN_PASTESELECTION:
{
string const clip = bv->getClipboard();
- if (!clip.empty())
+ if (!clip.empty())
mathed_parse_normal(par_, clip);
break;
}
{
// where are we?
if (!mathcursor)
- return;
+ return;
string lang;
string extra;
istringstream iss(arg.c_str());
iss >> lang >> extra;
if (extra.empty())
- extra = "noextra";
+ extra = "noextra";
bool selected = mathcursor->selection();
bool InsetFormula::insetAllowed(Inset::Code code) const
{
- return
+ return
(code == Inset::LABEL_CODE && display())
- || code == Inset::ERT_CODE;
+ || code == Inset::ERT_CODE;
}