Tables

Mark Smith mark at bbprojects.net
Sat Dec 3 03:59:05 EST 2005


@ 01:02 on 2.12.05, Dr. Drang wrote:


>On 12/2/05, John Gruber <gruber at fedora.net> wrote:



>> Multiply | by | to get

>> ----------|----------|---------

>> ft | 0.3048 | m

>> mph | 0.4470 | m/s

>> in | 25.4000 | mm

>> hp | 745.7000 | W

>>

>>

>> You can say, "Well, I don't want to add those zeroes", but

>> my answer would be "Then just right raw HTML". I think

>> anything other than left/right/center alignment is

>> needless complexity for Markdown.


Yes, but the type of decimal alignment suggested could take the form of centre alignment, so long as the column was centred according to the position of the decimal point in the longest numerical string. A non-programmers analysis suggests to me that this may perhaps be "not significantly more difficult" than getting "normal" centre alignment.


>Well, it's not that I don't want to add the zeros, it would

>be *wrong* to add them. They indicate more significant

>digits than is warranted.


IMO this is an important point (at least for a subset of users - including us scientists).

Can I turn it around and ask whether anyone would particularly want a column containing only numbers with decimals to be aligned other than according to the position of the decimal point and not requiring inapproriate leading or trailing zeroes ?

[Since "pure" left or right alingment of such columns will almost never be practical, defaulting to "pure" centre according to decimal point would be a small (and IMO acceptable) compromise.

To my mind, all other forms of aligning columns of numbers with decimals are plain wrong, but I may be missing some cases.

*If* "centre according to decimal point alignment" was a fixed default for a column containing only numbers with decimals, Markdown's "user complexity" would not grow, because there would only be a single behaviour for such a column type. It would then be the case that the "other" formats for columns of decimal numbers would require the table to be hand-coded.

Any takers ?

mark.


More information about the Markdown-Discuss mailing list