Thursday, May 06, 2021

Digit Grouping, SI-Style @ Stupid O'Clock

Yes, I'm well-aware that it is stupid o'clock.

No, there isn't an incoming rant. However, there is a quick technical update.

I tweaked my personal domain a bit more to better handle large numbers by following the SI style (English version) of grouping digits. I decided to follow the Wikipedia example and use CSS magic to attain the needed grouping/spacing without adding extraneous space characters that would foul up the search (this search issue is a problem for the pretty-printer that uses many different kinds of hidden spaces to achieve the specific requirements). However, Wikipedia chose to use a regular space as the separator (0.25 em), while I preferred the thin-space instead (0.15 em). Part of the reason for that preference (other than the stronger grouping characteristic of the digits to form a single number) is that the thinner space fouled up the dotted underline that comes with the <abbr> tag much less.

That last sentence may not make much sense until the easter egg is found.

Anyway, going back to the main reason for wanting to do this: the summary page of my NaNoWriMo attempts/wins. The five-digit word counts looked a little annoying without the digit grouping, and thus needed to be rectified.

As a small bonus, I could quickly script up a life-time word count for all my NaNoWriMo entries and present that up front as well. In this case, the grouping of digits was even more important since as at this point in time, I have written about 650k words across the 12 years of NaNoWriMo.

Okay, itch scratched.

Bed-time it is for me. Till the next update.

No comments: