Template:GOL-diagram-L/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

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

{{GOL-diagram-L
|1|2
|3|4
|5|6
|7|8
}}
1     2
  3 4  
  5 6  
7     8

You can also specify the sections by index:

{{GOL-diagram-L|3=C|5=E|8=H}}
       
  C    
  E    
      H

"special" and "special2" parameters[edit]

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

  • label labels the , , , , and 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-L|special=label}}
     
 
     
       
  • 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-L|special=x'm}}
       
       
     
       
{{GOL-diagram-L|special=ym'}}
       
1      
       
       

NOTE: "special2" allows for a secondary special value to be used. If label is used in conjunction with another special value, or if the two special values include overlapping positions, then unexpected results may occur.

{{GOL-diagram-L|special=xm|special2=ym'}}
       
1    
       
       

"hide" parameter[edit]

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-L|hide=x'}}
       
       

"inline" parameter[edit]

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

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

"style" parameter[edit]

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-L|style=background-color:yellow; margin-left:inherit}}
       
       
       
       


See also[edit]