how to type a "not equals" ≠ in Julia repl using latex?
Asked Answered
O

2

5

In Julia I understand I can do 2 != 3 to get false, and can also type latex, e.g. \alpha <tab> gives α.

However, I want to type the symbol , and in latex that would be \neq. However, in Julia when I try \neq <tab>, I do not get that symbol. Instead, I get two autocomplete possibilities: neither of which I want: \neqsim \nequiv.

How do I type this symbol?

Ovolo answered 30/12, 2022 at 12:36 Comment(0)
L
5

You can copy-paste any symbol you are investigating in Julia REPL in help mode to get information how to type it:

help?> ≠
"≠" can be typed by \ne<tab>
Luis answered 30/12, 2022 at 12:42 Comment(8)
How can one get the full list of those special characters?Deltadeltaic
docs.julialang.org/en/v1/manual/unicode-inputLighting
Most of those characters will work but some won't. There are other unicode characters not listed there that will work. unicode-table.com/enRootless
@BarryAndersen - can you then make a PR to the Julia Manual to fix the errors in that table that you refer to? Can you please give an example of both cases you mention?Lighting
@sj95126, Not quite true. It doesn't show all of those special characters in that way.Deltadeltaic
@sj95126 but I did ask for full list not a specific character, and I knew about the double Tab.Deltadeltaic
@BogumiłKamiński I have tried to use characters from that list since I started using Julia a few years ago and discovered some that will not be accepted by Julia as names for variables, functions etc. I don't remember which ones offhand. Whoever is responsible for maintenance of Julia docs should go through the list to confirm which ones do work. Some others not in that list will work. For example, combining characters; ◌̂ U+0302, ◌⃗ U+20D7, ◌̅ U+0305, ◌̇ U+0307, ◌̈ U+0308 will work. Julia 1.8.4, Debian 11Rootless
@BarryAndersen - this is not a list of valid characters that can be used in variable names, but a list of Unicode shortcuts e.g. to use in string literals. What is allowed in variable names is defined here: docs.julialang.org/en/v1/manual/variables/….Lighting
O
1

use ne, not neq. In particular, to type , do \ne <tab>

Ovolo answered 30/12, 2022 at 12:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.