On Fri, 15 Sep 2006, Angus Leeming wrote:

> [EMAIL PROTECTED] wrote:
> > None of the attribues say if an LFUN only works in math-mode, do they? (That
> > information might be interesting to tabulate for the users though)
> > 
> > Which of the following LFUNs only work in math-mode?  I'd be grateful if
> > someone can tell me, or tell me how I can find out without resorting to
> > trial and error.
> 
> Where an LFUN works depends on which Dispatch method implements it. 
> Basically, inset-level LFUNs are implemented in individual insets; 
> BufferView-level LFUNs are implemented in BufferView::Dispatch; 
> Document-level LFUNs in text.C. Grep for individual LFUNs in the 
> sources; you'll soon get the idea.

Ok, so LFUN_ACCENT_... are cases in switch statements within these 
functions:
        text3.C: LyXTeX::dispatch()
        insets/insetert.C: InsetERT::getStatus()
        mathed/math_nestinset.C: MathNestInset::doDispatch()

I guess LyXTeX::dispatch() is what allows the accent LFUNs to be used 
within a normal text buffer.

The function InsetERT:getStatus() suppress (disable) accents within ERT 
insets, which makes sense.

But MathNestInset::doDispatch() contains the equivalent of this:

        case LFUN_ACCENT_ACUTE:
                break;

Does this mean that 'accent-acute' works in math insets or not?

(As an aside, 'accent-circumflex' is handled differently, but I guess that 
is related to being able to do superscripts easily from the keyboard).

Is it possible for me to derive more information from the above. For 
instance, can I say if 'accent-acute' will work inside the cell of a 
table? Or inside a mini-page?  (I know that they ought to, but can I 
deduce this from the fact that 'accent-acute' is handled within 
LyXTeX::dispatch() is not disabled within some other dispatch method 
related to tables/mini-pages)

To sum it up: The accent LFUNs can be used almost everywhere within a 
buffer where you enter text, e.g. in text paragraphs and tables. However, 
the accent LFUNs cannot be used within ERT insets.

/Christian


-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr

Reply via email to