Darren Freeman wrote: > According to the View->Source panel, these both result in $Ge^{3}$. > > Did this get broken recently? I have been using this "feature" to put my > chemical elements as the nucleus of a subscript for a while and I'd hate > to think it was for nothing. > > Also, shouldn't LyX refrain from outputting the curly braces on the > sub/superscript unless it's more than one char?
>From a quick research with svn I've found two seemingly relevant (not sure really) entries. Seems we don't output them because it's a problem reading them back? Maybe JMarc or Georg know what's happening? A/ $ svn -r15859 log ------------------------------------------------------------------------ r15859 | baum | 2006-11-11 16:26:31 +0100 (Sat, 11 Nov 2006) | 11 lines Revert revision 14819 and my faulty fix for it. * src/mathed/InsetMathScript.C (InsetMathScript::write): Do not add braces to the nucleus * src/mathed/MathParser.C (Parser::parse1): Do not remove brace insets from the nucleus of script insets * src/mathed/InsetMathNest.C (InsetMathNest::script): ditto ------------------------------------------------------------------------ $ svn -r15858:15859 diff InsetMathScript.cpp Index: InsetMathScript.C =================================================================== --- InsetMathScript.C (revision 15858) +++ InsetMathScript.C (revision 15859) @@ -421,11 +421,7 @@ void InsetMathScript::write(WriteStream & os) const { if (nuc().size()) { - if (nuc().size() == 1 - && ! nuc().begin()->nucleus()->asScriptInset()) - os << nuc(); - else - os << '{' << nuc() << '}'; + os << nuc(); //if (nuc().back()->takesLimits()) { if (limits_ == -1) os << "\\nolimits "; $ svn -r14819 log ------------------------------------------------------------------------ r14819 | lasgouttes | 2006-08-23 12:57:49 +0200 (Wed, 23 Aug 2006) | 14 lines Handle properly script insets which nucleus has more than one element (like {a'}^{2}). (froward port from 14802) * src/mathed/math_nestinset.C (script): when creating a script inset, handle specially previous atom if it is a MathBraceInset (this is used in interactive input). * src/mathed/math_parser.C (parse1): when creating a script inset, handle specially previous atom if it is a MathBraceInset (this is used in parsing phase). * src/mathed/math_scriptinset.C (write): put nucleus into braces if it contains more than one element or is itself a script inset. ------------------------------------------------------------------------