Pitatable: Difference between revisions
Jump to navigation
Jump to search
Explaining the <pitatable> |
m spell and examples for every arg |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This wiki is using a customisation, which allows users to create tables easily. | |||
<pre> | <pre> | ||
<pitatable columns=n> | <pitatable columns=n> | ||
tabledata | tabledata | ||
</pitatable> | </pitatable> | ||
</pre> | </pre> | ||
There are a lot of args that can be used to customize the table. | There are a lot of args that can be used to customize the table. | ||
*columns is mandatory, | * '''columns''' ''is <font color="red">mandatory''</font> | ||
*headlines is optional | ** If not set, you won't get a table at all. | ||
** If not set no headlines will be used | ** It has to be set to the number of columns your table uses. | ||
** example: <nowiki><pitatable columns=3></nowiki> | |||
* '''headlines''' ''is optional'' | |||
** If not set, no headlines will be used. | |||
** for an empty headline between the others just use "hl1; ;hl3" or "hl2;;hl4" | ** for an empty headline between the others just use "hl1; ;hl3" or "hl2;;hl4" | ||
*headerbgcolor is optional | ** example: <nowiki><pitatable headlines="headline1;headline2;headline3"></nowiki> | ||
** If headlines are used you can specify a backgroundcolor for the headlines. | * '''headerbgcolor''' ''is optional'' | ||
** If not set the backgroundcolor for headlines is #888888 (darkgrey) (only when headlines are used) | ** If headlines are used, you can specify a backgroundcolor for the headlines. | ||
** If not set, the backgroundcolor for headlines is #888888 (darkgrey) (only when headlines are used) | |||
** | ** example: <nowiki><pitatable headerbgcolor="#009aff"></nowiki> | ||
** If not set the fontcolor for headlines is #000000 (black) (only when headlines are used) | * '''headerfontcolor''' ''is optional'' | ||
*widths is optional | ** If headlines are used, you can specify a fontcolor for the headlines. | ||
** If not set the minimum width for columns (which is the width of the largest column-entry) is used. | ** If not set, the fontcolor for headlines is #000000 (black) (only when headlines are used) | ||
** for | ** example: <nowiki><pitatable headerfontcolor="#009aff"></nowiki> | ||
* '''widths''' ''is optional'' | |||
*aligns is optional | ** If not set, the minimum width for columns (which is the width of the largest column-entry) is used. | ||
**If not set the table is alligned as follows | ** for a standard/minimum width, just leave the width out ("180;;120") | ||
***the first column is aligned left | ** example: <nowiki><pitatable width="180;90;120"></nowiki> (looks neater) | ||
***all other columns are centered | * '''aligns''' ''is optional'' | ||
**for | ** If not set, the table is alligned as follows | ||
* | *** the first column is aligned left | ||
*** all other columns are centered | |||
** If not set the backgroundcolors of the rows will | ** for a standard alignment just leave the alignment out ("right;;left") | ||
** example: <nowiki><pitatable aligns="right;center;left"></nowiki> | |||
* '''color1''' / '''color2''' ''are optional'' | |||
** If not set, the backgroundcolors of the rows will switch between white and lightgrey every row. | |||
** If only color1 is set all rows will use this color. | ** If only color1 is set all rows will use this color. | ||
** If color1 and color2 are set the backgroundcolors of the rows will | ** If color1 and color2 are set, the backgroundcolors of the rows will switch between these two colors every row. | ||
*fontcolor is optional | ** example: <nowiki><pitatable color1="red" color2="#019aef"></nowiki> | ||
** If not set the fontcolor is #000000 (black) | * '''fontcolor''' ''is optional'' | ||
*border1 / border2 are optional | ** If not set, the fontcolor is #000000 (black) | ||
** border1 is the | ** example: <nowiki><pitatable fontcolor="#019aef"></nowiki> | ||
***If not set it will be 1px | * '''border1''' / '''border2''' ''are optional'' | ||
** border1 is the outer table border | |||
*** If not set, it will be 1px | |||
** border2 is the inner table border | ** border2 is the inner table border | ||
***If not set it will be 0px | *** If not set, it will be 0px | ||
** both use positive values in px (pixel). | ** both use positive values in px (pixel). | ||
** a Value of 0 means there is no border | ** a Value of 0 means there is no border | ||
*delimiter is optional | ** example: <nowiki><pitatable border1=2 border2=1></nowiki> | ||
* '''delimiter''' ''is optional'' | |||
** You can specify a certain delimiter for the tabledata | ** You can specify a certain delimiter for the tabledata | ||
** the standard delimiter for tabledata is ; | ** the standard delimiter for tabledata is "\;" | ||
** example: <nowiki><pitatable delimiter="\|"></nowiki> | |||
* '''tabledata''' | |||
** tablerows are delimited by newline or "\n" | |||
** examples: | |||
*** <nowiki><pitatable columns=3>data1;data2;data3;\ndata4;data5;data6;\ndata7;data8;data9;\n</pitatable></nowiki> | |||
*** <nowiki><pitatable columns=3></nowiki><br>data1;data2;data3;<br>data4;data5;data6;<br>data7;data8;data9;<br><nowiki></pitatable></nowiki> | |||
==A few examples== | ==A few examples== | ||
| Line 83: | Line 96: | ||
</pitatable> | </pitatable> | ||
</pre><hr> | </pre><hr> | ||
<pitatable border1=5 border2=3 columns=4 headlines="col 1;col 2;col 3;col 4" headerbgcolor="limegreen" headerfontcolor="#FF0000" widths=" | <pitatable border1=5 border2=3 columns=4 headlines="col 1;col 2;col 3;col 4" headerbgcolor="limegreen" headerfontcolor="#FF0000" widths="110;90;70;120" aligns="right;left;right;left" color1="#005a72" color2="725a00" fontcolor="orange" delimiter="\^"> | ||
row 1.1^row 1.2^row 1.3^row 1.4^ | row 1.1^row 1.2^row 1.3^row 1.4^ | ||
row 2.1^row 2.2^row 2.3^row 2.4^ | row 2.1^row 2.2^row 2.3^row 2.4^ | ||
| Line 92: | Line 105: | ||
row 7.1^row 7.2^row 7.3^row 7.4^ | row 7.1^row 7.2^row 7.3^row 7.4^ | ||
</pitatable> | </pitatable> | ||
<pre><pitatable border1=5 border2=3 columns=4 headlines="col 1;col 2;col 3;col 4" headerbgcolor="limegreen" headerfontcolor="#FF0000" widths=" | <pre><pitatable border1=5 border2=3 columns=4 headlines="col 1;col 2;col 3;col 4" headerbgcolor="limegreen" headerfontcolor="#FF0000" widths="110;90;70;120" aligns="right;left;right;left" color1="#005a72" color2="725a00" fontcolor="orange" delimiter="\^"> | ||
row 1.1^row 1.2^row 1.3^row 1.4^ | row 1.1^row 1.2^row 1.3^row 1.4^\nrow 2.1^row 2.2^row 2.3^row 2.4^\nrow 3.1^row 3.2^row 3.3^row 3.4^\nrow 4.1^row 4.2^row 4.3^row 4.4^ | ||
row 5.1^row 5.2^row 5.3^row 5.4^ | row 5.1^row 5.2^row 5.3^row 5.4^ | ||
row 6.1^row 6.2^row 6.3^row 6.4^ | row 6.1^row 6.2^row 6.3^row 6.4^ | ||
Latest revision as of 12:02, 23 November 2005
This wiki is using a customisation, which allows users to create tables easily.
<pitatable columns=n> tabledata </pitatable>
There are a lot of args that can be used to customize the table.
- columns is mandatory
- If not set, you won't get a table at all.
- It has to be set to the number of columns your table uses.
- example: <pitatable columns=3>
- headlines is optional
- If not set, no headlines will be used.
- for an empty headline between the others just use "hl1; ;hl3" or "hl2;;hl4"
- example: <pitatable headlines="headline1;headline2;headline3">
- headerbgcolor is optional
- If headlines are used, you can specify a backgroundcolor for the headlines.
- If not set, the backgroundcolor for headlines is #888888 (darkgrey) (only when headlines are used)
- example: <pitatable headerbgcolor="#009aff">
- headerfontcolor is optional
- If headlines are used, you can specify a fontcolor for the headlines.
- If not set, the fontcolor for headlines is #000000 (black) (only when headlines are used)
- example: <pitatable headerfontcolor="#009aff">
- widths is optional
- If not set, the minimum width for columns (which is the width of the largest column-entry) is used.
- for a standard/minimum width, just leave the width out ("180;;120")
- example: <pitatable width="180;90;120"> (looks neater)
- aligns is optional
- If not set, the table is alligned as follows
- the first column is aligned left
- all other columns are centered
- for a standard alignment just leave the alignment out ("right;;left")
- example: <pitatable aligns="right;center;left">
- If not set, the table is alligned as follows
- color1 / color2 are optional
- If not set, the backgroundcolors of the rows will switch between white and lightgrey every row.
- If only color1 is set all rows will use this color.
- If color1 and color2 are set, the backgroundcolors of the rows will switch between these two colors every row.
- example: <pitatable color1="red" color2="#019aef">
- fontcolor is optional
- If not set, the fontcolor is #000000 (black)
- example: <pitatable fontcolor="#019aef">
- border1 / border2 are optional
- border1 is the outer table border
- If not set, it will be 1px
- border2 is the inner table border
- If not set, it will be 0px
- both use positive values in px (pixel).
- a Value of 0 means there is no border
- example: <pitatable border1=2 border2=1>
- border1 is the outer table border
- delimiter is optional
- You can specify a certain delimiter for the tabledata
- the standard delimiter for tabledata is "\;"
- example: <pitatable delimiter="\|">
- tabledata
- tablerows are delimited by newline or "\n"
- examples:
- <pitatable columns=3>data1;data2;data3;\ndata4;data5;data6;\ndata7;data8;data9;\n</pitatable>
- <pitatable columns=3>
data1;data2;data3;
data4;data5;data6;
data7;data8;data9;
</pitatable>
A few examples
|
<pitatable columns=4 headlines="col 1;col 2;col 3;col 4"> row 1.1;row 1.2;row 1.3;row 1.4; row 2.1;row 2.2;row 2.3;row 2.4; row 3.1;row 3.2;row 3.3;row 3.4; row 4.1;row 4.2;row 4.3;row 4.4; row 5.1;row 5.2;row 5.3;row 5.4; row 6.1;row 6.2;row 6.3;row 6.4; row 7.1;row 7.2;row 7.3;row 7.4; </pitatable>
|
<pitatable columns=4 headlines="col 1;col 2;col 3;col 4" headerbgcolor="#0000FF" headerfontcolor="#FF0000" widths="60;70;80;90" aligns="center;;;" color1="orange" color2="skyblue" fontcolor="yellow" delimiter="\|"> row 1.1|row 1.2|row 1.3|row 1.4| row 2.1|row 2.2|row 2.3|row 2.4| row 3.1|row 3.2|row 3.3|row 3.4| row 4.1|row 4.2|row 4.3|row 4.4| row 5.1|row 5.2|row 5.3|row 5.4| row 6.1|row 6.2|row 6.3|row 6.4| row 7.1|row 7.2|row 7.3|row 7.4| </pitatable>
|
<pitatable border1=5 border2=3 columns=4 headlines="col 1;col 2;col 3;col 4" headerbgcolor="limegreen" headerfontcolor="#FF0000" widths="110;90;70;120" aligns="right;left;right;left" color1="#005a72" color2="725a00" fontcolor="orange" delimiter="\^"> row 1.1^row 1.2^row 1.3^row 1.4^\nrow 2.1^row 2.2^row 2.3^row 2.4^\nrow 3.1^row 3.2^row 3.3^row 3.4^\nrow 4.1^row 4.2^row 4.3^row 4.4^ row 5.1^row 5.2^row 5.3^row 5.4^ row 6.1^row 6.2^row 6.3^row 6.4^ row 7.1^row 7.2^row 7.3^row 7.4^ </pitatable>