On 08/05/2013 09:32 AM, Richard Heck wrote:
On 08/05/2013 06:10 AM, Pavel Sanda wrote:
John Kennan wrote:
When instant preview is on, an equation label with square brackets shows up
as hex codes.
Confirmed as regression to 2.0.x. Please can you create bug and attach the file there so it's not forgotten?

If you look at View> Source, you can see that the label, eq:Def[a], is being output as:

        \label{eq:Def=00005Ba=00005D}

So it looks as they certain characters are being escaped here. Intentionally? The same happens with all other labels.

This does look to be intentional. (It's part of Jurgen's rewrite of the argument stuff.) Because the argument to the label is specified (at InsetLabel::findInfo) as to be escaped, it is passed through the escape() function in InsetCommandParams. All the characters that could potentially cause problems for LaTeX are escaped there. We did not use to escape [ and ], but 0062538a added several potentially problematic characters.

It was presumably not intended that this would be visible to the user, but it is visible in math preview. I'm not sure if anything can be done about that.

Richard

Reply via email to