LyX doesn't handle nested braces correctly. In a maths inset write { {1234 } } so that the outer pair of braces contains a single argument. Now save and close the document, then reopen it and the maths inset will contain { 1234 } i.e. 4 tokens rather than the single argument grouping before. Depending on the surrounding commands, the results can be very different. Adding an empty brace pair prevents this: the outer braces are not stripped from { {1234} {} }, but one shouldn't have to.

I've written a package producing differential coefficients. The denominator of a partial derivative is formed from a grouping like {xyz} which produces \partial x\partial y\partial z. But in many subjects variables are sub- or superscripted (e.g. coordinates x_1, x_2, x_3 for x, y, z). In order that x_1 produce \partial x_1 it's necessary to put it in double braces: { {x_1} }. If the outer braces are stripped, as LyX does, latex ends up trying to form a 3-variable mixed partial derivative out of x, _, and 1. (\partial x_\partial\partial 1 is what eventually emerges past the latex errors.) LyX is creating the error by stripping the outer braces when the document is reopened.

Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to