>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Even simpler:

Angus> \begin{description} \item [$]$]blah \end{description}


Angus> Personally, I think you've been unfortunate, but LyX's mathed
Angus> editor has never prevented you from generating incorrect latex,
Angus> nor could it without being a fully fledged latex compiler.

We already have code for normal text which out puts all square brackets
as {[} and {]} in order to prevent this. This solution is of course
a bit tasteless. A more elegant way of doing it would be to enclose
the whole optional argument in curly brackets if they contain a ].
This would give

\begin{description} 
\item [{$]$}]blah 
\end{description}

I guess all it takes is to output the arg in a stringstream first, and
then check its contents.

JMarc

Reply via email to