mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
better fix for bug #17652
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17676 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
83b326d204
commit
15b343d8f3
@ -20,6 +20,7 @@
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
namespace lyx {
|
||||
|
||||
@ -215,8 +216,13 @@ void InsetMathSymbol::octave(OctaveStream & os) const
|
||||
void InsetMathSymbol::write(WriteStream & os) const
|
||||
{
|
||||
os << '\\' << name();
|
||||
if (name().size() == 1 && name()[0] < '0') // $,#, etc
|
||||
|
||||
// $,#, etc. In theory the restriction based on catcodes, but then
|
||||
// we do not handle catcodes very well, let alone cat code changes,
|
||||
// so being outside the alpha range is good enough.
|
||||
if (name().size() == 1 && !std::isalpha(name()[0]))
|
||||
return;
|
||||
|
||||
os.pendingSpace(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user