From BlenderWiki
Tables are an appropriate way to display lots of data in a clear structured way, and can be a valid alternative to screen dumps for showing various setups.
Tables can be written either in HTML or by using the much cleaner Wiki syntax.
[edit] Standard table
{| border="1" cellpadding="2"
|+Multiplication table
|-
! × !! 1 !! 2 !! 3
|-
! 1
| 1 || 2 || 3
|-
! 2
| 2 || 4 || 6
|-
! 3
| 3 || 6 || 9
|-
! 4
| 4 || 8 || 12
|-
! 5
| 5 || 10 || 15
|}
returns
| × | 1 | 2 | 3 |
|---|---|---|---|
| 1 | 1 | 2 | 3 |
| 2 | 2 | 4 | 6 |
| 3 | 3 | 6 | 9 |
| 4 | 4 | 8 | 12 |
| 5 | 5 | 10 | 15 |
[edit] Prettytable table format
To facilitate formatting you can put the Template:UM/prettytable in the first row of the table. You can provide the width of the table as:
- a number
- the table width in pixels, or
- a percentage
- the percentage of the width of the page holding the table
- Nothing
- this will result as the table being 100% wide
{| {{UM/prettytable|100}}
|align=center | 1
|align=center | 2
|align=center | 3
|-
|align=center | 4
|align=center | 5
|align=center | 6
|}
returns
| 1 | 2 | 3 |
| 4 | 5 | 6 |
{| {{UM/prettytable|50%}}
|align=center | 1
|align=center | 2
|align=center | 3
|-
|align=center | 4
|align=center | 5
|align=center | 6
|}
returns
| 1 | 2 | 3 |
| 4 | 5 | 6 |
{| {{UM/prettytable}}
|align=center | 1
|align=center | 2
|align=center | 3
|-
|align=center | 4
|align=center | 5
|align=center | 6
|}
returns
| 1 | 2 | 3 |
| 4 | 5 | 6 |
[edit] Sortable tables
You can get a sortable table by addingclass="sortable"in the first line of the table.
Examples:
{| class="sortable" border="1" cellpadding="2"
|+Multiplication table
|-
! × !! 1 !! 2 !! 3
|-
! 1
| 1 || 2 || 3
|-
! 2
| 2 || 4 || 6
|-
! 3
| 3 || 6 || 9
|-
! 4
| 4 || 8 || 12
|-
! 5
| 5 || 10 || 15
|}
returns
| × | 1 | 2 | 3 |
|---|---|---|---|
| 1 | 1 | 2 | 3 |
| 2 | 2 | 4 | 6 |
| 3 | 3 | 6 | 9 |
| 4 | 4 | 8 | 12 |
| 5 | 5 | 10 | 15 |
{| class="sortable" {{UM/prettytable|200}}
|align=center | A
|align=center | B
|align=center | C
|-
|align=center | 4
|align=center | 20
|align=center | 3
|-
|align=center | 1
|align=center | 5
|align=center | 6
|-
|align=center | 10
|align=center | 1
|align=center | -4
|}
returns
| A | B | C |
| 4 | 20 | 3 |
| 1 | 5 | 6 |
| 10 | 1 | -4 |
[edit] Tables of images
As explained also in Meta:Guides/Style Guide/Images when you have a set of images that have some relation to each other, you can put them in a simple table:
{|align=center
| [[Image:Manual-volumerendering-reflection-sc0.5.png|thumb|150px| Reflection: Green, Scattering: 0.5]]
| [[Image:Manual-volumerendering-reflection-sc1.0.png|thumb|150px| Reflection: Green, Scattering: 1.0]]
| [[Image:Manual-volumerendering-reflection-sc2.0.png|thumb|150px| Reflection: Green, Scattering: 2.0]]
| [[Image:Manual-volumerendering-reflection-sc5.0.png|thumb|150px| Reflection: Green, Scattering: 5.0]]
|-
| [[Image:Manual-volumerendering-refl_g-tr_y-sc0.5.png|thumb|150px| Reflection: Green, Transmission: Yellow, Scattering: 0.5]]
| [[Image:Manual-volumerendering-refl_g-tr_y-sc1.0.png|thumb|150px| Reflection: Green, Transmission: Yellow, Scattering: 1.0]]
| [[Image:Manual-volumerendering-refl_g-tr_y-sc2.0.png|thumb|150px| Reflection: Green, Transmission: Yellow, Scattering: 2.0]]
| [[Image:Manual-volumerendering-refl_g-tr_y-sc5.0.png|thumb|150px| Reflection: Green, Transmission: Yellow, Scattering: 5.0]]
|}
returns
[edit] See also
Read the official documentation about tables.







![[]](/skins/blender/open.png)
