Template:UnitCell: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
mNo edit summary
Use Template:PatternPopulationAndBoundingBox; group "generic" parameters at top of infobox
Line 14: Line 14:
<tr>
<tr>
<th> Pattern type </th>
<th> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Unit cell]] </td></tr>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Unit cell]] </td></tr><!--
<tr>
 
<th> Number of [[cell]]s </th>
Display population and bounding box. Passing catextra= ensures we also get unit cell-specific categories, e.g. "Unit cells with ... cells".
<td> {{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[:Category:Patterns with 1000 or more cells|{{{c}}}]] | [[:Category:Patterns with {{{c}}} cells|{{{c}}}]] }} | Unknown }} </td></tr>
 
<tr>
-->{{PatternPopulationAndBoundingBox
<th> [[Bounding box]] </th>
|c        = {{{c|}}}
<td> {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }} </td></tr>
|bx      = {{{bx|}}}
|by      = {{{by|}}}
|catextra = Unit cells
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}
<tr>
<tr>
<th> Cell size </th>
<th> Cell size </th>
Line 83: Line 90:
[[Category:Patterns]]
[[Category:Patterns]]
[[Category:Unit cells]]
[[Category:Unit cells]]
{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}{{#if: {{{p|}}} | [[Category:Unit cells with period {{{p}}}]] }}{{#if: {{{sx|}}}{{{sy|}}} | [[Category:Unit cells with cell size {{{sx}}}&times;{{{sy}}}]] }}
{{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells]] [[Category:Unit cells with 1000 or more cells]] | [[Category:Patterns with {{{c}}} cells]] [[Category:Unit cells with {{{c}}} cells]] }} }} }}{{#if: {{{p|}}} | [[Category:Unit cells with period {{{p}}}]] }}{{#if: {{{sx|}}}{{{sy|}}} | [[Category:Unit cells with cell size {{{sx}}}&times;{{{sy}}}]] }}
</includeonly>
</includeonly>

Revision as of 20:50, 18 February 2018

Unit Cell Name
{{{name}}} image
Pattern type Unit cell
Cell size Unknown
Period Unknown
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for unit cells. An example can be seen to the right. For general information about how to use pattern templates, see LifeWiki:Pattern pages. To see a live example of this template in action, see OTCA metapixel.

Special parameters

The following parameter should be specified:

  • p: the period of the unit cell.
  • sx, sy: the size of the unit cell (not its bounding box).


Pattern templates