On Thu, Dec 31, 2009 at 10:53:03AM -0500, rgheck wrote:
> On 12/31/2009 05:09 AM, Andre Poenitz wrote:
>> On Thu, Dec 31, 2009 at 04:50:33AM +0100, rgh...@lyx.org wrote:
>>    
>>> Author: rgheck
>>> Date: Thu Dec 31 04:50:12 2009
>>> New Revision: 32684
>>> URL: http://www.lyx.org/trac/changeset/32684
>>>
>>> Log:
>>> Introduce a return value for mathmlize(). We will need this to be able
>>> to defer labels.
>>>      
>> I don't really like it. Couldn't you make this return value part of
>> the MathStream object?
>>
>> That would have been a way less intrusive change, kept the code small,
>> avoid the empty strings all over the place, and scale to a future where
>> yet-another-thing-that-would-need-to-be-returned appears.
>    
> I knew I should have asked you about this first. It would have saved a  
> lot of work.
>
> Speaking of which, I think I am going to have a problem with  
> InsetMathBig. The output of delimiter code relies upon matching the  
> delimiters---which I take it is why delimiters get extracted in  
> MathExtern. So either (a) I need InsetMathBig to be extracted, too, and  
> turned into an InsetMathDelim (which should be OK, for all external  
> stuff) or else (b), actually, I'm wondering why InsetMathBig isn't just  
> rolled into or a subclass of InsetMathDelim. Could you arrange for one  
> of these two things to happen?

The reason that it's not the same inset is probably historical. Or is
InsetMathDelim only a local helper for MathExtern? I don't remember.
Anyway, InsetMathBig has two additional string members, not sure every
InsetMathDelim has to have though.

Also, merging does not look like a trivial task as InsetMathDelim
derives from InsetMathNest and has a 'cell' (and therefore is always
'balanced') whereas InsetMathBig is a plain InsetMath, i.e. basically a
single funny character, and it does not have to appear in pairs. This
"imbalancedness" might even 

Re extracting InsetMathBig in MathExtern: From a quick look it should
be possible to extend testOpenParen and testCloseParen to handle
InsetMathBig, too. Just recognizing the \big\( things as openings
might produce a few false positives in case of improperly nested 
structures, but still be good enough. [The whole MathExtern mechanism
is based on the assumption that Good Enough is good enough...]

Andre'

Reply via email to