Same commands for different unicodes?

Thibaut Cuvelier tcuvelier at lyx.org
Sun Feb 27 04:05:45 UTC 2022


On Mon, 21 Feb 2022 at 11:17, Kornel Benko <kornel at lyx.org> wrote:

> Am Mon, 21 Feb 2022 02:13:08 +0100
> schrieb Thibaut Cuvelier <tcuvelier at lyx.org>:
>
> > > > > Would you have a script that finds all these occurrences or a
> list? Maybe
> > > > > quite a few could be resolved like the asterisk.
> > > > >
> > > >
> > > > Would it be helpful if some duplicate characters were marked as
> deprecated?
> > > > For \\'\\textalpha, for instance (I guess it's the same for all Greek
> > > > vowels with tonos/oxia), 0x1F71 is disallowed (see line idna2008 in
> > > > https://util.unicode.org/UnicodeJsps/character.jsp?a=1F71), unlike
> 0x3AC.
> > >
> > > That would help. In fact my script already uses this info, but only a
> very few
> > > codes are marked as such.
> > >
> > I am attaching a patch to solve the issue for several Greek characters,
> using the fact
> > that some of them are more or less deprecated. The other patch only adds
> math versions
> > for some symbols that did not have one. I'm also attaching an annotated
> version of your
> > list with suggested fixes in many cases (except for the Greek letters in
> the
> > accompanying patch). I may be wrong, because many cases are subtleties
> of Unicode
> > and/or phonetics.
>
> Thanks Thibaut.
>
> Patches applied cleanly. lyxfind.cpp updated.
> I cannot comment on suggested fixes though, but for the patches I vote for
> commit.
>
>         Kornel
> --
> lyx-devel mailing list
> lyx-devel at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-devel
>

I had a new look at this issue. What do you think about adding a new flag?
It would work exactly like "deprecated", but without the implications of
having symbols deprecated. I would call this new flag "improper", to
indicate that the mapping is typical for LaTeX, but it's improper use of
the Unicode symbol: its use should not really be advised in general to use
this LaTeX command for that Unicode character.
That would be the case for 0x204e: this asterisk is supposed to be low, but
LaTeX always uses a centred asterisk.

Of course, I could just add a "deprecated" flag to all these symbols to
trigger the expected behaviour, but it doesn't feel right.

For now, I have implemented the basic change with a "deprecated" flag, with
a comment each time to indicate why these mappings are indicated as
deprecated. This is enough to eliminate all the cases you mentioned in your
file sent on Feb 20. I'm splitting it into two patches, with the second one
having potentially more impact than the first one (due to my lesser
understanding).

What do you think of this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220227/ca113018/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ,x
Type: application/octet-stream
Size: 6055 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220227/ca113018/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-unicodesymbols-mark-duplicate-symbols-as-deprecated.patch
Type: application/octet-stream
Size: 7170 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220227/ca113018/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-unicodesymbols-mark-duplicate-symbols-as-deprecated.patch
Type: application/octet-stream
Size: 14011 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220227/ca113018/attachment-0005.obj>


More information about the lyx-devel mailing list