unicodesymbols: have several commands for a single symbol?

Jürgen Spitzmüller spitz at lyx.org
Mon Feb 14 05:59:29 UTC 2022


Am Montag, dem 14.02.2022 um 03:24 +0100 schrieb Thibaut Cuvelier:
> Thanks, I just did that (with a small test file): a460097823. 
> 
> However, this test showed a limitation in the current unicodesymbols:
> there can be only one LaTeX command per symbol. This is a limitation
> in only a few cases, like  LyX Document
> \textexclamdown and !`: both of them are mapped to ¡ (i.e. ¡),
> but the file only allows for one mapping.

Yes, this stems from the history of this file, which has been created
first only for the unicode to latex route.

> If we decide to solve this problem, we could have several solutions
> (all modifying Encodings::read), I could think of two:
> - either use a separator symbol in the latexcommand part of each
> unicodesymbols line, but it would be hard to find a single character
> that is never used for latexcommands

yes.

> - or have multiple lines for a single character, with duplicate
> information for the second one or a simpler line format for these
> entries. For instance, for the inverted exclamation mark: 
> 
> 0x00a1 "\\textexclamdown"         "" "force=cp862;cp1255;euc-jp;euc-
> jp-platex;euc-kr;utf8-platex" # INVERTED EXCLAMATION MARK
> 0x00a1 "!`" # Implicitly, all the other parameters still apply

I'd also prefer this. For LaTeX output, the first occurrence should be
preferred.

> What do you think of this? Should this be done? 

I think it's definitely useful.

Jürgen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220214/076335d6/attachment.asc>


More information about the lyx-devel mailing list