>>>>> "John" == John Ya-ya <[EMAIL PROTECTED]> writes:

John>         I did that and it works.  However, in so doing I was
John> inspired to try changing the *Style* of the line on which I had
John> defined the macro, and I discovered something.  A math macro
John> must be defined using the "Standard" style (at least that's the
John> only one I've found that works), otherwise LaTeX complains that
John> it hasn't been defined.  So, no help needed -- now I've found
John> the right way to do it.  :)

This may happen in some cases, indeed. Several LaTeX constructs define
local scopes (in particular the multi-paragraph things like lists or
theorems) and definitions inside them are local. This is something that
should be taken into account, I guess.

John>         The way I found this out is, when I made an empty file
John> with just the macro definition and a macro use, I typed "M-x
John> math-macro msol" and the symbol I had defined in the other
John> document appeared!  I can close and open that file, and the
John> symbol still shows up even though there is now no definition of
John> the macro there; it shows up again if I use "C-m \msol".  This
John> behavior still exists if I close all other documents and re-open
John> the test one.  It finally goes back to what I would expect to
John> see -- that is, a red "msol" displayed instead of the M-with-dot
John> symbol -- if I close LyX and re-open it.

Yes, this is due to the way macros are implemented currently. This
should change in LyX 1.1.x, I guess. Mathed (the formula editor) is
currently being mostly rewritten.

JMarc

Reply via email to