Wikipedia talk:Table: namespace and editor
Appearance
Less difficult to learn and hard to remember markup; more usability. The current table markup is harder to use than it needs to be.
Maybe something like the following:
<table> City Population Area Something [[Stockholm]] 761,721 188 [[square kilometre|km²]] Foo [[Gothenburg]] 478,055 451 [[square kilometre|km²]] - [[Malmö]] 267,171 156 [[square kilometre|km²]] Bar </table>
which of course would be converted to this:
City | Population | Area | Something |
Stockholm | 761,721 | 188 km² | Foo |
Gothenburg | 478,055 | 451 km² | |
Malmö | 267,171 | 156 km² | Bar |
(For reference, here's the quick Python script I wrote to convert it to the existing table markup:)
def tablify(src): o = [] o.append("{| {{prettytable}}\n") for line in open(src).readlines(): row = filter(len, [x.strip() for x in line.split(" ")]) if not row: continue o.append("|-\n") for cell in row: if cell == "-": cell = "" o.append("| " + cell + "\n") o.append("|}") return "".join(o)
Some more syntax would of course be needed so you could set style attributes and create cells that span more than one column. Fredrik | talk 15:52, 12 Mar 2005 (UTC)
- Well there's already pipe syntax, which shortens the code, but doesn't really improve much on usability for newcomers, because it still uses the HTML table concept. ("What's a header?")
- Also, how does yours handle cell styles, headers, spanning rows/columns, background colors, etc? - Omegatron 16:25, Mar 12, 2005 (UTC)