Hi Ryan, (list c.c.ed)
On 26/01/2011 4:33 PM, Bennink, Ryan S. wrote:
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