The problem is that if I export the file to LaTeX and then try to compile it, the macro definition seems to create problems. This does not occur with macros that only have required arguments. I don't know much about LaTeX macros, so I am not sure if what LyX is doing for the LaTeX export makes sense or not. However, macros with optional arguments have the "\newcommandx" tag while macros without optional arguments do not. The "\newcommandx" tag seems to give LaTeX some trouble. Specifically, when I compile the .tex file, I get the error "Undefined control sequence" when the "\newcommandx" line is parsed. I have also attached the exported .tex file.
Can anyone duplicate this? Is this a known problem? I am on Mac OSX with LyX 1.6.1. James
macro_test.tex
Description: Binary data
macro_test.lyx
Description: Binary data