mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
Accept \kern and \mkern for math kerning
Also output the right one depending on whether the unit is "mu" or not. Indeed, the two macros are identical, except that \mkern only accepts unit mu, and kern does not accept it. With this patch, both macros accept all units, but on writing beck, the right one is used.
This commit is contained in:
parent
c8a829d273
commit
10c8d51b90
@ -61,6 +61,8 @@ void InsetMathKern::write(WriteStream & os) const
|
||||
{
|
||||
if (wid_.empty())
|
||||
os << "\\kern" << ' ';
|
||||
else if (wid_.unit() == Length::MU)
|
||||
os << "\\mkern" << from_utf8(wid_.asLatexString()) << ' ';
|
||||
else
|
||||
os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
|
||||
return MathAtom(new InsetMathMakebox(buf, true));
|
||||
if (s == "makebox")
|
||||
return MathAtom(new InsetMathMakebox(buf, false));
|
||||
if (s == "kern")
|
||||
if (s == "kern" || s == "mkern")
|
||||
return MathAtom(new InsetMathKern);
|
||||
if (s.substr(0, 8) == "xymatrix") {
|
||||
char spacing_code = '\0';
|
||||
|
@ -1763,7 +1763,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
|
||||
}
|
||||
}
|
||||
|
||||
else if (t.cs() == "kern") {
|
||||
else if (t.cs() == "kern" || t.cs() == "mkern") {
|
||||
// FIXME: A hack...
|
||||
docstring s;
|
||||
int num_tokens = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user