Formatação da Tabela
Para criar uma tabela, comece e termine uma linha utilizando um marcador de tabela "||". Entre estes marcadores de início e de fim, pode criar as células que quiser, separando-as com "||". Para obter uma célula centrada que ocupa várias colunas, pode iniciar essas célula com mais do que um marcador de célula. As linhas adjacentes do mesmo nível de avanço que contenham a formatação de tabela, serão agrupadas numa tabela.
Para mais informações sobre a formatação possível, consulte o tópico AjudaNaEdição.
Atributos da Tabela
Para além da opção de repetir os marcadores de células que ocupam várias colunas, pode definir directamente vários atributos de HTML de tabelas. Todos os atributos têm de ser inseridos entre os sinais de menor e maior <...> imediatamente depois do marcador de célula.
A formatação à wiki tem as seguintes opções:
<-2>: unir colunas
<|2>: unir linhas
<style="..."> colocará essa informação de estilo em html (td) da célula
<rowstyle="..."> colocará essa informação de estilo em html (tr) da linha
<tablestyle="..."> colocará essa informação de estilo em html (table) da tabela
<class="..."> colocará essa classe CSS em html (td) da célula
<rowclass="..."> colocará essa classe CSS em html (tr) da linha
<tableclass="..."> colocará essa classe CSS em html (table) da tabela
<id="..."> colocará esse id CSS em html (td) da célula
Os itens de estilo é tudo o que precisa para definir o estilo das tabelas. Basta utilizar o estilo CSS formatado aí e será inserido na tag de HTML gerada. Como alternativa, o administrador e o utilizador (o administrador através do ficheiro do tema o utilizador através das GetText(UserPreferences) podem acrescentar as suas definições ao CSS do moin, para que os utilizadores se possam referir a elas utilizando class e id. You can use several options at the same time by writing them one after the other within the same angle brackets (e.g. <tablestyle="..." rowstyle="..."> on the first cell, to set both the table-wide style and the first-row style).
We still support the old table markup, but generate the effect by appending additional values to the style parameter:
<50%>: cell width (will append width: 50%; to style)
<width="50%">: does the same
<tablewidth="100%">: set table width to 100% (only valid in first table row)
<(>: left aligned (will append text-align: left; to style)
<:>: centered (will append text-align: center; to style)
<)>: right aligned (will append text-align: right; to style)
<^>: aligned to top (will append vertical-align: top; to style)
<v>: aligned to bottom (will append vertical-align: bottom; to style)
<#XXXXXX>: background color (will append background-color: #XXXXXX; to style)
<bgcolor="#XXXXXX"> does the same
<rowbgcolor="#XXXXXX"> set row background color (only valid in first cell)
<tablebgcolor="#XXXXXX"> set table background color
If you use several conflicting options like <(:)>, the last option wins. There is no explicit option for vertical centering (middle), since that is always the default.
Exemplo
NEW STYLE: General table layout and HTML like options:: ||||||<tablestyle="width: 80%">'''Heading'''|| ||cell 1||cell2||cell 3|| ||<rowspan=2> spanning rows||||<style="background-color: #E0E0FF;"> spanning 2 columns|| ||<rowstyle="background-color: #FFFFE0;">cell2||cell 3|| Cell width:: || narrow ||<style="width: 99%; text-align: center;"> wide || Spanning rows and columns:: ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || Alignment:: ||<style="text-align: left;">left ||<style="vertical-align: top; text-align: center;"|3> top ||<style="vertical-align: bottom;"|3> bottom || ||<style="text-align: center;"> centered || ||<style="text-align: right;"> right || Fonts:: || normal ||<style="font-weight: bold;"> bold ||<style="color: #FF0000;"> red ||<style="color: #FF0000; font-weight: bold;"> boldred || Colors:: ||<style="background-color: red;"> red ||<style="background-color: green;"> green ||<style="background-color: blue;"> blue || OLD STYLE: General table layout and HTML like options:: ||||||<tablewidth="80%">'''Heading'''|| ||cell 1||cell2||cell 3|| ||<rowspan=2> spanning rows||||<bgcolor="#E0E0FF"> spanning 2 columns|| ||<rowbgcolor="#FFFFE0">cell2||cell 3|| Cell width:: || narrow ||<:99%> wide || Spanning rows and columns:: ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || Alignment:: ||<(> left ||<^|3> top ||<v|3> bottom || ||<:> centered || ||<)> right || Colors:: ||<#FF8080> red ||<#80FF80> green ||<#8080FF> blue || Line breaks within cells:: || line 1[[BR]]line 2||
Exibição
- NEW STYLE: General table layout and HTML like options
Heading
cell 1
cell2
cell 3
spanning rows
spanning 2 columns
cell2
cell 3
- Cell width
narrow
wide
- Spanning rows and columns
2 rows
row 1
row 2
row 3 over 2 columns
- Alignment
left
top
bottom
centered
right
- Fonts
normal
bold
red
boldred
- Colors
red
green
blue
- OLD STYLE: General table layout and HTML like options
Heading
cell 1
cell2
cell 3
spanning rows
spanning 2 columns
cell2
cell 3
- Cell width
narrow
wide
- Spanning rows and columns
2 rows
row 1
row 2
row 3 over 2 columns
- Alignment
left
top
bottom
centered
right
- Colors
red
green
blue
- Line breaks within cells
line 1BRline 2
Inserir dados de tabela de outras fontes
comma separated values: see wiki:HelpOnParsers
include wiki pages: see wiki:HelpOnMacros/Include
Bulleted lists and other complex content within cells
attachment:MiniPage.png