From GamingWiki
Line 3: | Line 3: | ||
Total number of columns in our table: | Total number of columns in our table: | ||
− | -->{{#vardefine: columns | {{{columns| | + | -->{{#vardefine: columns | {{{columns|6}}} }}<!-- |
SUBHEAD | SUBHEAD | ||
Line 26: | Line 26: | ||
DATA | DATA | ||
+ | |||
+ | We may have one, two or three label-data pairs. | ||
-->{{#hashdefine: datalinehash }}<!-- | -->{{#hashdefine: datalinehash }}<!-- | ||
Line 51: | Line 53: | ||
The width of the data cell depends on the presence of a label | The width of the data cell depends on the presence of a label | ||
− | and/or an rdata | + | and/or an rdata. Let's count how many groups are present. |
+ | -->{{#vardefine: groupcount | 0 }}<!-- | ||
+ | -->{{#ifeq: {{#hashvalue: thedataline | llabel |M_NUL}}-{{#hashvalue: thedataline | ldata |M_NUL}} | <!-- | ||
+ | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} }}<!-- | ||
+ | -->{{#ifeq: {{#hashvalue: thedataline | label |M_NUL}}-{{#hashvalue: thedataline | data |M_NUL}} | <!-- | ||
+ | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} }}<!-- | ||
+ | -->{{#ifeq: {{#hashvalue: thedataline | rlabel |M_NUL}}-{{#hashvalue: thedataline | rdata |M_NUL}} | <!-- | ||
+ | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} }}<!-- | ||
+ | TODO: look at how many groups are present to determine data cell width | ||
-->{{#vardefine: labelcols | {{#ifeq: {{#hashvalue: thedataline | label |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- | -->{{#vardefine: labelcols | {{#ifeq: {{#hashvalue: thedataline | label |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- | ||
-->{{#vardefine: llabelcols | {{#ifeq: {{#hashvalue: thedataline | llabel |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- | -->{{#vardefine: llabelcols | {{#ifeq: {{#hashvalue: thedataline | llabel |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- |