Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL does not understand \Mu and \Nu #50911

Closed
eschnett opened this issue Aug 14, 2023 · 4 comments · Fixed by #50925
Closed

REPL does not understand \Mu and \Nu #50911

eschnett opened this issue Aug 14, 2023 · 4 comments · Fixed by #50925
Labels
domain:unicode Related to unicode characters and encodings stdlib:REPL Julia's REPL (Read Eval Print Loop)

Comments

@eschnett
Copy link
Contributor

The REPL does not complete the upper case greek letters \Mu and \Nu. The auto-generated tables call these letters \upMu and \upNu instead. This is counter-intuitive since all other upper case letters are available without an up prefix, e.g. \Alpha.

julia> versioninfo()
Julia Version 1.11.0-DEV.278
Commit 71570298a4 (2023-08-14 12:53 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin22.6.0)
  CPU: 16 × Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
  Threads: 1 on 16 virtual cores
@i9e1
Copy link

i9e1 commented Aug 14, 2023

Input greek / sequence -> Output latin seems ok, but the other way around?
I'm unsure which latex packages defines \Alpha, as I'm used to the latin uppercase letters if they coincide with greeks.
Isn't the problem that that something like \Alpha works?

Lines 2677-2679 in #50913 :
Do you really want to reverse map latin M to greek \Mu?

@i9e1
Copy link

i9e1 commented Aug 14, 2023

In unicode.xml your mentioned characters are defined as plain latin M, N, O as <latex> replacement. Its not a problem which is introduced by the REPL at all.
IMHO your approach (overwriting this downstream) is not the best to tackle this inconsistency.

unicode.xml
6966   │ <character id="U00391" dec="913" mode="math" type="alphabetic">
6967   │  <afii>2641</afii>
6968   │  <latex>\Alpha </latex>               <======= here explicit Latex escape sequence
...
6983   │  <description>GREEK CAPITAL LETTER ALPHA</description>
6984   │ </character>

...

7226   │ <character id="U0039C" dec="924" mode="math" type="alphabetic">
7227   │  <afii>264F</afii>
7228   │  <latex>M</latex>                         <==== here latin
...
7243   │  <description>GREEK CAPITAL LETTER MU</description>
7244   │ </character>

(I edited this a few times as researching unicode.xml was easier than I first thought)

@stevengj
Copy link
Member

I tentatively agree that we should rationalize \upMu and \upNu to \Mu and \Nu, although these symbols have limited utility because of their resemblance to Latin symbols. These abbreviations happened in the initial automated import, which had some odd choices.

This should be an easy PR.

@stevengj
Copy link
Member

Indeed, as far as I can tell the \up here stands for "upright" (ala the upgreek package) and not "uppercase". Which is silly for us to keep because our other Greek completions are upright by default.)

@brenhinkeller brenhinkeller added stdlib:REPL Julia's REPL (Read Eval Print Loop) domain:unicode Related to unicode characters and encodings labels Oct 20, 2023
giordano pushed a commit that referenced this issue Dec 15, 2023
…u -> \Mu) (#50925)

Closes #50911.  Closes #50913.

There were a few oddball symbols prefixed with `\up` (for "upright") for
no reason that I can tell, ala the LaTeX "upgreek" package, even though
we don't use an `\up` prefix for other upright Greek letters (e.g. we
have `\alpha`, not `\upalpha`, even though it isn't italicized — we have
`\italpha` for italic alpha).

Not breaking since this is just a UI thing.

(In practice, I doubt many people use these symbols. e.g. `\upMu` is
`Μ`, which looks a lot like the Latin `M`. But there is no reason to
have the `\up` prefix here. It seems to have just been an automated
abbreviation-import snafu. And [`\upkoppa 'ϟ'`
(U+O3DF)](https://www.compart.com/en/unicode/U+03DF) is visually quite
distinctive though I've never seen it used in math, not to mention
lowercase — it's definitely goofy to have an `\up` prefix for it.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:unicode Related to unicode characters and encodings stdlib:REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
4 participants