pyret-lang icon indicating copy to clipboard operation
pyret-lang copied to clipboard

decimal-align numbers in tables

Open shriram opened this issue 3 years ago • 1 comments

When printing tables, numeric columns should be decimal-aligned. So for instance, in this table image all the numbers would be right-aligned, but if there are decimals, that would further be taken into account (right-align to the left of the decimal, left-align to the right of it).

shriram avatar Aug 28 '22 19:08 shriram

Oh man, I just saw an article by Eric Meyer (who's an expert wizard at all things CSS) about how excruciatingly hard it was to get decimal alignment correct on the web. It seems like it should be simple; it is not.

Also, it's going to be especially hard for us to get good-looking alignment, when we have exact fractions that can be wildly of different lengths, so the alignment column isn't visually simple. I'm inclined to say this is a nice-to-have but not-likely-to-have feature. For BS:P folks, and I think BS:DS folks, we've typically had them convert the numbers to some fixed precision to dodge this issue. So far, it seems to be working well enough for them...

blerner avatar Aug 28 '22 21:08 blerner