gold +1.2%
oil -6.4%
corn +5.2%
everything lines up and looks nice. At the moment, with CSS, there's no way to make that happen, and in normal typefaces the hyphen-minus is too narrow. You can replace the minus signs with a wider dash, but that is semantically wrong and also a pain in the arse.It occurs to me that contextual alternates could make this Just Work. I haven't used any typefaces expensive enough to do that though!
I've never thought about it, but that is somewhat annoying that the math symbols aren't a consistent width with each other.
Now throw in inline vs block equations into the mix.
In this case, an alternative to "-", U+002D HYPHEN-MINUS, is "−", U+2212 MINUS SIGN. On Linux, I considered mapping the keypad substract key to it, but instead I configured a xcompose alias.
gold +1.2%
oil −6.4%
corn +5.2%There's also option+space for and other goodies. I recently added option+x for "checkmark x" and option+v for "checkmark v" since I like dropping those around more often than I should...
Btw, if you haven't already, check out Karabiner on macOS for AutoHotkey-esque functionality.
Generally, numbers were right-aligned in cells, so the % at the end was consistent (when present) and the plus/minus before the numbers didn't make a difference because of the alignment. But labels on the left like in some P&L or Cash Flow statement were always annoying
<td align="char" char=".">€ 1.20</td>
https://www.w3.org/TR/html401/struct/tables.html#h-11.3.2HTML 4 was still in this weird in-between time where there were styling attributes in HTML coexisting with the upcoming CSS. Afair no browser ever implemented character alignment and in Google’s HTML it is only written up as obsolete:
https://html.spec.whatwg.org/multipage/obsolete.html#dom-tab...
Styling in general is of course a CSS thing – but thinking about it arranging alignment in multiple interdependent elements is a problem which not just need a property but a layout algorithm which browsers then need to implement. So we still don’t have nice things.
> It occurs to me that contextual alternates could make this Just Work.
The replacement mechanism in OpenType fonts is surprisingly useful. I remember Apple’s San Francisco font switches between different variants of the colon if it follows text characters ("my proposal: nuke it from the orbit") or if it exists between numbers as in a time ("23:52"); in the latter it is more centered.
By default, I always use old-style numerals, because they are much easier to read, especially for big numbers, for the same reason why the lowercase letters are easier to read, by having ascenders and descenders that break the uniformity of the characters.
I use lining numerals only in the same places where I would use uppercase letters, e.g. in titles or when a sentence begins with a number.
A font of antiquated faſhion doth boaſt moſt excellent and ſubſtantious qualities, yet prithee, what of olde ſtyle figures doſt thou deem hath benefit that I, in mine own diſcretion, might chooſeth?
As can be moſt clearly ſeen, the Numerals are not of equale Height, but poſſeſs Deſcendants, like the 4, and Aſcendants, like the 6.
Shouldſt thou deſire to embelliſh thy Layout with ſuch a Rendition of Numerals, thou canst: https://developer.mozilla.org/en-US/docs/Web/CSS/font-varian...
This Feature requireth though that the Font ſo employed containéd the proper Variants of the numeral Glyphs. Many a diſtinguished Font do.
(Pray note that the -th Ending of Verbs is for Singular Third Perſon Form, not to be uſed with "thou". I do, thou dost, he doth.)