(anonymous guest) (logged out)

Copyright (C) by the contributors. Some rights reserved, license BY-SA.

Sponsored by the Wiki Symposium and the Nuveon GmbH.

 
This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Table Syntax


This would be the DokuWiki variant: Problem for me - charet is kind of hard to type on a german keyboard: Charet and than hiting space, it would introduce yet another character that first time users have to look up at their keyboard. It also is not looking like a block for me that is belonging together.
^Hading 1  ^ Heading 2
|Cell 1.1  | 1.2
|Cell 2.1  | 2.2

what about this one

* Hading * Heading 2
| x1     | x3
| x2     | x4

--Christoph 04-Sep-06


If people are open to bigger changes, a strict subset of the table syntax we've discussed for the OLPC document format would be:
|* Heading 1 *|* Heading 2 *|
|   Cell 1.1  |   Cell 1.2  |
|   Cell 2.1  |   Cell 2.2  |

Otherwise, we could adopt a bit of the OLPC syntax, and come up with something like:

|* Heading 1 |* Heading 2
| Cell 1.1   |  Cell 1.2
| Cell 2.1   |  Cell 2.2

--EPAstor 04-Sep-06

i like the second one, first one could be optional, like with headings where trailing equals signs are optional, but what would happen if i would like to use bold in cells

|* Heading 1 |* Heading 2
|**Cell 1.1**|  Cell 1.2
|**Cell 2.1**|  Cell 2.2

kind of confusing. I think we are using way to many stars anyway (in case unordered lists will begin with *)...

--Christoph

I see your points... For using bold in cells, I'd hope that we'd tend to write something more like this:

|* Heading 1    |* Heading 2
|  **Cell 1.1** |  Cell 1.2
|  **Cell 2.1** |  Cell 2.2

But if not, I think that's still okay. As for using too many asterisks... they're all in different contexts. Since header cells in tables generally look a lot like bold (but aren't, exactly), I think it's actually a good idea to reuse the same character that we use for the bold marker for header cells. As for unordered lists... single asterisks will only mean something at the very start (and very end) of a table cell, and I don't think we're allowing lists inside table cells, so I think we're okay.

--Eric

Proposed OLPC table format#

||             TC Music             ||
|------------------------------------|
|* Parent company *|  TC Music, LLC  |
|*     Founded    *|     1990's      |
|*   Founder(s)   *|   Tom Bradley   |
|\                /| Concett Bradley |

I like the line seperating the heading from the actual cells, what about having something like this (making that optional to beautify tables in markup)?

||Heading Col 1 ||Heading Col 2
|--------------------------------
| Cell 1.1      | Cell 1.2
| Cell 2.1      | Cell 2.2
--Christoph

I like the idea of a syntax for drawing horizontal lines between rows. It is similar to the LaTeX table syntax:

| row n ...
|-
| row n+1 ...
will draw a line between rows n and n+1. However, this approach would require a type of table which does not print any lines at all per default. WackoWiki knows two different types of tables, one with lines and one without lines. --PeterMenzel

Not Wysiwyg#

I like the syntax I have seen first on Helmut Leitner's ProWiki. It consists of an element introducing the column labels, and then lines of "label: cell content" until you get to the element closing the table. Oddmuse uses the following:

<table a, b, c>
a: one
b: two
c: three
a: more
b: text
c: etc.
-----

But basically it would also be possible to use something like the following if you prefer the pipe symbol only (and no english text in markup rules):

|a|b|c|
a: one
b: two
c: three
a: more
b: text
c: etc.
||||

This syntax allows for multiple paragraphs and other markup inside cells, which is the greatest benefit. I find the near wysiwyg style of table editing to be suitable only for the most trivial of tables.

For Oddmuse, the first row is always rendered using table headers instead of ordinary table cells. If a cell is left out, cells span columns automatically. It also has some more features you can read about on the Long Table Markup Extension page.

-- AlexSchroeder

Here is a cut&paste from Microsoft Excel.

1	2	3
4	5	6

So if allowed both tab & | as cell delimiters, could then be more user-friendly in allowing direct pastes from other applications.

It would also require an explicit start & end table tokens.

-- JaredWilliams, 2006-09-28

That's InvisibleMarkup, and it's hard to edit existing tables. Excel can open and save CSV files, and the "|" markup is a special case of CSV -- using pipe instead of a comma (which is usually replaced with a semicolon anyways), so importing/exporting to/from Excel is still simple.

-- RadomirDopieralski, 2006-09-28

Yes, CSV was my first thought at markup, as I thought Excel used comma delimited. Would prefer a direct cut&paste though. InvisibleMarkup wouldn't be a problem, as it'd be converted to | for subsequent edits anyway.

-- JaredWilliams, 2006-09-28

Add new attachment

Only authorized users are allowed to upload new attachments.

« This particular version was published on 03-Nov-2006 18:23 by PeterMenzel.