Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Which is, in a nutshell, why it's important for a formal language to be easy to read and write, and why eliminating overly verbose notation matters. It's not just for computers...


In this respect I think AsciiMath doesn't go far enough, precisely because of the Ascii part. Especially for super- and subscripts, why not use the corresponding Unicode characters?

At least on my keyboard, "x^2" is one keystroke more than "x²", and the latter is much more redable.


AsciiMath optimises for ease of use in both reading and writing. Fewer people know how to write x² than x^2, yet virtually everyone will read them equivalently. That's not true for n/2 versus \frac{n}{2}.


Isn't x^2 typed <x><^><space><2>, while x² is the same minus the <space>, on most keyboards?


Not in US standard keyboards, no. You're using an international keyboard layout with dead keys.


I've never knowingly seen a keyboard that would allow you to type ² at all. So, no.


On my Linux Mint 18 KDE system, ² can be typeset by typing AltGr-2 (I can get ½ by pressing AltGr-5). I am using an Italian keyboard, but I bet this works with US keyboards as well.

Recently I used Windows 10 quite a bit, and the number of AltGr combinations available on Linux has been the thing I missed the most!


I wouldn't want to make that bet, considering a US keyboard has no AltGr key.

It might work with a US keyboard as long as your computer was configured for an Italian keyboard, though. https://en.wikipedia.org/wiki/AltGr_key suggests that from the keyboard's perspective, AltGr and right Alt are the same thing. Really, no keyboard allows any character -- they just send key codes (and modifier codes), and it's on your software to interpret those. But typing ² is not part of the normal, expected functioning of a US keyboard.

Edit: it occurs to me that perhaps I should gloss "it's on your software to interpret those" as "it is the responsibility of your software to interpret those".


You're right, US keyboards do not support AltGr! I have always used european keyboards and every one of them supports AltGr, so I assumed that US keyboards did the same.

Just for testing, I installed a few new keyboards on my KDE desktop, and I can confirm that French, German, Spanish, and Greek keyboards have support for AltGr combinations to get superscripts/fractions/other characters.

I've never required that a keyboard could allow any character. However, this is indeed possible today, as Shift+Ctrl+u+HexNumber allows to quickly insert any Unicode character. (This works under Xfce and KDE, and probably other DEs.)

Nevertheless, I think that a 100-and-more-keys keyboard should support a subset of the most useful ones. I am a physicist and an Italian, so having quick keyboard combinations for exponents, fractions, and the euro sign € is extremely handy for my everyday activities.


I think what you are looking for is the us international keyboard layout, which has support for altgr combinations


The AltGr key is one of the three things I hate about EU keyboards, because it removes the right Alt key, along with the ability to use you right hand to type shortcuts such as alt-ctrl-arrows or alt-ctrl-<some letter on the right side of the keyboard>.

The other abominations on those keyboards are the shorter left Shift key and the vertical Enter, both of which put two of the most used keys one position further away from home row.


No. I've never seen a keyboard do this.


Every german keyboard can do this. And a quick (non-exhaustive) google image search shows that many other keyboard layouts support it, e.g. french, turkish and portuguese (brazil but not portugal)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: