From GamingWiki
Line 4: | Line 4: | ||
Total number of columns in our table: | Total number of columns in our table: | ||
-->{{#vardefine: columns | {{{columns|4}}} }}<!-- | -->{{#vardefine: columns | {{{columns|4}}} }}<!-- | ||
+ | |||
+ | SUBHEAD | ||
If there is a subhead and a righthead, we make the subhead one column. If | If there is a subhead and a righthead, we make the subhead one column. If | ||
Line 13: | Line 15: | ||
-->{{#ifeq: {{{subhead|M_NUL}}} | M_NUL |0| {{#expr:{{#var:columns}}-{{#var:rheadcols}}}} }}<!-- | -->{{#ifeq: {{{subhead|M_NUL}}} | M_NUL |0| {{#expr:{{#var:columns}}-{{#var:rheadcols}}}} }}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
-->{{#ifeq: {{#var:subheadcols}} |0||<nowiki /> | -->{{#ifeq: {{#var:subheadcols}} |0||<nowiki /> | ||
Line 30: | Line 27: | ||
--> | --> | ||
|- <!-- | |- <!-- | ||
+ | |||
+ | DATA | ||
+ | |||
+ | -->{{#hashdefine: datalinehash }}<!-- | ||
+ | -->{{#forargs: | keynum | value | <!-- | ||
+ | -->{{#hashreset: singledataline}}<!-- | ||
+ | -->{{#vardefine: key | {{#rmatch: {{#var:keynum}} | (label{{!}}data)\d+ | $1 }}}}<!-- | ||
+ | -->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | \D+(\d+) | $1 }}}}<!-- | ||
+ | -->{{#hashdefine: singledataline | {{#hashvalue: datalinehash | {{#var:num}} }} | , | ; }}<!-- | ||
+ | -->{{#hashinclude: singledataline | {{#var:key}} = {{#var:value}} }}<!-- | ||
+ | -->{{#if: {{#var: num}} | <!-- | ||
+ | -->{{#hashinclude: datalinehash | {{#var:num}} = {{#hashprint: singledataline | , | %%%% | @@@@ | %%%%;@@@@ }} }}<!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | Now each value of datalinehash can be parsed into a new hash: | ||
+ | -->{{#hashprint: datalinehash || %%%% | @@@@ | <!-- | ||
+ | -->{{#hashdefine: thedataline | @@@@ }}<!-- | ||
+ | --><nowiki /> | ||
+ | {{!}}- | ||
+ | {{!}} class="shaded" {{!}} {{#hashvalue: thedataline | label }} | ||
+ | {{!}} colspan="3" {{!}} {{#hashvalue: thedataline | data }} <!-- | ||
+ | -->}}<!-- | ||
-->{{ | -->{{ |