#1293 closed enhancement (fixed)
[patch] Table cell merging (colspan)
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | wiki system | Version: | devel |
Severity: | minor | Keywords: | table colspan column merge review |
Cc: | sergeych@…, jan@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The attached patch implements column spanning/merging in the Trac WikiFormatting. Syntax is very basic, though not 100% backward compatible.
The following table
|| Cell 1 || Cell 2 || Cell 3 || || Cell 4 |||| Cell 5 and 6 ||
currently renders as
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 and 6 |
but with this patch renders as
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 and 6 |
Attachments (3)
Change History (19)
by , 20 years ago
Attachment: | colspan-20050314.diff added |
---|
comment:1 by , 20 years ago
Nice improvement, but I would think cell 4 and 5 would have been merged in your example. Merging the empty cell with the previous cell rather then the next one makes more sense to me.
comment:2 by , 20 years ago
How about something like this?
|| Cell 1 || Cell 2 || Cell 3 || || Cell 4 ||| Cell 5 and 6 ||| |||| Cell 7, 8 and 9 ||||
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 and 6 | |
Cell 7, 8 and 9 |
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | 0.8.1 → devel |
comment:5 by , 19 years ago
Milestone: | 0.9 → 1.0 |
---|
I'm not sure I like either of these syntax proposals. As far as I can tell they only allow a "colspan" of 1 or 2. We should probably support larger colspans as well…
Moving to Milestone 1.0
comment:6 by , 18 years ago
width denotes the spanning: |
|||||| 1+2+3 || || 1 |||| 2 + 3 || |||| 1+2 || 3 || || 1 || 2 || 3 ||
The wiki syntax had never been overly stylish but it is known and handy.
comment:7 by , 18 years ago
Milestone: | 1.0 → 0.11 |
---|
Ok, I'll have a look at integrating this as soon as we start the 0.11 development cycle.
comment:8 by , 18 years ago
Cc: | added |
---|
comment:9 by , 18 years ago
Keywords: | review added |
---|---|
Summary: | Table cell merging (colspan) → [patch] Table cell merging (colspan) |
Changing title to include [patch] and adding review keyword
comment:10 by , 17 years ago
Milestone: | 0.11.1 → 0.12 |
---|---|
Priority: | lowest → normal |
Severity: | normal → minor |
Note that there are also two other alternatives to consider: the DokuWiki table syntax (see #771 and the formatter patch) and the MediaWiki way (see #1424).
by , 16 years ago
Attachment: | table_cell_attributes.patch added |
---|
Another approach to having richer tables.
comment:11 by , 16 years ago
The patch attachment:table_cell_attributes.patch I added makes allows for the following syntax:
|| A || B || C || ||rowspan="2"| X || B2 || C2 || || B3 || C3 ||
It's probably not the best way, but it's a quick and easy fix to allow both colspans and rowspans. Optionally, you can use it to add extra markup too.
comment:12 by , 16 years ago
Cc: | added |
---|
comment:13 by , 15 years ago
Milestone: | next-major-0.1X → 0.12 |
---|---|
Owner: | changed from | to
Status: | reopened → new |
comment:14 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
MoinMoin compatible syntax described in #comment:description implemented in r8698.
comment:15 by , 5 years ago
how shall i merge cell 1 and cell 4
in this below table.
cell 1 | Cell 2 | Cell 3 |
cell 4 | | Cell 5 and 6 | | |
Cell 7, 8 and 9 |
Patch implementing table column spanning