"det", "dim", "exp", "gcd", "hom", "inf", "ker",
"lg", "lim", "liminf", "limsup", "ln", "log",
"max", "min", "sec", "sin", "sinh", "sup",
- "tan", "tanh", "Pr", 0
+ "tan", "tanh", "Pr", nullptr
};
static size_t const npos = lyx::docstring::npos;
//
-// split scripts into seperate super- and subscript insets. sub goes in
+// split scripts into separate super- and subscript insets. sub goes in
// front of super...
//
extractScript(exp, jt, ar.end(), true);
// create a proper inset as replacement
- auto p = make_unique<InsetMathExFunc>(buf, name);
+ auto p = lyx::make_unique<InsetMathExFunc>(buf, name);
// jt points to the "argument". Get hold of this.
MathData::iterator st =
if (!testIntegral(*it))
continue;
- // core ist part from behind the scripts to the 'd'
- auto p = make_unique<InsetMathExInt>(buf, from_ascii("int"));
+ // core is part from behind the scripts to the 'd'
+ auto p = lyx::make_unique<InsetMathExInt>(buf, from_ascii("int"));
// handle scripts if available
if (!testIntSymbol(*it)) {
continue;
// create a proper inset as replacement
- auto p = make_unique<InsetMathExInt>(buf, from_ascii("sum"));
+ auto p = lyx::make_unique<InsetMathExInt>(buf, from_ascii("sum"));
// collect lower bound and summation index
InsetMathScript const * sub = ar[i]->asScriptInset();
}
// create a proper diff inset
- auto diff = make_unique<InsetMathDiff>(buf);
+ auto diff = lyx::make_unique<InsetMathDiff>(buf);
// collect function, let jt point behind last used item
MathData::iterator jt = it + 1;
<< "\ninput: '" << data << "'" << endl;
cmd_ret const ret = runCommand(command);
cas_tmpfile.removeFile();
- return ret.second;
+ return ret.result;
}
size_t get_matching_brace(string const & str, size_t i)
} // namespace
-void write(MathData const & dat, WriteStream & wi)
+void write(MathData const & dat, TeXMathStream & wi)
{
wi.firstitem() = true;
docstring s;
}
-void writeString(docstring const & s, WriteStream & os)
+void writeString(docstring const & s, TeXMathStream & os)
{
if (!os.latex()) {
os << (os.asciiOnly() ? escape(s) : s);
docstring cmd;
for (char_type c : s) {
try {
- Encodings::latexMathChar(c, false, os.encoding(), cmd, space);
+ Encodings::latexMathChar(c, true, os.encoding(), cmd, space);
os << cmd;
os.pendingSpace(space);
} catch (EncodingException const & e) {
switch (os.output()) {
- case WriteStream::wsDryrun: {
+ case TeXMathStream::wsDryrun: {
os << "<" << _("LyX Warning: ")
<< _("uncodable character") << " '";
os << docstring(1, e.failed_char);
os << "'>";
break;
}
- case WriteStream::wsPreview: {
+ case TeXMathStream::wsPreview: {
// indicate the encoding error by a boxed '?'
os << "{\\fboxsep=1pt\\fbox{?}}";
LYXERR0("Uncodable character" << " '"
<< "'");
break;
}
- case WriteStream::wsDefault:
+ case TeXMathStream::wsDefault:
default:
// throw again
- throw(e);
+ throw;
}
}
}
os.pendingSpace(true);
} catch (EncodingException const & e) {
switch (os.output()) {
- case WriteStream::wsDryrun: {
+ case TeXMathStream::wsDryrun: {
os << "<" << _("LyX Warning: ")
<< _("uncodable character") << " '";
os << docstring(1, e.failed_char);
os << "'>";
break;
}
- case WriteStream::wsPreview: {
+ case TeXMathStream::wsPreview: {
// indicate the encoding error by a boxed '?'
os << "{\\fboxsep=1pt\\fbox{?}}";
LYXERR0("Uncodable character" << " '"
<< "'");
break;
}
- case WriteStream::wsDefault:
+ case TeXMathStream::wsDefault:
default:
// throw again
- throw(e);
+ throw;
}
}
}
}
-void mathmlize(MathData const & dat, MathStream & os)
+void mathmlize(MathData const & dat, MathMLStream & ms)
{
MathData ar = dat;
extractStructure(ar, MATHML);
if (ar.empty())
- os << "<mrow/>";
+ ms << "<" << from_ascii(ms.namespacedTag("mrow")) << "/>";
else if (ar.size() == 1)
- os << ar.front();
+ ms << ar.front();
else {
- os << MTag("mrow");
+ ms << MTag("mrow");
for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it)
- (*it)->mathmlize(os);
- os << ETag("mrow");
+ (*it)->mathmlize(ms);
+ ms << ETag("mrow");
}
}