Module talk:Testcase table: Difference between revisions

Content deleted Content added
add {{unsigned IP}}
 
(4 intermediate revisions by 4 users not shown)
Line 2:
The format string for the HTML code for the table heading row looks like:
<nowiki><tr><th style="width:50%%">%s</th><th style="width:50%%">%s</tr></nowiki>
Should there be a closing <ttcode><nowiki></th></nowiki></ttcode> before the closing <ttcode><nowiki></tr></nowiki></ttcode>? <fontspan colorstyle="color:red;">—&#91;</fontspan>[[User:AlanM1|<span style="font-variant:small-caps;"><fontspan colorstyle="color:green;">Alan</fontspan><fontspan colorstyle="color:blue;">M</fontspan><fontspan colorstyle="color:purple;">1</fontspan></span>]]([[User talk:AlanM1|talk]])<fontspan colorstyle="color:red;">&#93;—</fontspan> 23:10, 11 August 2013 (UTC)
: fixed, thank you for finding the bug. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 17:55, 12 August 2013 (UTC)
 
Line 19:
|}
 
It would be nice to specify the optional table {{Para|_class}}, too, and the header for that first column ({{Para|_header0}}). Caption and header rows should not appear if not specified. I realize I might be asking to cram more into this template than it's intended for, too. Like maybe something more suited to a {{tl|Testcase table top}}, {{tl|Testcase table row}}, {{tl|Testcase table bottom}} trio. <fontspan colorstyle="color:red;">—&#91;</fontspan>[[User:AlanM1|<span style="font-variant:small-caps;"><fontspan colorstyle="color:green;">Alan</fontspan><fontspan colorstyle="color:blue;">M</fontspan><fontspan colorstyle="color:purple;">1</fontspan></span>]]([[User talk:AlanM1|talk]])<fontspan colorstyle="color:red;">&#93;—</fontspan>
: {{ping|AlanM1}} added these features. should the rowheader be in a {{tag|th}}? [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 18:07, 12 August 2013 (UTC)
::{{Ping|Frietjes}} thanks! Let's see. This is the wikicode used to mark header rows (from [[Help:Table]]):
{{Col-begin|width=100%}}
{{Col-break|width=45%}}
<pre><nowiki>
{| class="wikitable"
|+ Multiplication table
|-
! scope="col" | &times;
! scope="col" | 1
! scope="col" | 2
! scope="col" | 3
|-
! scope="row" | 1
| 1 || 2 || 3
|-
! scope="row" | 2
| 2 || 4 || 6
|-
! scope="row" | 3
| 3 || 6 || 9
|-
! scope="row" | 4
| 4 || 8 || 12
|-
! scope="row" | 5
| 5 || 10 || 15
|}
</nowiki></pre>
{{Col-break|width=45%}}
{| class="wikitable"
|+ Multiplication table
|-
! scope="col" | &times;
! scope="col" | 1
! scope="col" | 2
! scope="col" | 3
|-
! scope="row" | 1
| 1 || 2 || 3
|-
! scope="row" | 2
| 2 || 4 || 6
|-
! scope="row" | 3
| 3 || 6 || 9
|-
! scope="row" | 4
| 4 || 8 || 12
|-
! scope="row" | 5
| 5 || 10 || 15
|}
{{Col-end}}
{{Clear}}
The resulting HTML looks like:
<pre><nowiki>
<table class="wikitable">
<caption>Multiplication table</caption>
<tr>
<th scope="col">×</th>
<th scope="col">1</th>
<th scope="col">2</th>
<th scope="col">3</th>
</tr>
<tr>
<th scope="row">1</th>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<th scope="row">2</th>
<td>2</td>
<td>4</td>
<td>6</td>
</tr>
...
</table>
 
</nowiki></pre>
 
so, yes, it seems you need {{Font|font=Lucida Console|bgcolor=#CFFFFF|text=<nowiki><th scope="row">{{{_rowheader}}}</th></nowiki>}} in HTML or {{Font|font=Lucida Console|bgcolor=#FFCFCF|text=<nowiki>! scope="row" | {{{_rowheader}}}</nowiki>}} in WikiML. <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/97.93.136.214|97.93.136.214]] ([[User talk:97.93.136.214#top|talk]]) 17:19, 13 August 2013 (UTC)</small>