>>>>> "-" == Amir Karger <[EMAIL PROTECTED]> writes:
-> If you look at BUGS in the reLyX directory, you'll see that \end in a
-> \newcommand breaks reLyX. So does \begin, for the same reason. The TeX
-> parser thinks when it sees "\begin" that you're going to start a new
-> environment. When you don't, it breaks. Unfortunately, it's not too easy to
-> change reLyX to work around this problem. (Besides which, I haven't been
-> working on reLyX much lately, and noone else has stepped in.)
-> If you put the \newcommand into the preamble (i.e., before
-> \begin{document}), then reLyX won't break on that command.
-> Unfortunately, reLyX won't realize that \beq means \begin{equation}, so it
-> won't handle your equations as math, so it may break anyway. It would be
-> even harder to change reLyX to handle that. One way would be to use a macro
-> expander that automatically took every \newcommand in your program and
-> changed it to its definition. There's a program that does that (called "TeX
-> Macro Expander") and it was suggested that that be part of reLyX. However,
-> you then lose all your macros if you want to write the file out as LaTeX.
-> Another fix would be to look for just the special macros that started new
-> environments and things. But I'm sure you can see this would be Hard.
A humble suggestion: why not use the macro expander, with a flag to
turn it off (or vice versa, have a flag to turn it on)? And, have it
also copy all \def and \newcommand statements directly to the latex
file, so you still have access to your macro definitions for any
additions you make to the file under LyX or any subsequent re-saves as
LaTeX.
The current solution makes getting started under LyX hard, for anyone
like myself who has lots of files using lots of macros with \begin{}'s
and/or \end{}'s in them. Having a flag to macro-expand would make the
transition from LaTeX to LyX much simpler, and would seem (?) to be
both easy and harmless ...
Thanks --
Ken
Kenneth D. Miller telephone: (415) 476-8217
Dept. of Physiology fax: (415) 476-4929
UCSF internet: [EMAIL PROTECTED]
513 Parnassus www: http://www.keck.ucsf.edu/~ken
San Francisco, CA 94143-0444