mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +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())
|
if (wid_.empty())
|
||||||
os << "\\kern" << ' ';
|
os << "\\kern" << ' ';
|
||||||
|
else if (wid_.unit() == Length::MU)
|
||||||
|
os << "\\mkern" << from_utf8(wid_.asLatexString()) << ' ';
|
||||||
else
|
else
|
||||||
os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
|
os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
|
|||||||
return MathAtom(new InsetMathMakebox(buf, true));
|
return MathAtom(new InsetMathMakebox(buf, true));
|
||||||
if (s == "makebox")
|
if (s == "makebox")
|
||||||
return MathAtom(new InsetMathMakebox(buf, false));
|
return MathAtom(new InsetMathMakebox(buf, false));
|
||||||
if (s == "kern")
|
if (s == "kern" || s == "mkern")
|
||||||
return MathAtom(new InsetMathKern);
|
return MathAtom(new InsetMathKern);
|
||||||
if (s.substr(0, 8) == "xymatrix") {
|
if (s.substr(0, 8) == "xymatrix") {
|
||||||
char spacing_code = '\0';
|
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...
|
// FIXME: A hack...
|
||||||
docstring s;
|
docstring s;
|
||||||
int num_tokens = 0;
|
int num_tokens = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user