2 #include "command_inset.h"
3 #include "math_mathmlstream.h"
6 CommandInset::CommandInset(string const & data)
10 string::size_type idx0 = data.find("|++|");
11 name_ = data.substr(0, idx0);
12 if (idx0 == string::npos)
15 string::size_type idx1 = data.find("|++|", idx0);
16 cell(0) = asArray(data.substr(idx0, idx1 - idx0));
17 if (idx1 == string::npos)
19 cell(1) = asArray(data.substr(idx1 + 4));
23 MathInset * CommandInset::clone() const
25 return new CommandInset(*this);
29 void CommandInset::write(WriteStream & os) const
31 os << "\\" << name_.c_str();
33 os << "[" << cell(1) << "]";
34 os << "{" << cell(0) << "}";
38 string CommandInset::screenLabel() const