Edgewall Software
Modify

Opened 19 years ago

Closed 15 years ago

Last modified 4 years ago

#1293 closed enhancement (fixed)

[patch] Table cell merging (colspan)

Reported by: trac-form@… 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 1Cell 2Cell 3
Cell 4Cell 5 and 6

Attachments (3)

colspan-20050314.diff (2.1 KB ) - added by trac-form@… 19 years ago.
Patch implementing table column spanning
colspan_patch.txt (1012 bytes ) - added by sergeych <sergeych@…> 18 years ago.
Another Moin wiki table columns span syntax
table_cell_attributes.patch (1.2 KB ) - added by jan@… 15 years ago.
Another approach to having richer tables.

Download all attachments as: .zip

Change History (19)

by trac-form@…, 19 years ago

Attachment: colspan-20050314.diff added

Patch implementing table column spanning

comment:1 by anonymous, 19 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 anonymous, 19 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 anonymous, 19 years ago

Resolution: fixed
Status: newclosed

comment:4 by anonymous, 19 years ago

Resolution: fixed
Status: closedreopened
Version: 0.8.1devel

comment:5 by anonymous, 19 years ago

Milestone: 0.91.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

by sergeych <sergeych@…>, 18 years ago

Attachment: colspan_patch.txt added

Another Moin wiki table columns span syntax

comment:6 by sergeych <sergeych@…>, 18 years ago

The proposed patch adds MoinMoin wiki table column span syntax with any span size: the opening 'column' symbol
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 Christian Boos, 18 years ago

Milestone: 1.00.11

Ok, I'll have a look at integrating this as soon as we start the 0.11 development cycle.

comment:8 by anonymous, 18 years ago

Cc: sergeych@… added

comment:9 by anonymous, 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 Christian Boos, 16 years ago

Milestone: 0.11.10.12
Priority: lowestnormal
Severity: normalminor

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 jan@…, 15 years ago

Attachment: table_cell_attributes.patch added

Another approach to having richer tables.

comment:11 by jan@…, 15 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 jan@…, 15 years ago

Cc: jan@… added

comment:13 by Christian Boos, 15 years ago

Milestone: next-major-0.1X0.12
Owner: changed from Jonas Borgström to Christian Boos
Status: reopenednew

comment:14 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

MoinMoin compatible syntax described in #comment:description implemented in r8698.

comment:15 by anonymous, 4 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

comment:16 by Ryan J Ollos, 4 years ago

Please ask on the MailingList.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.