Template:GOL-diagram-s/doc

From testwiki
Jump to navigation Jump to search

Template:Documentation subpage

Usage

This template creates a small diagram as used in Lewis Carroll's The Game of Logic. Usage is as follows:

{{GOL-diagram-s
|1|2
|3|4
}}

Template:GOL-diagram-s

You can also specify the sections by index:

{{GOL-diagram-s|2=B|3=C}}

Template:GOL-diagram-s

"special" parameter

The "special" parameter allows for special cases that are used in the text. Allowed values are as follows:

  • label labels the x, y, m, x, and y sections. This will override any value placed in positions 3, 4, and 6, but is generally used with no values in any position.
{{GOL-diagram-s|special=label}}
Template:GOL-diagram-s
  • xm, x'm, ym', y'm' puts a 1 or — (red counter) in the respective position. Note that the syntax uses an apostrophe (') not a prime (′). This may or may not override values placed in the positions underneath the special counter. For example, x'm will override any value placed in section 6, but not section 5. The values xm', x'm', ym, and y'm are not currently supported because they are not used in the text.
{{GOL-diagram-s|special=x'm}}
Template:GOL-diagram-s
{{GOL-diagram-s|special=ym'}}
Template:GOL-diagram-s

"hide" parameter

The "hide" parameter is used to hide half of the diagram. Allowed values are x, x', y, y'. Note that the syntax uses an apostrophe (') not a prime (′).

{{GOL-diagram-s|hide=x'}}
Template:GOL-diagram-s

"inline" parameter

The "inline" parameter allows the diagram to be placed inline. It uses Template:Tl to normalize input. Also, the whole block must be within explicit <div> tags for it to work.

<div>The diagram {{GOL-diagram-s|inline=yes}} is nice.</div>
The diagram Template:GOL-diagram-s is nice.

"style" parameter

The template includes a "style" parameter in case you need to modify the styles. The default style is "margin-left:auto;margin-right:auto;text-align:center;", plus the CSS definitions for class="wikitable".

Do not surround the style parameter value in quotation marks.

{{GOL-diagram-s|style=background-color:yellow;color:inherit; margin-left:inherit}}
Template:GOL-diagram-s

See also