From c78c58d8393cad7431097a6c167e25109e082dbe Mon Sep 17 00:00:00 2001
From: Thibaut Cuvelier <tcuvelier@lyx.org>
Date: Sun, 27 Feb 2022 04:56:06 +0100
Subject: [PATCH 1/2] unicodesymbols: mark duplicate symbols as deprecated.

Some LaTeX commands are used for several Unicode symbols. Sometimes, the difference is small between two Unicode symbols (like a character and its modifier version: unlike the combining character, a modifier doesn't modify a nearby character); other times, LaTeX doesn't have a way to encode the difference between the two symbols (typically, Greek accents and "universal" accents).
---
 lib/unicodesymbols | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/lib/unicodesymbols b/lib/unicodesymbols
index 1b2a88d136..992e5fc958 100644
--- a/lib/unicodesymbols
+++ b/lib/unicodesymbols
@@ -82,7 +82,7 @@
 0x00b2 "\\texttwosuperior"        "textcomp" "force!=utf8;utf8-cjk;utf8x" "{{}^2}" "" # ² SUPERSCRIPT TWO
 0x00b3 "\\textthreesuperior"      "textcomp" "force!=utf8;utf8-cjk;utf8x" "{{}^3}" "" # ³ SUPERSCRIPT THREE
 0x00b4 "\\textasciiacute"         "textcomp" "force=cp1255;cp1256;euc-jp;euc-kr;jis;shift-jis-platex" # ACUTE ACCENT
-0x00b5 "\\textmu"                 "textcomp" "force!=utf8;jis" "" "" # µ MICRO SIGN (upright, not $\mu$)
+0x00b5 "\\textmu"                 "textcomp,deprecated" "force!=utf8;jis" "" "" # µ MICRO SIGN (upright, not $\mu$) (deprecated to avoid conflict with 0x3bc)
 0x00b6 "\\textparagraph"          "textcomp" "force=cp1255;cp1256;euc-jp;euc-kr;jis;shift-jis-platex" "\\mathparagraph" "" # PILCROW SIGN # not equal to \textpilcrow
 0x00b7 "\\textperiodcentered"     "" "force=cp862;cp1255;cp1256;koi8-u;iso8859-7;euc-kr;euc-tw;gbk" "\\cdot" "" # MIDDLE DOT
 0x00b8 "\\c{ }"                   "" "force=cp1255;cp1256;euc-jp;euc-kr" "" "" # CEDILLA
@@ -610,9 +610,9 @@
 0x02b6 "\\textsuperscript{\\textinvscr}" "tipa" "force" # MODIFIER LETTER SMALL CAPITAL INVERTED R
 0x02b7 "\\textsuperscript{w}"      "" "force=utf8;utf8-cjk" # MODIFIER LETTER SMALL W
 0x02b8 "\\textsuperscript{y}"      "" "force=utf8;utf8-cjk" # MODIFIER LETTER SMALL Y
-0x02b9 "\\textasciiacute"          "textcomp" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER PRIME
-0x02ba "\\textacutedbl"            "textcomp" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER DOUBLE PRIME
-0x02bb "\\textquoteleft"           "" "force=utf8;utf8x;utf8-cjk;iso8859-7" # MODIFIER LETTER TURNED COMMA
+0x02b9 "\\textasciiacute"          "textcomp,deprecated" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER PRIME (deprecated to avoid conflict with 0x00b4)
+0x02ba "\\textacutedbl"            "textcomp,deprecated" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER DOUBLE PRIME (deprecated to avoid conflict with 0x2033)
+0x02bb "\\textquoteleft"           "deprecated" "force=utf8;utf8x;utf8-cjk;iso8859-7" # MODIFIER LETTER TURNED COMMA (deprecated to avoid conflict with 0x2018)
 0x02bc "'"                         "" "notermination=both,force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER APOSTROPHE
 0x02bd "\\textrevapostrophe"       "tipa" "force" # MODIFIER LETTER REVERSED COMMA
 #0x02be ""                         "" "" # MODIFIER LETTER RIGHT HALF RING
@@ -627,8 +627,8 @@
 0x02c7 "\\textasciicaron"         "textcomp" "force=euc-cn;euc-jp;euc-kr;euc-tw;gbk" # CARON
 0x02c8 "\\textprimstress"         "tipa" "force" # MODIFIER LETTER VERTICAL LINE
 0x02c9 "\\={ }"                   "" "force=utf8;utf8-cjk;euc-cn;euc-tw;gbk" # MODIFIER LETTER MACRON
-0x02ca "\\'{ }"                   "" "force=utf8;utf8-cjk;euc-tw;gbk" # MODIFIER LETTER ACUTE ACCENT
-0x02cb "\\`{ }"                   "" "force=utf8;utf8-cjk;euc-tw;gbk" # MODIFIER LETTER GRAVE ACCENT
+0x02ca "\\'{ }"                   "deprecated" "force=utf8;utf8-cjk;euc-tw;gbk" # MODIFIER LETTER ACUTE ACCENT (deprecated to avoid conflict with 0x0384)
+0x02cb "\\`{ }"                   "deprecated" "force=utf8;utf8-cjk;euc-tw;gbk" # MODIFIER LETTER GRAVE ACCENT (deprecated to avoid conflict with 0x1fef)
 0x02cc "\\textsecstress"          "tipa" "force" # MODIFIER LETTER LOW VERTICAL LINE
 0x02cd "\\b{ }"                   "" "force=utf8;utf8-cjk" # MODIFIER LETTER LOW MACRON
 0x02ce "\\textsubgrave{ }"        "tipa" "force" # MODIFIER LETTER LOW GRAVE ACCENT
@@ -646,6 +646,7 @@
 0x02da "\\r{ }"                   "" "force=utf8;utf8-cjk;euc-jp;euc-kr" # RING ABOVE
 0x02db "\\k{ }"                   "" "force=utf8;utf8-cjk;euc-jp;euc-kr" # OGONEK
 0x02dc "\\~{ }"                   "" "" # SMALL TILDE
+0x02dc "\\textasciitilde" ""
 0x02dd "\\H{ }"                   "" "force=utf8-cjk;euc-jp;euc-kr" # DOUBLE ACUTE ACCENT
 0x02de "\\textrhoticity"          "tipa" "force" # MODIFIER LETTER RHOTIC HOOK
 #0x02df "\\textovercross{ }"       "tipa" "force" # MODIFIER LETTER CROSS ACCENT
@@ -653,7 +654,7 @@
 0x02e1 "\\textsuperscript{l}"     "" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER SMALL L
 0x02e2 "\\textsuperscript{s}"     "" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER SMALL S
 0x02e3 "\\textsuperscript{x}"     "" "force=utf8;utf8x;utf8-cjk" # MODIFIER LETTER SMALL X
-0x02e4 "\\textsuperscript{\\textrevglotstop}" "tipa" "force" # MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+0x02e4 "\\textsuperscript{\\textrevglotstop}" "tipa,deprecated" "force" # MODIFIER LETTER SMALL REVERSED GLOTTAL STOP (deprecated to avoid conflict with 0x02c1)
 0x02e5 "\\tone{55}"               "tone" "force" # MODIFIER LETTER EXTRA-HIGH TONE BAR
 0x02e6 "\\tone{44}"               "tone" "force" # MODIFIER LETTER HIGH TONE BAR
 0x02e7 "\\tone{33}"               "tone" "force" # MODIFIER LETTER MID TONE BAR
@@ -665,7 +666,7 @@
 #0x02ed ""                         "" "" # MODIFIER LETTER UNASPIRATED
 #0x02ee ""                         "" "" # MODIFIER LETTER DOUBLE APOSTROPHE
 #0x02ef ""                         "" "" "" "" # MODIFIER LETTER LOW DOWN ARROWHEAD
-0x02f0 "\\textsubcircum{ }"       "tipa" "force" # MODIFIER LETTER LOW UP ARROWHEAD
+0x02f0 "\\textsubcircum{ }"       "tipa,deprecated" "force" # MODIFIER LETTER LOW UP ARROWHEAD (deprecated to avoid conflict with 0x2038)
 #0x02f1 ""                         "" "" # MODIFIER LETTER LOW LEFT ARROWHEAD
 #0x02f2 ""                         "" "" # MODIFIER LETTER LOW RIGHT ARROWHEAD
 #0x02f3 ""                         "" "" # MODIFIER LETTER LOW RING
@@ -750,7 +751,6 @@
 #0x033f ""                         "" "combining,force" # COMBINING DOUBLE OVERLINE
 #0x0340 ""                         "" "combining,force" # COMBINING GRAVE TONE MARK
 #0x0341 ""                         "" "combining,force" # COMBINING ACUTE TONE MARK
-0x0342 "\\~"                       "" "combining,force" "" "" # COMBINING GREEK PERISPOMENI
 # the following definitions fail because of the required font switch to LGR, see #6463
 #0x0342 "\\accperispomeni" "textgreek" "combining,force" # COMBINING GREEK PERISPOMENI
 #0x0343 "\\accpsili"  "textgreek" "combining,force" # COMBINING GREEK KORONIS
@@ -1272,7 +1272,7 @@
 #0x1d05 ""                         "" "" # LATIN LETTER SMALL CAPITAL D
 #0x1d06 ""                         "" "" # LATIN LETTER SMALL CAPITAL ETH
 0x1d07 "\\textsce"                "tipa" "force" # LATIN LETTER SMALL CAPITAL E
-0x1d08 "\\textrevepsilon"         "tipa" "force" # LATIN SMALL LETTER TURNED OPEN E
+0x1d08 "\\textrevepsilon"         "tipa,deprecated" "force" # LATIN SMALL LETTER TURNED OPEN E (deprecated to avoid conflict with 0x025c)
 #0x1d09 ""                         "" "" # LATIN SMALL LETTER TURNED I
 0x1d0a "\\textscj"                "tipa" "force" # LATIN LETTER SMALL CAPITAL J
 0x1d0b "\\textsck"                "tipx" "force" # LATIN LETTER SMALL CAPITAL K
@@ -1390,7 +1390,7 @@
 #0x1d7b ""                         "" "" # LATIN SMALL CAPITAL LETTER I WITH STROKE
 #0x1d7c ""                         "" "" # LATIN SMALL LETTER IOTA WITH STROKE
 #0x1d7d ""                         "" "" # LATIN SMALL LETTER P WITH STROKE
-0x1d7e "\\textbaru"               "tipa" "force,tipashortcut=0" # LATIN SMALL CAPITAL LETTER U WITH STROKE
+0x1d7e "\\textbaru"               "tipa,deprecated" "force,tipashortcut=0" # LATIN SMALL CAPITAL LETTER U WITH STROKE (deprecated to avoid conflict with 0x0289)
 #0x1d7f ""                         "" "" # LATIN SMALL LETTER UPSILON WITH STROKE
 #
 # 67 Combining Diacritical Marks Supplement
@@ -1825,10 +1825,10 @@
 0x1fba "\\`\\textAlpha"	                "textgreek" "" "" "" # GREEK CAPITAL LETTER ALPHA WITH VARIA
 0x1fbb "\\'\\textAlpha"	                "textgreek" "deprecated" "" "" # GREEK CAPITAL LETTER ALPHA WITH OXIA
 0x1fbc "\\textAlpha\\prosgegrammeni"	"textgreek" "" "" "" # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
-0x1fbd "\\accpsili{ }"		"textgreek" "" "" "" # GREEK KORONIS
+0x1fbd "\\accpsili{ }"		"textgreek,deprecated" "" "" "" # GREEK KORONIS (deprecated to avoid conflict with 0x1fbf)
 0x1fbe "\\textcompwordmark\\prosgegrammeni" "textgreek" "" "" "" # GREEK PROSGEGRAMMENI
 0x1fbf "\\accpsili{ }"         "textgreek" "" "" "" # GREEK PSILI
-0x1fc0 "\\~{ }"         "textgreek" "" "" "" # GREEK PERISPOMENI
+0x1fc0 "\\~{ }"         "textgreek,deprecated" "" "" "" # GREEK PERISPOMENI (deprecated to avoid conflict with 0x02dc)
 0x1fc1 "\\~\"{ }"       "textgreek" "" "" "" # GREEK DIALYTIKA AND PERISPOMENI
 0x1fc2 "\\`\\texteta\\ypogegrammeni"   "textgreek" "" "" "" # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI
 0x1fc3 "\\texteta\\ypogegrammeni"      "textgreek" "" "" "" # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI
@@ -1903,9 +1903,9 @@
 #0x200d ""                         "" "" "" "" # ZERO WIDTH JOINER
 #0x200e ""                         "" "" "" "" # LEFT-TO-RIGHT MARK
 #0x200f ""                         "" "" "" "" # RIGHT-TO-LEFT MARK
-0x2010 "-"                        "" "force=utf8x;euc-jp;gbk;jis,notermination=text" "" "" # HYPHEN, use HYPHEN-MINUS
+0x2010 "-"                        "deprecated" "force=utf8x;euc-jp;gbk;jis,notermination=text" "" "" # HYPHEN, use HYPHEN-MINUS (deprecated to avoid conflict with 0x2212)à
 0x2011 "\\nobreakdash-"           "amsmath" "notermination=text" "" "" # NON-BREAKING HYPHEN
-0x2012 "-"                        "" "force=utf8x,notermination=text" "" "" # FIGURE DASH, use HYPHEN-MINUS
+0x2012 "-"                        "deprecated" "force=utf8x,notermination=text" "" "" # FIGURE DASH, use HYPHEN-MINUS (deprecated to avoid conflict with 0x2212)
 0x2013 "\\textendash"             "" "force=euc-tw;gbk" # EN DASH
 0x2014 "\\textemdash"             "" "force=armscii8;euc-tw;gbk" # EM DASH
 # use the following macro for the character HORIZONTAL BAR # inputenc uses \textemdash
@@ -1925,7 +1925,7 @@
 0x2021 "\\ddag"                   "" "force=cp1256;euc-jp;euc-kr;jis" "\\ddagger" "" # DOUBLE DAGGER
 0x2021 "\\textdaggerdbl" ""
 0x2022 "\\textbullet"             "textcomp" "force=cp1256" "\\bullet" "" # BULLET
-0x2023 "\\textifsymbol[ifgeo]{116}" "ifsym" "force=utf8;utf8x;utf8-cjk" # TRIANGULAR BULLET # ≈ 0x25b8
+0x2023 "\\textifsymbol[ifgeo]{116}" "ifsym,deprecated" "force=utf8;utf8x;utf8-cjk" # TRIANGULAR BULLET # ≈ 0x25b8 (deprecated to avoid conflict with 0x25b8)
 0x2024 "."                        "" "notermination=text,force=utf8;utf8-cjk;utf8x" "" "" # ONE DOT LEADER # ≈ FULL STOP
 0x2025 ".\\,."                    "" "notermination=text,force=utf8;utf8-cjk;utf8x;euc-jp;euc-kr;euc-tw;gbk;jis" "" "" # TWO DOT LEADER
 0x2026 "\\dots"                   "" "force=armscii8;cp1256;euc-cn;euc-jp;euc-kr;euc-tw;gbk;jis" "\\ldots" "" # HORIZONTAL ELLIPSIS
@@ -1941,7 +1941,7 @@
 0x202f "\\,"                      "" "force=utf8;utf8-cjk;utf8x,notermination=both" "\\," "" # NARROW NO-BREAK SPACE
 0x2030 "\\textperthousand"        "textcomp" "force=cp1256;euc-cn;euc-jp;euc-kr;gbk;jis" # PER MILLE SIGN
 0x2031 "\\textpertenthousand"     "textcomp" "" # PER TEN THOUSAND SIGN
-0x2032 "\\textasciiacute"         "textcomp" "force=utf8;utf8-cjk;euc-cn;euc-jp;euc-kr;euc-tw;gbk;jis" "\\prime" "" # PRIME
+0x2032 "\\textprime"              "textcomp" "force=utf8;utf8-cjk;euc-cn;euc-jp;euc-kr;euc-tw;gbk;jis" "\\prime" "" # PRIME
 0x2033 "\\textacutedbl"           "textcomp" "force=utf8;utf8-cjk;euc-cn;euc-jp;euc-kr;gbk;jis" "\\dprime" "" # DOUBLE PRIME
 #0x2034 ""                         "" "" # TRIPLE PRIME
 0x2035 "\\textasciigrave"         "textcomp" "force=utf8;utf8x;utf8-cjk;euc-tw;gbk;jis" "\\backprime" "amssymb" # REVERSED PRIME
@@ -1966,7 +1966,7 @@
 0x2047 "??"                       "" "notermination=text,force=utf8;utf8-cjk;utf8x" "??" "" # DOUBLE QUESTION MARK # ≈ 2×QUESTION MARK
 0x2048 "?!"                       "" "notermination=text,force=utf8;utf8-cjk;utf8x" "" "" # QUESTION EXCLAMATION MARK
 0x2049 "!?"                       "" "notermination=text,force=utf8;utf8-cjk;utf8x" "" "" # EXCLAMATION QUESTION MARK
-0x204e "\\textasteriskcentered"   "textcomp" "force=utf8x" "\\ast" "" # LOW ASTERISK
+0x204e "\\textasterisklow"        "textcomp" "force=utf8x" "\\ast" "" # LOW ASTERISK
 0x2052 "\\textdiscount"           "textcomp" "force=utf8x" # COMMERCIAL MINUS SIGN
 0x205d ""                         "" "force=utf8;utf8x;utf8-cjk" "\\vdots" ""# TRICOLON # ≈ VERTICAL ELLIPSIS, fails in text mode, if "mathdots" is loaded.
 #0x205e ""                         "" "" "" "" # VERTICAL FOUR DOTS
@@ -3367,7 +3367,7 @@
 0x2726 "\\FourStar"               "bbding" "force" # BLACK FOUR POINTED STAR
 0x2727 "\\FourStarOpen"           "bbding" "force" # WHITE FOUR POINTED STAR
 #0x2728 ""                         "" ""      # SPARKLES
-0x2729 "\\FiveStarOpen"           "bbding" "force" #       STRESS OUTLINED WHITE STAR
+0x2729 "\\FiveStarOpen"           "bbding,deprecated" "force" #       STRESS OUTLINED WHITE STAR (deprecated to avoid conflict with 0x2606)
 0x272a "\\FiveStarOpenCircled"    "bbding" "force" # CIRCLED WHITE STAR
 0x272b "\\FiveStarCenterOpen"     "bbding" "force" # OPEN CENTRE BLACK STAR
 0x272c "\\FiveStarOpenDotted"     "bbding" "force" # BLACK CENTRE WHITE STAR
-- 
2.30.1.windows.1

