Template:PatternDownload: Difference between revisions
Jump to navigation
Jump to search
m Changed protection level for "Template:PatternDownload" ([Edit=<protect-level-trusted>] (indefinite) [Move=<protect-level-trusted>] (indefinite)) |
Apple Bottom (talk | contribs) 1) Display "rules" section if rulemin is specified but not rulemax. 2) Display "unknown" for rulemin/max if not specified. 3) Don't compute number of rules rulemin or rulemax is not specified. |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if: {{{rulemax|}}}{{{rulespecial|}}} | <tr> | <includeonly>{{#if: {{{rulemin|}}}{{{rulemax|}}}{{{rulespecial|}}} | <tr> | ||
<td colspan="2" style="height:3px;"></td></tr> | <td colspan="2" style="height:3px;"></td></tr> | ||
<tr> | <tr> | ||
| Line 10: | Line 10: | ||
{{!}}- | {{!}}- | ||
! All rules | ! All rules | ||
{{!}} style="text-align:right;" {{!}} {{#ifeq: {{{rulemin|}}} | {{{rulemax|}}} | {{{rulemax|}}} only | {{{rulemin|}}} – {{{rulemax|}}}}} | {{!}} style="text-align:right;" {{!}} {{#ifeq: {{{rulemin|}}} | {{{rulemax|}}} | {{{rulemax|}}} only | {{{rulemin|unknown}}} – {{{rulemax|unknown}}}}} | ||
{{#if: {{{rulespecial|}}} | {{!}}- | {{#if: {{{rulespecial|}}} | {{!}}- | ||
! Important rules | ! Important rules | ||
| Line 16: | Line 16: | ||
{{!}}- | {{!}}- }} | {{!}}- | {{!}}- }} | ||
! # of rules | ! # of rules | ||
{{!}} style="text-align:right;" {{!}} 2<sup>{{#expr:{{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}}}}</sup> = {{#expr: 2^({{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}})}} | {{!}} style="text-align:right;" {{!}} {{#if: {{{rulemin|}}}{{{rulemax|}}} | 2<sup>{{#expr:{{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}}}}</sup> = {{#expr: 2^({{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}})}} }} | ||
{{!}}} | {{!}}} | ||
</td></tr> | </td></tr> | ||
Revision as of 00:04, 24 July 2016
This template displays the "Rules", "Glider synthesis" and "Pattern files" boxes that appear on the right hand side of pattern pages. It should not be used on its own, but only within other pattern infobox template such as Template:Pattern and Template:Oscillator. All of its parameters are passed in from the corresponding parameters of the template that calls it.