mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
Fix bug 4687
http://bugzilla.lyx.org/show_bug.cgi?id=4687 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25318 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
312bb47dd5
commit
c691839abe
@ -32,8 +32,9 @@
|
|||||||
|
|
||||||
#include "frontends/Painter.h"
|
#include "frontends/Painter.h"
|
||||||
|
|
||||||
#include "support/lassert.h"
|
|
||||||
#include "support/debug.h"
|
#include "support/debug.h"
|
||||||
|
#include "support/lassert.h"
|
||||||
|
#include "support/textutils.h"
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -132,9 +133,10 @@ Inset * MathMacro::clone() const
|
|||||||
|
|
||||||
docstring MathMacro::name() const
|
docstring MathMacro::name() const
|
||||||
{
|
{
|
||||||
if (displayMode_ == DISPLAY_UNFOLDED)
|
if (displayMode_ == DISPLAY_UNFOLDED
|
||||||
|
&& (name_.size() > 1 || (name_[0] != '_' && name_[0] != '^')))
|
||||||
return asString(cell(0));
|
return asString(cell(0));
|
||||||
else
|
|
||||||
return name_;
|
return name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,6 +662,7 @@ void MathMacro::write(WriteStream & os) const
|
|||||||
// non-normal mode
|
// non-normal mode
|
||||||
if (displayMode_ != DISPLAY_NORMAL) {
|
if (displayMode_ != DISPLAY_NORMAL) {
|
||||||
os << "\\" << name();
|
os << "\\" << name();
|
||||||
|
if (name().size() != 1 || isAlphaASCII(name()[0]))
|
||||||
os.pendingSpace(true);
|
os.pendingSpace(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user