KernelYenileri:

Taulukkomerkinnät

Taulukon luomiseksi käytä rivin sekä alussa että lopussa kahta pystyviivaa "||". Kyseisten aloitus- ja lopetusmerkkien väliin voi luoda taulukon soluja erottamalla solut toisistaan pystyviivoilla "||". Jos haluat luoda keskitetyn solun, joka yhdistää useita sarakkeita, käytä useampaa kuin kahta pystyviivaa. Vierekkäiset rivit, jotka on sisennetty samalla tasolle ja sisältävät taulukkomerkintöjä, yhdistetään yhdeksi taulukoksi.

Lisätietoja merkinnöistä löytyy sivulta OhjeMuokkauksesta.

Taulukoiden määritteet

... HTML-määritteet tulee asettaa ilman välejä solujen luomiseen käytettyjen pystyviivojen jälkeen kulmasulkeiden sisään, esimerkkinä ||<...>||.

The wiki-like markup has the following options:

The style stuff is all you need for styling your tables. Just use CSS formatted style there and it will be inlined in the generated HTML tag. Alternatively, the admin and the user (the admin in the theme file, the user via UserPreferences can extend moin's CSS by his own definitions, so users can refer to them using class or 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:

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.

To create a table, you start and end a line using the table marker "||". Between those start and end markers, you can create any number of cells by separating them with "||". To get a centered cell that spans several columns, you start that cell with more than one cell marker. Adjacent lines of the same indent level containing table markup are combined into one table.

For more information on the possible markup, see HelpOnEditing.

Table Attributes

Apart from the option to repeat cell markers to get columns spanning several other columns, you can directly set many HTML table attributes. Any attributes have to be placed between angle brackets <...> directly after the cell marker.

The wiki-like markup has the following options:

The style stuff is all you need for styling your tables. Just use CSS formatted style there and it will be inlined in the generated HTML tag. Alternatively, the admin and the user (the admin in the theme file, the user via UserPreferences can extend moin's CSS by his own definitions, so users can refer to them using class or 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:

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.

Merkintä

 UUSI TYYLI: Taulukon asettelu ja HTML:n kaltaiset määritteet::
 ||||||<tablestyle="width: 80%">'''Otsikko'''||
 ||solu 1||solu 2||solu 3||
 ||<rowspan=2> yhtenevät rivit||||<style="background-color: #E0E0FF;"> yhtenevät sarakkeet||
 ||<rowstyle="background-color: #FFFFE0;">solu 2||solu 3||
 Solun leveys::
 || kapea ||<style="width: 99%; text-align: center;"> leveä ||
 Yhtenevät rivit ja sarakkeet::
 ||<|2> kaksi riviä || rivi 1 ||
 || rivi 2 ||
 ||<-2> kolmas rivi kahta saraketta käyttäen ||
 Sijoittelu::
 ||<style="text-align: left;">vasemmalle ||<style="vertical-align: top; text-align: center;"|3> ylös ||<style="vertical-align: bottom;"|3> alas ||
 ||<style="text-align: center;"> keskelle ||
 ||<style="text-align: right;"> oikealle ||
 Kirjain::
 || tavallinen ||<style="font-weight: bold;"> lihavoitu ||<style="color: #FF0000;"> punainen ||<style="color: #FF0000; font-weight: bold;"> lihavoitu ja punainen ||
 Värejä::
 ||<style="background-color: red;"> punainen ||<style="background-color: green;"> vihreä ||<style="background-color: blue;"> sininen ||

 VANHA TYYLI: Taulukon asettelu ja HTML:n kaltaiset määritteet::
 ||||||<tablewidth="80%">'''Otsikko'''||
 ||solu 1||solu 2||solu 3||
 ||<rowspan=2> kaksi riviä yhdessä||||<bgcolor="#E0E0FF"> kaksi saraketta yhdessä||
 ||<rowbgcolor="#FFFFE0">solu 2||solu 3||
 Solun leveys::
 || kapea ||<:99%> leveä ||
 Yhtenevät rivit ja sarakkeet::
 ||<|2> kaksi riviä || rivi 1 ||
 || rivi 2 ||
 ||<-2> kolmas rivi kahta saraketta käyttäen ||
 Sijoittelu::
 ||<(> vasemmalle ||<^|3> ylös ||<v|3> alas ||
 ||<:> keskelle ||
 ||<)> oikealle ||
 Värejä::
 ||<#FF8080> punainen ||<#80FF80> vihreä ||<#8080FF> sininen ||
 Rivivaihdot solun sisällä::
 || rivi 1<<BR>>rivi 2||

Esitys

UUSI TYYLI: Taulukon asettelu ja HTML:n kaltaiset määritteet
  • Otsikko

    solu 1

    solu 2

    solu 3

    kaksi riviä yhdessä

    kaksi saraketta yhdessä

    solu 2

    solu 3

  • Solun leveys
  • kapea

    leveä

  • Yhtenevät rivit ja sarakkeet
  • kaksi riviä

    rivi 1

    rivi 2

    kolmas rivi käyttäen kahta saraketta

  • Sijoittelu
  • vasemmalle

    ylös

    alas

    keskelle

    oikealle

  • Kirjain
  • tavallinen

    lihavoitu

    punainen

    lihavoitu ja punainen

  • Värejä
  • punainen

    vihreä

    sininen

  • VANHA TYYLI: Taulukon asettelu ja HTML:n kaltaiset määritteet
  • Otsikko

    solu 1

    solu 2

    solu 3

    kaksi riviä yhdessä

    kaksi saraketta yhdessä

    solu 2

    solu 3

  • Solun leveys
  • kapea

    leveä

  • Yhtenevät rivit ja sarakkeet
  • kaksi riviä

    rivi 1

    rivi 2

    kolmas rivi kahta saraketta yhdistäen

  • Sijoittelu
  • vasemmalle

    ylös

    alas

    keskelle

    oikealle

  • Värejä
  • punainen

    vihreä

    sininen

  • Rivivaihdot solun sisällä
  • rivi 1
    rivi 2

  • Hae taulukon sisältö muista lähteistä

    Numeroidut luettelot ja muu monimutkaisempi solujen sisältö

    MiniPage.png