How does one write a unicode character in a discourse thread?

1 Like

Copy-pasta: æ, ø, ∰, …

If there is no source where to copy from? What then?

I would argue that the glyph is THE source.

Copy paste from Julia REPL - I don’t know anything about scientific computing, I only really use Julia as a Unicode character creation machine

14 Likes

A few solutions that I tend to use:

1. write (La)TeX (as in $\alpha$)
2. fire up a Julia REPL and auto-complete the unicode character from its TeX representation (\alpha<TAB>) and copy-paste it
3. get a nearby emacs window and use M-x insert-char to insert the unicode character and copy-paste it
4. there are tons of web sites where its easy to find unicode character by name and copy them to the clipboard. Here is an example

(I have to admit that I’m not always a big fan of unicode characters in source code, but typing unicode in a Julia REPL is so painless that I sometimes compose parts of my emails in the Julia REPL)

4 Likes

Then there will also be no internet where to write on discourse.

1 Like

“There is no source” simply means “I don’t know where to find the source”. Where is THE source of glyphs that you speak of?

And the other way around, I use Julia to find which is the LaTeX code that gives me some characters I don’t know how to type:

help?> ∰
"∰" can be typed by \oiiint<tab>


4 Likes

If you want to find a convenient symbol to represent a closed volume integral, I bet you will search the internet and look how the glyph looks like. Let you guess from the hits that show up for unicode and glyph, which one is human readable and easier for copy-pasta into discourse.

For those who, like me, are looking for some forms of unicode characters, here is a good source: http://www.unicode-symbol.com/ . To include the characters in a discourse thread, use the html form.

On a related note, I highly recommend Detexify LaTeX handwritten symbol recognition which lets you draw a symbol then it uses ML to find possible latex matches. (or http://shapecatcher.com/ for unicode)

2 Likes

One more approach: from the REPL, you can use Julia’s clipboard function, which copies a given string to the system clipboard:

julia> “â²” |> clipboard


This also enables the use of REPL history & search modes to quickly recover some commonly-used string (I’ve found it useful for marking up stacks of homework submitted through online portals during COVID).

1 Like

If you’re on macOS, I’ve developed a custom “US International - Scientific” keyboard layout that will let you type a very large number of math-unicode symbols directly.

It skews a little towards my personal use case of quantum physics, but it should cover Julia more broadly pretty well.

Presumably, the keyboard layout could be ported to Windows/Linux (not my using those, but they also have ways of setting up custom keyboard mappings)

If the Unicode character has a LaTeX command supported by the Discourse math engine (MathJax I think) then while writing your message you can write e.g. $\theta$ or $\iint$ and the math will be shown in the preview on the right side. You can copy the Unicode symbols from there.

1 Like

For Windows and Linux you can use a compose key: Touch-Typing Unicode: How and Why
I get heavy mileage out of WinCompose, typing greek letters and symbols everywhere.