User:Ian07/Test/Template: Difference between revisions
< User:Ian07 | Test
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly><table class="infobox"> | ||
<tr> | |||
<td colspan="2" class="infobox_head"> {{#if:{{{name|}}} | {{{name|}}} | Rule {{{number|}}} }}</td> | |||
</tr> | |||
<tr><td colspan="2" class="infobox_img">{{EmbedViewerRule1D|w={{{number|}}}}}</td></tr> | |||
{{#if: {{{imgname|}}} | <tr> | |||
<td colspan="2" class="infobox_animlink">[[Media:{{{imgname|}}}.png|View static image]]</td> | |||
</tr> | |||
}} | |||
{{{ | {{#if: {{{animated|}}} | <tr> | ||
<td colspan="2" class="infobox_animlink">[[Media:{{{imgname|}}}.gif|View animated image]]</td> | |||
</tr> | |||
}} | |||
<tr> | |||
<th>Number</th> | |||
<td>{{{number|}}}</td> | |||
</tr> | |||
<tr> | |||
<th> Character </th> | |||
<td> {{#if: {{{char|}}} | {{{char|}}} | Miscellaneous }} </td> | |||
</tr> | |||
</table></includeonly><noinclude> | |||
{{Rule1D | |||
|name = Apples | |||
|imgname = apples | |||
|number = ω - 1 | |||
|char = Tasty | |||
|animated = true | |||
}} | |||
The rule template is an infobox template for rules for [[one-dimensional cellular automata]]. It takes the following parameters: | |||
</noinclude> | * <tt>name</tt>: the name of the rule. | ||
* <tt>imgname</tt>: the name of the image (of a typical pattern) to display in the infobox; <tt>.png</tt> and <tt>.gif</tt> are appended automatically for the still and animated versions. The <tt>File:</tt> prefix should not be specified. | |||
* <tt>animated</tt>: should be set to <tt>true</tt> if an animated image for this rule has been uploaded. | |||
* <tt>number</tt>: the rule's number. | |||
* <tt>char</tt>: the rule's character. Should be one of: | |||
** <tt>Stable</tt>: rules in which patterns tend to stabilize quickly and show little activity. | |||
** <tt>Chaotic</tt>: rules in which patterns tend to show complex behavior, but do not generally explode. | |||
** <tt>Explosive</tt>: rules in which patterns tend to grow without bound. | |||
==Example== | |||
An example can been seen to the right; it was generated with the following invocation: | |||
<nowiki>{{Rule1D | |||
|name = Apples | |||
|imgname = apples | |||
|number = ω - 1 | |||
|char = Tasty | |||
|animated = true | |||
}} | |||
</nowiki> | |||
[[Category:Infobox templates]] | |||
</noinclude><includeonly> | |||
[[Category:Everything else]][[Category:Cellular automata]][[Category:One-dimensional cellular automata]] | |||
</includeonly> | |||
Revision as of 23:09, 4 January 2022
| Apples | |
| View static image | |
| View animated image | |
| Number | ω - 1 |
|---|---|
| Computation | |
| Character | Tasty |
The rule template is an infobox template for rules for one-dimensional cellular automata. It takes the following parameters:
- name: the name of the rule.
- imgname: the name of the image (of a typical pattern) to display in the infobox; .png and .gif are appended automatically for the still and animated versions. The File: prefix should not be specified.
- animated: should be set to true if an animated image for this rule has been uploaded.
- number: the rule's number.
- char: the rule's character. Should be one of:
- Stable: rules in which patterns tend to stabilize quickly and show little activity.
- Chaotic: rules in which patterns tend to show complex behavior, but do not generally explode.
- Explosive: rules in which patterns tend to grow without bound.
Example
An example can been seen to the right; it was generated with the following invocation:
{{Rule1D
|name = Apples
|imgname = apples
|number = ω - 1
|char = Tasty
|animated = true
}}