On Sat, Apr 01, 2023 at 03:09:58PM +0200, Jean-Marc Lasgouttes wrote: > Hello, > > A relative has been using LyX recently, and it is interesting to see how the > use is different from what I would do. > > In particular, instead of typing \neq in mathed, why not copy and paste a ≠ > from some PDF or HTML page? > > When doing this, two things happen : > 1/ on screen, there is no spacing around the ≠ > 2/ in LaTeX output, the character is exported as \neq and all is well > > So how should I solve problem 1/ ? I see 3 solutions > a/ replace ≠ with a \neq directly in the document at input time; we might > not want to do that in case we eventually use unicode in math too > b/ replace ≠ with a \neq on screen only > c/ keep the ≠ on screen, but use the mathrel math class from \neq so that we > have a good spacing > > Then, I see that there are two ways of matching \neq to U+2260: > i/ lib/unicodesymbol has a "mathcommand" entry for that (which is presumably > used right now) > ii/ lib/symbols also links these elements > > Which one is more reliable for what I want to do? > > My general problem is that, while I see what happens with \neq, I suspect > that many weird things can happen with other characters. > > Any advice?
Would another possibility be to prompt the user? I'm not sure what a friendly prompt would be though since many LyX users do not know what unicode is. I could try to work on some user-friendly text if we think a prompt would be reasonable. A prompt would be my ideal behavior though since I often paste unicode by mistake. This type of thing hits me from time to time, not with symbols that are obviously non-ascii like ≠ but more with double-quotes or things like that that I forget are often non-ascii. If we do preserve the unicode ≠, I would personally prefer to have some sort of signal that it is unicode in the LyX display. Actually, that's how I have my text editor set up (see screenshot). All that said, I understand that my personal preferences might not be best for the default behavior of LyX. Scott
signature.asc
Description: PGP signature
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel