Membuat Tabel

Simple tables can be created like this:

Wiki Markup Display
||Cell 1||Cell 2||Cell 3||
||Cell 4||Cell 5||Cell 6||
Cell 1Cell 2Cell 3
Cell 4Cell 5Cell 6

Cell headings can be specified by wrapping the content in a pair of '=' characters. Note that the '=' characters have to stick to the cell separators, like this:

Wiki Markup Display
||        ||= stable =||= latest =||
||= 0.10 =||  0.10.5  || 0.10.6dev||
||= 0.11 =||  0.11.6  || 0.11.7dev||
stable latest
0.10 0.10.5 0.10.6dev
0.11 0.11.6 0.11.7dev

Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:

Wiki Markup Display
|| 1 || 2 || 3 ||
|||| 1-2 || 3 ||
|| 1 |||| 2-3 ||
|||||| 1-2-3 ||
1 2 3
1-2 3
1 2-3
1-2-3

Note that if the content of a cell "sticks" to one side of the cell and only one, then the text will be aligned on that side. Example:

Wiki Markup Display
||=Text =||= Numbers =||
||left align    ||        1.0||
||  center      ||        4.5||
||      right align||     4.5||
|| default alignment ||   2.5||
||default||         2.5||
||  default ||      2.5||
|| default ||       2.5||
Text Numbers
left align 1.0
center 4.5
right align 4.5
default alignment 2.5
default 2.5
default 2.5
default 2.5

If contrary to the example above, the cells in your table contain more text, it might be convenient to spread a table row over multiple lines of markup. The \ character placed at the end of a line after a cell separator tells Trac to not start a new row for the cells on the next line.

Wiki Markup
|| this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
|| this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
|| that's column 3 and last one ||
Display
this is column 1 new ticket this is column 2 the road ahead that's column 3 and last one

Last modified 7 years ago Last modified on 12/06/2010 05:23:21 PM