Tables

robert mcgonegal robert37 at gmail.com
Fri Dec 2 16:42:49 EST 2005



On 2-Dec-05, at 1:55 PM, Michel Fortin wrote:


> Le 2005-12-02 à 13:28, Dr. Drang a écrit :

>

>> * In fact, I'd like to see the cell alignment extended to include

>> decimal

>> alignment. Thus

>>

>> Multiply | by | to get

>> ----------|.---------|---------

>> ft | 0.3048 | m

>> mph | 0.447 | m/s

>> in | 25.4 | mm

>> hp | 745.7 | W

>>

>> would align the middle column on the decimal point using a

>> <col align="char"> tag. As with the colon, the period tucked in the

>> line of dashes seems unobtrusive to me.

>

> Pretty good idea... but for this to be useful you need some browser

> support. Unless I'm mistaken, this isn't supported neither by

> Firefox or Safari. This is one reason why PHP Markdown Extra

> doesn't support this.

>

> The other problem is that you cannot always count on the alignment

> character to be a dot. If French, for example, the decimal

> separator is a comma. And there may be some uses for other

> characters as well, I'm thinking about '/' or ':' to align ratios.



Multiply | by | to get | Three | Four | Five
<---------|,---------|:---------|-------->|<---------->|'----------
ft | 0,3048 | 234:1 | m | Yes | 22'06
mph | 0,447 | 3:2 | m/s | No | 332'045
in | 25,4 | 23:1 | mm | Perhaps | 4'78
hp | 745,7 | 2:3 | W | Maybe | 23'451


The default would be aligned left, so <--- isn't necessary.

Robert McGonegal


More information about the Markdown-Discuss mailing list