Basic Formatting: Difference between revisions

From Iskomunidad
Line 1: Line 1:
==Tables==
==Tables==
===Table Markup Summary===
===Table Markup Summary===
{| class="wikitable"
|-
| '''<nowiki>{|</nowiki>''' || '''table start''', ''required''
|-
| '''<nowiki>|+</nowiki>''' || table '''caption''', ''optional''; only between '''table start''' and '''table row'''
|-
| '''<nowiki>|-</nowiki>''' || '''table row''', ''optional on first row—wiki'' engine assumes the first row
|-
| '''<nowiki>!</nowiki>''' || '''table header''' cell, ''optional''. Consecutive table header cells may be added on same line separated by double marks '''(!!)''' or start on new lines, each with its own single mark '''(!)'''.
|-
| '''<nowiki>|</nowiki>''' || '''table data''' cell, ''optional''. Consecutive table data cells may be added on same line separated by double marks <nowiki>(||)</nowiki> or start on new lines, each with its own single mark <nowiki>(|)</nowiki>.
|-
| '''<nowiki>|}</nowiki>''' || table end, ''required''
|}
* The above marks must '''start on a new line''' except the double <code>||</code> and <code>!!</code> for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
* '''HTML attributes.''' Each mark, except table end, optionally accepts one or more HTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
** Cells and caption (<code>|</code> or <code>||</code>, <code>!</code> or <code>!!</code>, and <code>|+</code>) hold content. So separate any attributes from content with a single pipe (<code>|</code>). Cell content may follow on same line or on following lines.
** Table and row marks (<code>{|</code> and <code>|-</code>) do not directly hold content. Do ''not'' add pipe (<code>|</code>) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it ''and'' your final attribute if it was touching the erroneous pipe!
* '''Content''' may (a) follow its cell mark on the same line after any optional HTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
** '''Pipe character as content.''' To insert a pipe (<code>|</code>) character into a table, use the <code><'''nowiki'''>|</'''nowiki'''></code> escaping mark.

Revision as of 11:27, 29 November 2024

Tables

Table Markup Summary

{| table start, required
|+ table caption, optional; only between table start and table row
|- table row, optional on first row—wiki engine assumes the first row
! table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
| table data cell, optional. Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
|} table end, required
  • The above marks must start on a new line except the double || and !! for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
  • HTML attributes. Each mark, except table end, optionally accepts one or more HTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
    • Cells and caption (| or ||, ! or !!, and |+) hold content. So separate any attributes from content with a single pipe (|). Cell content may follow on same line or on following lines.
    • Table and row marks ({| and |-) do not directly hold content. Do not add pipe (|) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it and your final attribute if it was touching the erroneous pipe!
  • Content may (a) follow its cell mark on the same line after any optional HTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
    • Pipe character as content. To insert a pipe (|) character into a table, use the <nowiki>|</nowiki> escaping mark.