G. Milde wrote:
On 14.03.05, Helge Hafting wrote:
G. Milde wrote:
Automatic conversion is nice, *if* lyx also does the reverseI 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.
conversion when displaying the label on screen or in lists.
(Currently this works in some cases and fails in others.)
Here it starts to get complicated...
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. :-/
However, an "perfect hiding" of the label substitution will make the
figuring out even harder. An illegal label made with ERT (or pure LaTeX
in an imported document) will trigger a long search and a "but it worked
fine in LyX" groan.
You can't use ERT inside a label? Have you tried this, or did I misunderstand you?
Importing broken latex may break further in lyx - that's ok.
This is why I opt for a insert-label dialog that refuses illegal
characters and explains the reason in the status line (as we already do
when the user enters 2 spaces in "normal" mode). This way the common user
will "learn by doing".
The annoyance of a limited character set for labels is IMHO far
out-wighted by increased transparency (and compatibility) and simpler
code.
I don't think you see the problem. People don't think that way. See the problem people have with "no spaces in filenames/paths." They cannot see why that would be a problem. And they will get pissed off if they cannot even use normal single words from their language for a label. A few languages is like english in that words only contain a-z. Most languages have more letters than that, and they are used all the time. People dislike such arbitrary limitations, try hacking lyx such that 5 arbitrary letters in the a-z range get illegal for label names. You'll get tired of that after a while, believe me. Then try explaining to a user that:
'Uh, you can't use "e", "f", "p", "o" or "x" in a label name. The software doesn't support those letters in a label - just
remember to not use those. Yes, it makes the labels hard to read
and misspelled, yes, I know that other word
processors don't do this to you, . . . '
If lyx encodes all "label text" with latex-legal characters then no problems happen
with latex. Because latex get the latex-legal label. And lyx will be fine, if
this is done consistently. Label text show up on the labels, it shows up
when the label text is edited, and it shows up in the list of labels. This isn't
many places.
Now, refusing []{}\/@# and similiar in a label might be ok, but please understand
that the division into ascii and non-ascii letters seems _random_ to the
average non-technical user!
Helge Hafting