Attachment: test3.lyx
Description: Binary data


I'm having a problem with optional arguments on macros.  They are sometimes 
written into the TeX file as
non-optional (i.e., in {} instead of []), which causes them to be ignored
by the TeX compiler.  This appears to be random -- different instances of
the same macro in the same document will render differently.  If the
instances are viewed unfolded, then it doesn't happen.  (This is not a
good solution, even as a workaround, since there is no way to unfold all
the instances in a document at once.)

Anyone had this problem, too, and know of a good workaround?

I've attached  a sample file.  The problem may not show up the first time,
so it should be compiled several times.

Here are instructions for creating a sample with this problem:

Open a new file, create a new macro, add 4 optional arguments, and then
format the TeX however you want (I used {#1^{#2^{#3^{#4}}}).

Now add a math environment and create an instance of the new command.
Copy and paste a bunch of these, say, 20, on different lines.

Compile several times.  The problem will show up intermittently with
different instances.

Thanks!

-Brandon

Reply via email to