Keno / SIUnits.jl

Efficient unit-checked computation
Other
70 stars 26 forks source link

Use the same $\mu$ character that the REPL produces with \mu-TAB #23

Closed timholy closed 9 years ago

ivarne commented 10 years ago

Is this a breaking change, or does normalization hide the issue?

timholy commented 10 years ago

If users have units written to a disk file, this would be breaking. (I will be one such user affected by this change.)

However, after talking with Keno, we both wonder whether the better approach might be to change the \mu rendered in the REPL. For both him and me, the one that \mu-TAB produces is not the one that is suggested by our OS. So if you use the character generator rather than the LaTeX mode, you get conflicts.

CC @stevengj, @JeffBezanson.

stevengj commented 10 years ago

Technically, the micro sign µ in micrometers etc. is a different codepoint than the greek small mu that is produced by \mu. NFC does normalize one into the other; NFKC would normalize µ into μ but it was decided not to use NFKC (JuliaLang/julia#5434).

However, I think that this distinction is not worth preserving, and we are better off with using the same \mu codepoint for both.

stevengj commented 10 years ago

No, \mu should definitely not produce the micro codepoint. This would be inconsistent with how all of the other greek letters are treated.

Yes, typing option-m on MacOS produces the micro sign, not mu. But using Greek input mode on MacOS (which is what I used to use for Greek letters in Julia prior to the LaTeX substitutions) produces mu.

stevengj commented 10 years ago

As discussed in JuliaLang/julia#5903, it might be worthwhile to normalize µ (micro) to μ (mu) in identifiers, as one of a limited set of additions to NFC normalization.

timholy commented 10 years ago

I'll be happy with any decision that synchronizes these two.

Keno commented 9 years ago

Now that tab completion is more prevalent, I think this should be merged, even if it's not the µ you get from the keyboard.

stevengj commented 9 years ago

Why not just export both versions?

Keno commented 9 years ago

Oh, huh, somehow I had not considered that option ;). Great idea!

Keno commented 9 years ago

Done