Help:Table: Difference between revisions

Xenwolf (talk | contribs)
Xenwolf (talk | contribs)
Special needs: show pipe symbols within table cells
Line 216: Line 216:


<references/>
<references/>
=== Pipe symbols in cells ===
The pipe character is an important meta char to MediaWiki.
Especially in tables, where each cell can be decorated with its own class and style specification, it is hard to get the
pipe character displayed for what it is.
While [[Wikipedia: Help:Table #Rendering the pipe]] has some suggestions for coping with this issue, we found that adding just another pipe right after the initial pipe(s) would do as well, see following examples.
{| class="wikitable"
|-
|+ Compact syntax: one line per row
|-
! Wikitext
! Rendered output
|-
| <syntaxhighlight lang="text">
{| class="wikitable"
!| A|X !!| B|Y
|-
|| 1|2 ||| 3|4
|}
</syntaxhighlight>
|
{| class="wikitable"
!| A|X !!| B|Y
|-
|| 1|2 ||| 3|4
|}
|}
{| class="wikitable"
|-
|+ “Airy” syntax: one line per cell
|-
! Wikitext
! Rendered output
|-
| <syntaxhighlight lang="text">
{| class="wikitable"
!| A|X
!| B|Y
|-
|| 1|2
|| 3|4
|}
</syntaxhighlight>
|
{| class="wikitable"
!| A|X
!| B|Y
|-
|| 1|2
|| 3|4
|}
|}


== Combining table cells ==
== Combining table cells ==