G. Milde wrote:
On 11.03.05, Andreas Vox wrote:
Theofilos Strinopoulos <[EMAIL PROTECTED]> writes:
For example 'equation for \eta' is an invalid label because of the '\'
character. Can you make lyx give a warning when the user has entered an
illegal label name?
For DocBook we automatically "sanitize" these names, ie. remove all illegal characters and append a serial number to make the label unique, eg. "Euro/$-Kurs" --> "Euro-Kurs-8"
For LaTeX the label is escaped, ie. all '%', '=' and code above 128 are replaced by "="+hexcode. For some reason '\\', '{' and '}' are not escaped.
One way or the other LyX should make sure that the label does not produce LaTeX errors (provided the user didn't mess around with catcodes)
If you tell me which way to go I can provide a mini-patch.
I would prefer, if LyX did not accept "illegal" characters in a label, so I am able to find this label in the form I entered in the LaTeX output (which I share with my co-workeres) and in the LyX source (which I tend to edit with regexp-replace from time to time.
But maybe others prefer automatic conversion in order to have easier
remembrable labels.
Automatic conversion is nice, *if* lyx also does the reverse conversion when displaying the label on screen or in lists. (Currently this works in some cases and fails in others.) I don't normally use "[]{}\/" in label names, but I frequently use non-ascii characters like ÃÃÃÃÃ because they are part of my language. I _can_ avoid them because I happen to know what "ASCII" is, but the common user does not know that letters beyond a-z is special. Not until they crash something, and then they have a hard time figuring out it was an "Ã" that did it. :-/
Helge Hafting