On Mon, 25 Aug 2008, Patrick R. Michaud wrote:

||cell text ||__spanning text ||
||text      ||__more spanning text ||
||more      ||__last row of spanning text ||
||aaa       ||bbb ||

I like this as well, but it has the distinct drawback that the markup engine would have to "look ahead" to determine the number of rows to be spanned and to find the complete text of the current cell, and then remember not to re-render that text in subsequent rows. Doing that might be a bit tricky.

Another drawback is if you wish to place two twospans on top of each other. :-( So something more might still be required.

recipe http://www.pmwiki.org/wiki/Cookbook/TableEdit improves this

As long as the table markup that is produced/consumed is still readable/writable by human editors, I think this approach could be okay.

I definitely agree on this.

For example, does TableEdit understand (and preserve) all of the table options that might exist in a manually generated table? Or do some of the properties get lost?

I loses some of the properties I believe, but I see no reason why it couldn't retain them. In other words, it's not feature complete. A version based on JavaScript and perhaps also AJAX would probably improve the experience quite a bit. For instance, it's very cool how the google calendar allows you to just click in a cell and start writing.

(:simpletable separator=";" alignment="llc" :)
Column A ; Column B  ; Column C
asfasdf  ; asdfasdf  ; asdfas
afasdff  ;
(:simpletableend:)

I like this approach a lot -- I'll have to think about it. It might even be do-able within the existing table markup, as something like:

|| separator=";" alignment="llc"
|| Column A ; Column B ; Column C
|| apple    ; banana   ; cherry
|| ask      ;

Or, perhaps combine separators and alignments in a single format string,
allowing the separator to change:

|| format="l ; l - c"
|| Column A ; Column B - Column C
|| apple    ; banana   - cherry
|| ask      ;          -

I like this version, but it's probably not so easy to understand. However, prefixing each line with '||' is a bit of a annoyance -- it's no longer possible to just paste the table from an external source.

Perhaps it might even be possible to use multiple spaces as column separator, thus allowing:

(:simpletable separator="  " alignment="lcr" :)
Column A    Column B     Column C

... how would one specify an "empty" cell?

That's certainly a problem. I have no answer, but maybe   could
be used to mark an empty cell?

Having written some posts on this subject now, I think I'm leaning towards the following:

* Add mechanism to convert between different types of table markup styles.

* Aim for a reasonable table editor in the core. It's important that
  the editor doesn't destory parts of the table markup that it doesn't
  recognice. It'd be ok if it can only work with (:table:) if it's
  possible to convert.

* Add mechanism to control alignment on a column basis. This is
  for ||...||-tables as well. If cells in the table need a different
  alignement, this should be done with e.g. %left% in the cell.

Best regards
/Christian

--
Christian Ridderström, +46-8-768 39 44            http://www.md.kth.se/~chr
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to