3 ms·
SymPy has Unicode output, you can try it here: live.sympy.org Note how "Symbol('alpha')" and "Symbol('x_a')" get converted to unicode. There are limitations th
by whyever 9y ago
SymPy has Unicode output, you can try it here: live.sympy.org
Note how "Symbol('alpha')" and "Symbol('x_a')" get converted to unicode. There are limitations though, "Symbol('x_b')" does not work, because the is no underscore "b".
You can also try fancier things like "Eq(Symbol('gamma'), 1/sqrt(1 - Symbol('v')2))".
(Make sure to enable unicode output, the default is latex.)
- yorwba 9y agoInterestingly, Unicode has subscript versions of most of the Latin alphabet: ₐbcdₑfgₕᵢⱼₖlₘₙₒₚqᵣₛₜᵤᵥwₓyz. I wonder why they don't complete the set.
- ygra 9y agoBecause Unicode is not about completing arbitrary sets people would like to see. It's about encoding characters either having appeared in other encodings (to allow legacy encodings to be easily convertible to Unicode), or characters that are in actual use. The existing subscript and superscript characters were never intended to provide a full Latin alphabet (which subset, anyway?). Some are used in IPA, some are used in other contexts or scripts, but in general nothing actually requires all Latin letters. There's also some Greek, some Cyrillic, a few Hanzi, and a bunch of characters that are not used in any script. Which set would you like to »complete« again and to what end? If it's just about having something that looks the part, then markup is preferred over plain text. The existing set serves a number of purposes but none of them are lacking more characters. Usually there has to be a fairly convincing need for encoding more characters and »I'd like to be able to write some text completely in subscript or superscript« doesn't tend to be a convincing argument.
- zokier 9y agoI'm pretty sure that all ASCII alphanumeric characters have been widely used in at least subscript format in science, engineering and maths. Probably wouldn't be too difficult to find use of most, if not all, greek letters used as subscripts too in STEM literature So I'd say subscript characters definitely fall into category "characters that are in actual use".
- ygra 9y agoBut math is exactly one that needs a higher-level format than plain text, as is evident by things like TeX or, well, the paper being discussed here. I'd argue that there are few scientists who actually write in plain text without any higher-level markup.
- whyever 9y agoFunnily enough, the symbol for the newly announced particle cannot be written down with Unicode.