>>>>> "yan" == yan wong <[EMAIL PROTECTED]> writes:
yan> thanks very much, I'm impressed by how quickly helpful advice is
yan> given on this list: I just wanted you all to know that it is very
yan> appreciated.
You're welcome.
yan> Just a quick remark, though: The advice above works fine in most
yan> cases, but there is (I think) a lyx bug here...
yan> If I put
yan> \caption[ This is $\pi$ a symbol ]{caption title} ^^^^^^^^^ ^^^^^
yan> ^^ ^
yan> in a standard environment inside a figure float (the ^ symbols
yan> marking "red" Latex text), the list of figures prints out
yan> fine. However, if I replace $\pi$ with a lyx math box, and insert
yan> the \pi as a symbol, I get the latex error "Bad math enviroment
yan> delimiter". I presume this is something to do with having the
yan> maths nested in the [ ] brackets. It works fine using the lyx
yan> math editor inside the { } brackets.
This is not really a LyX bug, but rather the kind of things that
happen when using ugly workarounds like the one I suggested... What
happens is that the math editor will output pi as \(\pi\) and the
command \( is `fragile', meaning that it cannot go like that in text
which will move to table of contents or similar (for obscure and
technical reasons I do not fully understand). The solution in this
case is to add \protect just before the formula, and LyX does that in
section headers. However, in the present case, LyX has no way to know
that \pi is in a `moving' argument, and the magical \protect is not
added.
JMarc