>> Thanks for the response Julien. I am starting to use math macros. But a
>> limitation of them is that I have to create them in LyX; they aren't
>> automatically generated when I import LaTeX files I have written by hand
>> (which I have a lot of!), and the result is a bunch of ugly formulas. One
>> of the main reasons I'm trying LyX is that it was claimed to be more
>> compatible with raw LaTeX than Scientific Word, which I have used for years.
>>
>
>I believe LyX will import your \newcommands and convert them to math
macros if the \newcommands appear after \begin{document}
>
>> Regarding the use of the preamble, section 15.2 "Self-Defined Functions" of
>> the math manual says that you can use the \DeclareMathOperator in the
>> preamble to define your own named functions such that "the result is the
>> same ... as with a predefined function", which I took to mean it would look
>> onscreen like a predefined function. But then there is the footnote which
>> says "self-defined functions are displayed in red, predefined ones in
>> black". If that means all LyX does is show the command name as ERT, then in
>> my opinion that is a somewhat weak (and somewhat misleading) feature.
>
>That's a good point. I would recommend to send a message to the LyX
documentation team.
>
>As a general note: LyX is free software and isn't backed up by any
company. Considering this, sometimes I find that what was accomplished
with LyX is quite amazing. However sometimes I find it is lacking a lot.
The great thing, though, is that it can be made better with such great
feedback like you already started to provide. And better yet you could
provide a patch which would properly import \newcommands from the
preamble of your .tex file into a .lyx doc.
>
>First I was only a LyX user and then I started contributing to the
project when I saw that something was lacking. I would advise you the
same if you can, it will make LyX better and you can use it to import
your .tex files properly.
>
>Cheers,
>Julien
Thanks. I confirmed that \newcommand does work if it's within the document
environment, but not in the preamble (which seems odd to me, since the preamble
seems to be a pretty reasonable place to define commands). Also, it only works
if you import it, not if you enter it in manually from within LyX (again, not
something I expected, but perhaps understandable). Since LyX can handle
\newcommand, it shouldn't be hard to get \DeclareMathOperator to display nicely
also.
I am indeed impressed with what LyX can do, which is why I believe it can be
even better. I would love to contribute -- I actually had started planning out
something very similar to LyX about a decade ago -- but unfortunately I don't
have much spare time now. Maybe someday!
Ryan