Am Mittwoch, 27. Juni 2007 17:39 schrieb Alfredo Braunstein:
> Georg Baum wrote:
> 
> >> Alfredo> From a quick research with svn I've found two seemingly
> >> Alfredo> relevant (not sure really) entries. Seems we don't output
> >> Alfredo> them because it's a problem reading them back?
> > 
> > To which braces do you refer? The one of the sub/superscript are AFAIK
> > always output. It would probably be possible to leave them out, but 
why?
> > The ones around a multiple character nucleus need to be added manually 
(by
> > a brace inset). Reading braces back is in no case a problem.
> 
> Yes, the second ones. Optimally we should output braces around a multiple
> char nucleus.

I forgot that it is possible to create such a thing. This is of course a 
problem.

> IUC the problem is that on reading them back we would have 
> added a brace inset that was not there originally.

Exactly. That might be tolerable, but the real problem with this approach 
is that the invariant mathinset == parse(mathinset.asString()) would no 
longer be true. This invariant is assumed at several places in the code 
(one being undo).

> >> This is very fragile stuff.
> > 
> > That depends. It is fragile if you try to be clever during parsing and
> > remove insets that have been created previously, and add them back in
> > write() again. As long as you do normal parsing without removing insets 
it
> > is quite robust.
> > Currently everything is working perfectly. There is only one drawback
> > concerning the representation on screen: For things like {ab}^{c} the
> > braces around {ab} are shown in red, and if you want to enter such 
things
> > you need to enter a brace inset around ab. This is what Jean-Marc 
wanted
> 
> I disagree, this is not just representation on screen, it's cumbersome to
> enter them.

Exactly what I wrote. I don't see the disagreement :-)

> And there is an inconsistency: we pretend to have a multi-char 
> nucleus internally but we output something else to latex. It's a pity 
that
> there's no good solution. Maybe it would be better to not have muti-char
> nucleus at all and force the user to enter a brace inset?

I think so.


Georg

Reply via email to