summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a74e1b0)
void InsetMathKern::write(WriteStream & os) const
{
void InsetMathKern::write(WriteStream & os) const
{
- os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
+ if (wid_.empty())
+ os << "\\kern" << ' ';
+ else
+ os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
}
void InsetMathKern::normalize(NormalStream & os) const
{
}
void InsetMathKern::normalize(NormalStream & os) const
{
- os << "[kern " << from_utf8(wid_.asLatexString()) << ']';
+ if (wid_.empty())
+ os << "[kern]";
+ else
+ os << "[kern " << from_utf8(wid_.asLatexString()) << ']';
else if (t.cs() == "kern") {
// FIXME: A hack...
docstring s;
else if (t.cs() == "kern") {
// FIXME: A hack...
docstring s;
while (true) {
Token const & t = getToken();
while (true) {
Token const & t = getToken();
+ s.clear();
+ while (num_tokens--)
+ putback();
break;
}
s += t.character();
if (isValidLength(to_utf8(s)))
break;
}
break;
}
s += t.character();
if (isValidLength(to_utf8(s)))
break;
}
- cell->push_back(MathAtom(new InsetMathKern(s)));
+ if (s.empty())
+ cell->push_back(MathAtom(new InsetMathKern));
+ else
+ cell->push_back(MathAtom(new InsetMathKern(s)));
}
else if (t.cs() == "label") {
}
else if (t.cs() == "label") {